OFFSET
0,2
COMMENTS
Powers of 2 in a scaled version of the Hankel transform of A106191.
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,1,1,0,-1).
FORMULA
a(n) = log(abs(A137718(n)))/log(2).
From R. J. Mathar, Feb 10 2008: (Start)
O.g.f.: 1/(2*(x-1)^2) + (x-1)/(3*(x^2+x+1)) - 1/(4*(x+1)) - 1/(12*(x-1)).
a(n) = 3 + a(n-6). (End)
From Colin Barker, Jun 27 2013: (Start)
a(n) = a(n-2) + a(n-3) - a(n-5).
G.f.: x*(x+2) / ((x-1)^2*(x+1)*(x^2+x+1)). (End)
a(n) = Sum_{i=0..floor(n/2)} (2n-i mod 3). - Wesley Ivan Hurt, Mar 22 2016
MAPLE
A137719:=n->add(2*n-i mod 3, i=0..floor(n/2)): seq(A137719(n), n=0..100); # Wesley Ivan Hurt, Mar 21 2016
MATHEMATICA
Table[Sum[Mod[2 n - i, 3], {i, 0, Floor[n/2]}], {n, 0, 80}] (* Wesley Ivan Hurt, Mar 21 2016 *)
PROG
(Magma) [&+[(2*n-i) mod 3: i in [0..Floor(n/2)]]: n in [0..80]]; // Wesley Ivan Hurt, Mar 21 2016
(PARI) apply( A137719(n)={(n=divrem(n-1, 6))[1]*3+min(n[2]+2*!n[2], 3)}, [0..30]) \\ M. F. Hasler, Oct 27 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Feb 08 2008
STATUS
approved