OFFSET
1,3
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
G.f.: x^2*(1+x+x^2+3*x^3) / ((1+x)*(1-x)^2*(1+x^2)). - R. J. Mathar, Oct 08 2011
a(n) = floor((6/5)*floor(5*(n-1)/4)). - Bruno Berselli, May 03 2016
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6*n - 9 - i^(2*n) - (1-i)*i^(-n) - (1+i)*i^n)/4 where i=sqrt(-1).
E.g.f.: (6 + sin(x) - cos(x) + (3*x - 4)*sinh(x) + (3*x - 5)*cosh(x))/2. - Ilya Gutkovskiy, May 21 2016
From Guenther Schrack, Feb 12 2019: (Start)
a(n) = (6*n - 9 - (-1)^n - 2*(-1)^(n*(n+1)/2))/4.
a(n) = a(n-4) + 6, a(1)=0, a(2)=1, a(3)=2, a(4)=3, for n > 4. (End)
Sum_{n>=2} (-1)^n/a(n) = Pi/(6*sqrt(3)) + 2*log(2)/3. - Amiram Eldar, Dec 16 2021
a(n)-a(n-1) = A093148(n-2). - R. J. Mathar, May 01 2024
MAPLE
A047246:=n->(6*n-9-I^(2*n)-(1-I)*I^(-n)-(1+I)*I^n)/4: seq(A047246(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
MATHEMATICA
Table[(6n-9-I^(2n)-(1-I)*I^(-n)-(1+I)*I^n)/4, {n, 80}] (* Wesley Ivan Hurt, May 21 2016 *)
PROG
(Haskell)
a047246 n = a047246_list !! (n-1)
a047246_list = [0..3] ++ map (+ 6) a047246_list
-- Reinhard Zumkeller, Jan 15 2013
(Magma) [Floor((6/5)*Floor(5*(n-1)/4)) : n in [1..100]]; // Wesley Ivan Hurt, May 21 2016
(PARI) my(x='x+O('x^70)); concat([0], Vec(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4)))) \\ G. C. Greubel, Feb 16 2019
(Sage) a=(x^2*(1+x+x^2+3*x^3)/((1-x)*(1-x^4))).series(x, 72).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Feb 16 2019
(GAP) Filtered([0..100], n->n mod 6 = 0 or n mod 6 = 1 or n mod 6 = 2 or n mod 6 = 3); # Muniru A Asiru, Feb 20 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Wesley Ivan Hurt, May 21 2016
STATUS
approved