A147595 a(n) is the number whose binary representation is A138144(n).
1, 3, 7, 15, 27, 51, 99, 195, 387, 771, 1539, 3075, 6147, 12291, 24579, 49155, 98307, 196611, 393219, 786435, 1572867, 3145731, 6291459, 12582915, 25165827, 50331651, 100663299, 201326595, 402653187, 805306371, 1610612739, 3221225475
Offset: 1
Links
- Harvey P. Dale, 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] cat [3*(1+2^(n-2)): n in [4..40]]; // G. C. Greubel, Oct 25 2022
-
Mathematica
LinearRecurrence[{3,-2},{1,3,7,15,27},40] (* Harvey P. Dale, Nov 30 2020 *)
-
PARI
Vec(-x*(2*x^2-1)*(2*x^2+1)/((x-1)*(2*x-1)) + O(x^100)) \\ Colin Barker, Sep 15 2013
-
SageMath
[1,3,7]+[3*(1+2^(n-2)) for n in range(4,40)] # G. C. Greubel, Oct 25 2022
Formula
a(n) = A060013(n+2), n > 3. - R. J. Mathar, Feb 05 2010
a(n+4) = 3*(2^(n+2) + 1), n >= 0. - Brad Clardy, Apr 03 2013
From Colin Barker, Sep 15 2013: (Start)
a(n) = 3*(4 + 2^n)/4 for n>3.
a(n) = 3*a(n-1) - 2*a(n-2).
G.f.: x*(1-2*x^2)*(1+2*x^2) / ((1-x)*(1-2*x)). (End)
E.g.f.: (3/4)*(4*exp(x) + exp(2*x)) - (15/4) - 7*x/2 - 3*x^2/2 - x^3/3. - G. C. Greubel, Oct 25 2022
Extensions
Extended by R. J. Mathar, Feb 05 2010