OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,4).
FORMULA
After 1, 2, repeat 4^p, 2*4^p, 2*4^p, p positive.
G.f.: 1 + 2*x*(1 +2*x +4*x^2)/(1 - 4*x^3). - R. J. Mathar, Nov 07 2015
a(n) = 2^floor((2*n+3)/3) = 2^A004396(n+1), n >= 1. - G. C. Greubel, Feb 15 2021 [corrected by Jason Yuen, Sep 23 2024]
Sum_{n>=0} 1/a(n) = 13/6. - Amiram Eldar, Aug 16 2022
MATHEMATICA
Join[{1}, LinearRecurrence[{0, 0, 4}, {2, 4, 8}, 45]] (* Ray Chandler, Sep 23 2015 *)
Table[2^Floor[(2*n+3)/3] - Boole[n==0], {n, 0, 45}] (* G. C. Greubel, Feb 15 2021 *)
PROG
(Sage)
def A132170(n): return 2^floor((2*n+3)/3) if n>0 else 1
[A132170(n) for n in (0..45)] # G. C. Greubel, Feb 15 2021
(Magma)
A132170:= func< n | n eq 0 select 1 else 2^Floor((2*n+3)/3) >;
[A132170(n): n in [0..45]]; // G. C. Greubel, Feb 15 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 16 2007
EXTENSIONS
Terms a(24) onward added by G. C. Greubel, Feb 15 2021
STATUS
approved