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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A091684 a(n) = 0 if n is divisible by 3, otherwise a(n) = n. 4
0, 1, 2, 0, 4, 5, 0, 7, 8, 0, 10, 11, 0, 13, 14, 0, 16, 17, 0, 19, 20, 0, 22, 23, 0, 25, 26, 0, 28, 29, 0, 31, 32, 0, 34, 35, 0, 37, 38, 0, 40, 41, 0, 43, 44, 0, 46, 47, 0, 49, 50, 0, 52, 53, 0, 55, 56, 0, 58, 59, 0, 61, 62, 0, 64, 65, 0, 67, 68, 0, 70, 71, 0, 73, 74, 0, 76, 77, 0, 79, 80 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

Multiplicative with a(3^e) = 0, a(p^e) = p^e otherwise. [Mitch Harris, Jun 09, 2005]

Completely multiplicative with a(3) = 0, a(p) = p otherwise. [Charles R Greathouse IV, Feb 21, 2011]

LINKS

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

FORMULA

a(n) = prod{k=0..2, sum{j=1..n, w(3)^(k*j) }}, w(3)=e^(2*pi*i/3), i=sqrt(-1).

a(n) = 2*n/3-n*sin(2*pi*n/3+pi/3)/sqrt(3)-n*cos(2*pi*n/3+pi/3)/3.

G.f.: x*(x^4+2*x^3+2*x+1)/((x^2+x+1)^2*(x-1)^2). - R. Stephan, Jan 29 2004

a(n) = n^3 mod 3n; - Paul Barry, Apr 13 2005

Dirichlet g.f. zeta(s-1)*(1-1/3^(s-1)). - R. J. Mathar, Feb 10 2011

a(n) = n*(Fibonacci(n)-2*floor(Fibonacci(n)/2)), n>0. - Gary Detlefs, Feb 12 2011

a(3*n) = 0, a(3*n + 1) = 3*n + 1, a(3*n + 2) = 3*n + 2. a(-n) = -a(n). - Michael Somos, Mar 19 2011

EXAMPLE

x + 2*x^2 + 4*x^4 + 5*x^5 + 7*x^7 + 8*x^8 + 10*x^10 + 11*x^11 + 13*x^13 + ...

MATHEMATICA

f[n_] := If[ Mod[n, 3] == 0, 0, n] (* Or *) n (Fibonacci[n] - 2 Floor[ Fibonacci[n]/2]); Array[f, 78, 0] (* RGWv *)

PROG

(PARI) a(n)=if(n%3, n) \\ Charles R Greathouse IV, Feb 21, 2011

(PARI) {a(n) = n * sign( n%3)} /* Michael Somos Mar 19 2011 */

(MAGMA) &cat[[0, 3*n+1, 3*n+2]: n in [0..26]];  // Bruno Berselli, Aug 29 2011

CROSSREFS

Cf. A100050.

Sequence in context: A084247 A070692 * A162397 A100050 A164616 A173335

Adjacent sequences:  A091681 A091682 A091683 * A091685 A091686 A091687

KEYWORD

nonn,mult,easy

AUTHOR

Paul Barry (pbarry(AT)wit.ie), Jan 28 2004

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

Content is available under The OEIS End-User License Agreement .

Last modified February 17 04:52 EST 2012. Contains 205985 sequences.