|
|
A165211
|
|
Period 8: repeat [0,1,0,1,1,0,1,0].
|
|
5
|
|
|
0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Parity of A064706.
Parity of the generalized pentagonal numbers A001318. - Omar E. Pol, Feb 04 2012
More generally, parity of the generalized k-gonal numbers, for odd k >= 5. - Omar E. Pol, Feb 05 2012
|
|
LINKS
|
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,-1,1).
|
|
FORMULA
|
a(n) = (1/56)*((n mod 8) + 8*((n+1) mod 8) - 6*((n+2) mod 8) + 8*((n+3) mod 8) + ((n+4) mod 8) - 6*((n+5) mod 8) + 8*((n+6) mod 8) - 6*((n+7) mod 8)), with n >= 0. - Paolo P. Lava, Sep 16 2009
a(n) = A002817(n) mod 2. - Wesley Ivan Hurt, Apr 23 2014
a(n) = 1/2 - (-1)^(n*(n+1)*(n^2 + n + 2)/8)/2. - Vaclav Kotesovec, Apr 28 2014
From Colin Barker, Dec 20 2017: (Start)
G.f.: x*(1 - x + x^2) / ((1 - x)*(1 + x^4)).
a(n) = a(n-1) - a(n-4) + a(n-5) for n>4.
(End)
|
|
MATHEMATICA
|
PadRight[{}, 112, {0, 1, 0, 1, 1, 0, 1, 0}] (* Harvey P. Dale, Jan 29 2012 *)
Table[Mod[n*(n+1)*(n^2+n+2)/8, 2], {n, 0, 100}] (* Vaclav Kotesovec, Apr 28 2014 after Wesley Ivan Hurt *)
|
|
PROG
|
(PARI) a(n)=bitxor(n, n\4)%2 \\ Charles R Greathouse IV, Jul 13 2016
(PARI) concat(0, Vec(x*(1 - x + x^2) / ((1 - x)*(1 + x^4)) + O(x^100))) \\ Colin Barker, Dec 20 2017
|
|
CROSSREFS
|
Cf. A001318, A002817, A064706.
Cf. A130198 (essentially the same).
Sequence in context: A285249 A269027 A089809 * A341389 A188027 A359333
Adjacent sequences: A165208 A165209 A165210 * A165212 A165213 A165214
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Philippe Deléham, Sep 07 2009
|
|
STATUS
|
approved
|
|
|
|