A101120 Records in A101119, which forms the nonzero differences of A006519 and A003484.
7, 22, 52, 112, 239, 494, 1004, 2024, 4071, 8166, 16356, 32736, 65503, 131038, 262108, 524248, 1048535, 2097110, 4194260, 8388560, 16777167, 33554382, 67108812, 134217672, 268435399, 536870854, 1073741764, 2147483584, 4294967231, 8589934526, 17179869116, 34359738296
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,0,1,-3,2).
Programs
-
Mathematica
LinearRecurrence[{3,-2,0,1,-3,2},{7,22,52,112,239,494},30] (* Harvey P. Dale, Jan 23 2023 *)
-
PARI
a(n)=2^(n+3)-2^((n-1)%4)-8*((n+3)\4)
-
Python
def A101120(n): return (1<<(n+3))-(1<<((n-1)&3))-(((n+3)&-4)<<1) # Chai Wah Wu, Jul 10 2022
Formula
a(n) = A101119(2^(n-1)) for n>=1.
a(n) = 2^(n+3) - 2^((n-1)(mod 4)) - 8*floor((n+3)/4).
a(n) = 2^(n+3) - A003485(n+3). - Johannes W. Meijer, Oct 31 2012
From Chai Wah Wu, Apr 15 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-4) - 3*a(n-5) + 2*a(n-6) for n > 6.
G.f.: x*(-x - 7)/((x - 1)^2*(x + 1)*(2*x - 1)*(x^2 + 1)). (End)
E.g.f.: (exp(x)*(32*exp(x) - 8*x - 27) - 4*cos(x) - cosh(x) - 2*sin(x) + sinh(x))/4. - Stefano Spezia, Jun 06 2023