login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051176 If n mod 3 = 0 then n/3 else n. 17
0, 1, 2, 1, 4, 5, 2, 7, 8, 3, 10, 11, 4, 13, 14, 5, 16, 17, 6, 19, 20, 7, 22, 23, 8, 25, 26, 9, 28, 29, 10, 31, 32, 11, 34, 35, 12, 37, 38, 13, 40, 41, 14, 43, 44, 15, 46, 47, 16, 49, 50, 17, 52, 53, 18, 55, 56, 19, 58, 59, 20, 61, 62, 21, 64, 65, 22, 67 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Multiplicative with a(3^e) = 3^(e-1), a(p^e) = p^e otherwise. - Mitch Harris, Jun 09 2005

Numerator of n/3. - Wesley Ivan Hurt, Jul 18 2014

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).

FORMULA

a(n) = n / gcd(n,3).

G.f.: (x^5+2x^4+x^3+2x^2+x)/(1-x^3)^2 = x*(1+2*x+x^2+2*x^3+x^4) / ( (x-1)^2*(1+x+x^2)^2 ). - Len Smiley, Apr 30 2001

a(n) = A167192(n+3, 3). - Reinhard Zumkeller, Oct 30 2009

a(n) = A109044(n)/3. Dirichlet g.f. zeta(s-1)*(1-2/3^s). - R. J. Mathar, Apr 18 2011

a(n) = n/3 * (1 + 2*A011655(n)) = n*A144437(n)/3. - Timothy Hopper, Feb 23 2017

G.f.: x / (1 - x)^2 - 2 * x^3 / (1 - x^3)^2. - Michael Somos, Mar 05 2017

a(n) = a(-n) for all n in Z. - Michael Somos, Mar 05 2017

a(n) = n*(7 - 4*cos((2*Pi*n)/3)) / 9. - Colin Barker, Mar 05 2017

EXAMPLE

G.f. = x + 2*x^2 + x^3 + 4*x^4 + 5*x^5 + 2*x^6 + 7*x^7 + 8*x^8 + 3*x^9 + ...

MAPLE

A051176:=n->numer(n/3); seq(A051176(n), n=0..100); # Wesley Ivan Hurt, Jul 18 2014

MATHEMATICA

If[Divisible[#, 3], #/3, #]&/@Range[0, 70] (* Harvey P. Dale, Feb 07 2011 *)

a[n_] := Numerator[n/3]; Array[a, 100, 0] (* Wesley Ivan Hurt, Jul 18 2014 *)

PROG

(Haskell)

a051176 n = if m == 0 then n' else n  where (n', m) = divMod n 3

-- Reinhard Zumkeller, Aug 27 2012

(PARI) a(n) = if (n % 3, n, n/3); \\ Michel Marcus, Feb 02 2016

CROSSREFS

Cf. A026741, A051176, A060819, A060791, A060789 for n / GCD(n,k) for k=2..6.

Sequence in context: A106610 A182398 A214736 * A145064 A209166 A209146

Adjacent sequences:  A051173 A051174 A051175 * A051177 A051178 A051179

KEYWORD

nonn,easy,mult

AUTHOR

N. J. A. Sloane

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified May 22 15:30 EDT 2017. Contains 286876 sequences.