OFFSET
0,4
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
David Nacin, Van der Laan Sequences and a Conjecture on Padovan Numbers, J. Int. Seq., Vol. 26 (2023), Article 23.1.2.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
a(n) = (5-(-1)^n + i*i^n-i*(-i)^n)/4 where i = sqrt(-1).
a(n) = a(n-4) for n > 3; a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 2.
G.f.: (1+x+x^2+2*x^3)/(1-x^4).
a(n) = 1 + (1-(-1)^n) * (1+i^(n+1))/4 where i = sqrt(-1). - Bruno Berselli, Apr 05 2011
a(n) = 5/4 - sin(Pi*n/2)/2 - (-1)^n/4. - R. J. Mathar, Oct 08 2011
a(n) = floor((n+1)*5/4) - floor(n*5/4). - Hailey R. Olafson, Jul 23 2014
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n+3) - a(n+2) = A219977(n).
Sum_{i=0..n-1} a(i) = A001068(n). (End)
E.g.f.: (-sin(x) + 3*sinh(x) + 2*cosh(x))/2. - Ilya Gutkovskiy, Jun 15 2016
MAPLE
A177704:=n->floor((n+1)*5/4) - floor(n*5/4): seq(A177704(n), n=0..100); # Wesley Ivan Hurt, Jun 15 2016
MATHEMATICA
Table[Floor[(n + 1)*5/4] - Floor[n*5/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jun 15 2016 *)
LinearRecurrence[{0, 0, 0, 1}, {1, 1, 1, 2}, 100] (* Vincenzo Librandi, Jun 16 2016 *)
PROG
(Magma) &cat[ [1, 1, 1, 2]: k in [1..27] ];
(PARI) a(n) = if(n%4==3, 2, 1) \\ Felix Fröhlich, Jun 15 2016
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
Klaus Brockhaus, May 11 2010
STATUS
approved