A147596 a(n) is the number whose binary representation is A138145(n).
1, 3, 7, 15, 31, 63, 119, 231, 455, 903, 1799, 3591, 7175, 14343, 28679, 57351, 114695, 229383, 458759, 917511, 1835015, 3670023, 7340039, 14680071, 29360135, 58720263, 117440519, 234881031, 469762055, 939524103, 1879048199, 3758096391
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-2).
Programs
-
Magma
[1,3,7,15,31] cat [7*(1+2^(n-3)): n in [6..40]]; // G. C. Greubel, Oct 25 2022
-
Mathematica
Join[{1,3,7,15,31}, 7*(1+2^(Range[6, 40] -3))] (* G. C. Greubel, Oct 25 2022 *)
-
PARI
Vec(-x*(2*x^2-1)*(4*x^4+2*x^2+1)/((x-1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
-
SageMath
def A147596(n): return 7*(1+2^(n-3)) -(1/8)*(63*int(n==0) +62*int(n==1) +60*int(n ==2)) -(7*int(n==3) +6*int(n==4) +4*int(n==5)) [A147596(n) for n in range(1,40)] # G. C. Greubel, Oct 25 2022
Formula
a(n) = 7*(2^(n-3) + 1) if n >= 6. - Hagen von Eitzen, Jun 02 2009
From Colin Barker, Sep 15 2013: (Start)
a(n) = 3*a(n-1) - 2*a(n-2), for n >= 8.
G.f.: x*(1-2*x^2)*(1+2*x^2+4*x^4) / ((1-x)*(1-2*x)). (End)
E.g.f.: (7/8)*(8*exp(x) + exp(2*x)) - (1/8)*(63 + 62*x + 30*x^2) - 7*x^3/6 - x^4/4 - x^5/30. - G. C. Greubel, Oct 25 2022
Extensions
More terms from Hagen von Eitzen, Jun 02 2009
Comments