This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A080425 #61 Sep 08 2022 08:45:09 %S A080425 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, %T A080425 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, %U A080425 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 %N A080425 Period 3: repeat [0, 2, 1]. %C A080425 Previous name was: Jacobsthal selector sequence. %C A080425 The Jacobsthal sequence A001045 can be defined by A001045(n) = Sum_{k=0..floor(n,3)} C(n, a(n-1)+3*k). %C A080425 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 %H A080425 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1). %F A080425 a(n) = ceiling(((n mod 3) + 1)/2) + (-1)^((n mod 3) + 1). %F A080425 G.f.: x*(x+2)/(1-x^3). - _Paul Barry_, May 25 2003 %F A080425 a(n) = (3 - (n mod 3)) mod 3. - _Reinhard Zumkeller_, Jul 30 2005 %F A080425 a(n) = 2 * A001045(L(n/3)), where L(j/p) is the Legendre symbol of j and p. %F A080425 a(n) = (-n) mod 3; also a(n) = 3*ceiling(n/3)-n. - _Hieronymus Fischer_, May 29 2007 %F A080425 a(n) = A130196(n) + A131534(n) - 2. - _Reinhard Zumkeller_, Nov 12 2009 %F A080425 a(n) = (2n) mod 3. - _Wesley Ivan Hurt_, Jun 23 2013 %F A080425 From _Wesley Ivan Hurt_, Jul 02 2016: (Start) %F A080425 a(n) = a(n-3) for n>2. %F A080425 a(n) = 2*sin(n*Pi/3)*(3*sin(n*Pi/3) + sqrt(3)*cos(n*Pi/3))/3. (End) %p A080425 seq(modp(2*n,3), n=0..90); # _Zerinvary Lajos_, Dec 01 2006 %t A080425 Table[Mod[-n, 3], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jun 16 2014 *) %o A080425 (Haskell) %o A080425 a080425 = (`mod` 3) . (3 -) . (`mod` 3) %o A080425 a080425_list = cycle [0, 2, 1] -- _Reinhard Zumkeller_, Feb 22 2013 %o A080425 (Magma) [-n mod 3 : n in [0..100]]; // _Wesley Ivan Hurt_, Jun 16 2014 %o A080425 (PARI) a(n)=2*n%3 \\ _Charles R Greathouse IV_, Sep 24 2015 %Y A080425 Cf. A001045, A001477, A007318, A010872, A130196, A131534. %K A080425 nonn,easy %O A080425 0,2 %A A080425 _Paul Barry_, Feb 20 2003 %E A080425 More terms from _Reinhard Zumkeller_, Jul 30 2005 %E A080425 New name from _Joerg Arndt_, Apr 21 2014