OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,5,0,-4).
FORMULA
For n>4, a(n) = 2^A028242(n-4)*u(n); u(2n) = 2^(n-1)+1/2^n hence a(2n) = 4^(n-1)+1.
From Michael Somos (via Benoit Cloitre), Nov 29 2002: (Start)
a(1)=a(2)=a(3)=2, a(n+2) = (1+2^n)/(1+2*(n mod 2)).
For k>=2, a(2k+1) = A001045(2k-1). (End)
Empirical g.f.: x*(4*x^6+x^4-5*x^3-8*x^2+2*x+2) / ((x-1)*(x+1)*(2*x-1)*(2*x+1)). - Colin Barker, Oct 14 2014
This follows from the Somos formula for a(n+2). - Robert Israel, Aug 10 2015
a(1)=a(2)=a(3)=2 and, for n>3, a(n) = denominator(1/2+6/(4+2^n)). - Gerry Martens, Aug 10 2015
a(n) = H(n - 2, n mod 2, 1/2) for n >= 5 where H(n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -8). - Peter Luschny, Sep 03 2019
MAPLE
2, 2, 2, seq(2/3+(1/6)*2^k+(1/12)*(-1)^k*2^k+(1/3)*(-1)^k, k=4..50); # Robert Israel, Aug 10 2015
H := (n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -8):
a := n -> `if`(n < 5, [2, 2, 2, 5][n], H(n-2, irem(n, 2), 1/2)):
seq(simplify(a(n)), n=1..34); # Peter Luschny, Sep 03 2019
MATHEMATICA
nxt[{a_, b_, c_}]:={b, c, (1+b c)/a}; NestList[nxt, {2, 2, 2}, 40][[All, 1]]// Numerator (* Harvey P. Dale, Oct 31 2021 *)
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Benoit Cloitre, Nov 24 2002
STATUS
approved