OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
G.f.: x*(1 + 5*x + 5*x^3 + x^4)/(1 - x^3)^2. - Georg Fischer, Dec 03 2024
a(n) = 4*n/3 + (6*A049347(n) - A049347(n-1))/3 - 2*(-1)^n*(A099254(n) - A099254(n-1)). - G. C. Greubel, Dec 09 2025
EXAMPLE
Terms begin:
0, 1, 5;
0, 7, 11;
0, 13, 17;
0, 19, 23;
...
MATHEMATICA
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 1, 5, 0, 7, 11}, 100] (* Georg Fischer, Dec 03 2024 *)
PROG
(Magma)
I:= [0, 1, 5, 0, 7, 11]; [n le 6 select I[n] else 2*Self(n-3) -Self(n-6): n in [1..100]]; // G. C. Greubel, Dec 09 2025
(SageMath)
@CachedFunction
def A147666(n):
if n<6: return (0, 1, 5, 0, 7, 11)[n]
[A147666(n) for n in range(101)] # G. C. Greubel, Dec 09 2025
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Milton L. Brown (miltbrown(AT)earthlink.net), Nov 10 2008
EXTENSIONS
More terms from Robert G. Wilson v, Dec 07 2008
Edited by N. J. A. Sloane, Dec 07 2008
STATUS
approved
