OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(n+1) = A060000(a(n)+1), a(1) = 1. - Reinhard Zumkeller, Mar 04 2008
G.f.: -x*(x^2-x+1)*(2*x^3+2*x^2-1) / ((x-1)*(2*x-1)). - Colin Barker, Jan 12 2013
E.g.f.: (144*exp(x) + 9*exp(2*x) - 153 - 114*x - 42*x^2 - 12*x^3 - 2*x^4)/48. - Stefano Spezia, Jul 25 2024
MATHEMATICA
h = f = {1, 2}; a = 1; b = 2; Do[ g = Sort[ h ]; If[ g[ [ -1 ] ] + 1 == n, c = a + b, k = 1; While[ g[ [ k ] ] == k, k++ ]; c = k ]; a = b; b = c; h = Append[ h, c ]; If[ c > g[ [ -1 ] ], f = Append[ f, c ] ], { n, 3, 10^4 } ]; f
LinearRecurrence[{3, -2}, {1, 2, 3, 5, 9, 15}, 40] (* Harvey P. Dale, Dec 12 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert G. Wilson v, Mar 15 2001
EXTENSIONS
Formulae and more terms from Henry Bottomley and Larry Reeves (larryr(AT)acm.org), Mar 19 2001
STATUS
approved