|
|
A080425
|
|
Period 3: repeat [0, 2, 1].
|
|
19
|
|
|
0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Previous name was: Jacobsthal selector sequence.
The Jacobsthal sequence A001045 can be defined by A001045(n) = Sum_{k=0..floor(n,3)} C(n, a(n-1)+3*k).
The floor of the area under the polygon connecting the lattice points: (n, a(n)) from 0..n is A001477(n), the nonnegative integers. - Wesley Ivan Hurt, Jun 16 2014
|
|
LINKS
|
Table of n, a(n) for n=0..104.
Index entries for linear recurrences with constant coefficients, signature (0,0,1).
|
|
FORMULA
|
a(n) = ceiling(((n mod 3) + 1)/2) + (-1)^((n mod 3) + 1).
G.f.: x*(x+2)/(1-x^3). - Paul Barry, May 25 2003
a(n) = (3 - (n mod 3)) mod 3. - Reinhard Zumkeller, Jul 30 2005
a(n) = 2 * A001045(L(n/3)), where L(j/p) is the Legendre symbol of j and p.
a(n) = (-n) mod 3; also a(n) = 3*ceiling(n/3)-n. - Hieronymus Fischer, May 29 2007
a(n) = A130196(n) + A131534(n) - 2. - Reinhard Zumkeller, Nov 12 2009
a(n) = (2n) mod 3. - Wesley Ivan Hurt, Jun 23 2013
From Wesley Ivan Hurt, Jul 02 2016: (Start)
a(n) = a(n-3) for n>2.
a(n) = 2*sin(n*Pi/3)*(3*sin(n*Pi/3) + sqrt(3)*cos(n*Pi/3))/3. (End)
|
|
MAPLE
|
seq(modp(2*n, 3), n=0..90); # Zerinvary Lajos, Dec 01 2006
|
|
MATHEMATICA
|
Table[Mod[-n, 3], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 16 2014 *)
|
|
PROG
|
(Haskell)
a080425 = (`mod` 3) . (3 -) . (`mod` 3)
a080425_list = cycle [0, 2, 1] -- Reinhard Zumkeller, Feb 22 2013
(MAGMA) [-n mod 3 : n in [0..100]]; // Wesley Ivan Hurt, Jun 16 2014
(PARI) a(n)=2*n%3 \\ Charles R Greathouse IV, Sep 24 2015
|
|
CROSSREFS
|
Cf. A001045, A001477, A007318, A010872, A130196, A131534.
Sequence in context: A112203 A196279 A132798 * A048141 A025664 A025854
Adjacent sequences: A080422 A080423 A080424 * A080426 A080427 A080428
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Paul Barry, Feb 20 2003
|
|
EXTENSIONS
|
More terms from Reinhard Zumkeller, Jul 30 2005
New name from Joerg Arndt, Apr 21 2014
|
|
STATUS
|
approved
|
|
|
|