OFFSET
0,1
COMMENTS
Old name was "a(n) is the minimum number that can be expressed as the sum of n terms of sequence A176513".
Lim_{n -> infinity} a(n+1)/a(n) = s^4 = 4.17119593178..., where s is the root of the characteristic equation s^5 = s^3 + s^2 + 1.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,5,2,-11,3,-1).
FORMULA
From Jianing Song, Feb 04 2019: (Start)
a(n+5) = 2*a(n+4) + 7*a(n+3) + 9*a(n+2) - 2*a(n+1) + a(n) - 32.
a(n+6) = 3*a(n+5) + 5*a(n+4) + 2*a(n+3) - 11*a(n+2) + 3*a(n+1) - a(n). (End)
MATHEMATICA
LinearRecurrence[{3, 5, 2, -11, 3, -1}, {2, 3, 4, 11, 40, 157}, 50]
PROG
(PARI) a(n) = my(v=vector(n+1), u=[2, 3, 4, 11, 40]); for(k=1, n+1, v[k]=if(k<=5, u[k], 2*v[k-1] + 7*v[k-2] + 9*v[k-3] - 2*v[k-4] + v[k-5] - 32)); v[n+1] \\ Jianing Song, Feb 04 2019
(Magma) I:=[2, 3, 4, 11, 40, 157]; [n le 6 select I[n] else 3*Self(n-1) +5*Self(n-2) +2*Self(n-3) -11*Self(n-4) +3*Self(n-5) -Self(n-6): n in [1..51]]; // G. C. Greubel, Jul 01 2021
(Sage)
@CachedFunction
def b(n): return 1 if (n<6) else b(n-2) + b(n-3) + b(n-5) # b=A176513
def a(n): return 2 + sum(b(4*j+1) for j in (0..n-1))
[a(n) for n in (0..50)] # G. C. Greubel, Jul 01 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Carmine Suriano, Apr 22 2010
EXTENSIONS
New name, a(0) = 2 prepended and a(1), a(2) corrected by Jianing Song, Feb 04 2019
Term a(11) corrected by G. C. Greubel, Jul 01 2021
STATUS
approved