A076737 Let u(1)=u(2)=u(3)=2, u(n)=(1+u(n-1)u(n-2))/u(n-3); then a(n) is the numerator of u(n).
2, 2, 2, 5, 3, 17, 11, 65, 43, 257, 171, 1025, 683, 4097, 2731, 16385, 10923, 65537, 43691, 262145, 174763, 1048577, 699051, 4194305, 2796203, 16777217, 11184811, 67108865, 44739243, 268435457, 178956971, 1073741825, 715827883, 4294967297
Offset: 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).
Programs
-
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 *)
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