A130779 a(0)=a(1)=1, a(2)=2, a(n)=0 for n >= 3.
1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
References
- J. Sándor and B. Crstici, Handbook of Number Theory II, Kluwer, 2004, p. 265.
Links
- Index entries for linear recurrences with constant coefficients, signature (1).
Programs
-
Mathematica
PadRight[{1,1,2},120,0] (* Harvey P. Dale, May 02 2015 *) LinearRecurrence[{1},{1,1,2,0},105] (* Ray Chandler, Jul 15 2015 *)
-
PARI
a(n)=if(n<3,max(n,1),0) \\ Charles R Greathouse IV, Dec 21 2011
Formula
G.f.: 1+x+2x^2.
a(n) = A167666(n,0). - Philippe Deléham, Feb 18 2012
a(n) = n! mod 3. - Charles Kusniec, Jan 25 2020
Comments