|
|
A166486
|
|
Periodic sequence [0,1,1,1] of length 4.
|
|
17
|
|
|
0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Sum_{k>0} a(k)/k/3^k = log(5)/4.
From Reinhard Zumkeller, Nov 30 2009: (Start)
a(n) = 1-A121262(n); characteristic function of numbers that are not multiples of 4; a(A042968(n))=1; a(A008586(n))=0;
A033436(n) = Sum{k=0..n} a(k)*(n-k). (End)
A190621(n) = n * a(n).
|
|
LINKS
|
Antti Karttunen, Table of n, a(n) for n = 0..65537
Michael Somos, Rational Function Multiplicative Coefficients
Index entries for characteristic functions
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
|
|
FORMULA
|
G.f.: (x + x^2 + x^3) / (1 - x^4) = x * (1 + x + x^2) / ((1 - x) * (1 + x) * (1 + x^2)) = x * (1 - x^3) / ((1 - x) * (1 - x^4)).
a(n) = (3 - i^n - (-i)^n - (-1)^n) / 4, where i=sqrt(-1).
Multiplicative with a(p^e) = (if p=2 then 0^(e-1) else 1), p prime and e>0. - Reinhard Zumkeller, Nov 30 2009
a(n) = 1/2*((n^3+n) mod 4). - Gary Detlefs, Mar 20 2010
a(n) = (3*(n mod 4)+(n+1 mod 4)+(n+2 mod 4)-(n+3 mod 4))/8 (cf. forms of modular arithmetic of Paolo P. Lava, i.e., see A146094). - Bruno Berselli, Sep 27 2010
a(n) = (Fibonacci(n)*Fibonacci(3n) mod 3)/2. - Gary Detlefs Dec 21 2010
Euler transform of length 4 sequence [ 1, 0, -1, 1]. - Michael Somos, Feb 12 2011
Dirichlet g.f. (1-1/4^s)*zeta(s). - R. J. Mathar, Feb 19 2011
a(n) = Fibonacci(n)^2 mod 3. - Gary Detlefs, May 16 2011
a(n) = -1/4*cos(Pi*n)-1/2*cos(1/2*Pi*n)+3/4. - Leonid Bedratyuk, May 13, 2012
For the general case: the characteristic function of numbers that are not multiples of m is a(n)=floor((n-1)/m)-floor(n/m)+1, m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = ceiling(n/4) - floor(n/4). - Wesley Ivan Hurt, Jun 20 2014
a(n) = a(-n) for all n in Z. - Michael Somos, May 05 2015
For n >= 1, a(n) = A053866(A225546(n)) = A000035(A331733(n)). - Antti Karttunen, Jul 07 2020
|
|
EXAMPLE
|
G.f. = x + x^2 + x^3 + x^5 + x^6 + x^7 + x^9 + x^10 + x^11 + x^13 + x^14 + ...
|
|
MAPLE
|
seq(1/2*((n^3+n) mod 4), n=0..50); # Gary Detlefs, Mar 20 2010
|
|
MATHEMATICA
|
PadRight[{}, 120, {0, 1, 1, 1}] (* Harvey P. Dale, Jul 04 2013 *)
Table[Ceiling[n/4] - Floor[n/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 20 2014 *)
a[ n_] := Sign[ Mod[n, 4]]; (* Michael Somos, May 05 2015 *)
|
|
PROG
|
(PARI) {a(n) = !!(n%4)};
(MAGMA) [Ceiling(n/4)-Floor(n/4) : n in [0..50]]; // Wesley Ivan Hurt, Jun 20 2014
|
|
CROSSREFS
|
Cf. A016628, A152822, A164985, A165132. First difference of A057353.
Cf. A168185, A145568, A168184, A168182, A168181, A109720, A097325, A011558, A011655, A000035, A010873, A121262.
Sequence in context: A284939 A188260 A341625 * A046978 A075553 A131729
Adjacent sequences: A166483 A166484 A166485 * A166487 A166488 A166489
|
|
KEYWORD
|
nonn,mult,easy
|
|
AUTHOR
|
Jaume Oliver Lafont, Oct 15 2009
|
|
STATUS
|
approved
|
|
|
|