OFFSET
1,1
COMMENTS
Deliberately contrived to begin with first five primes; illustrates absurdity of many "guess the next term" puzzles.
The 4th-order formula a(n) = (1/8)*n^4 - (17/12)*n^3 + (47/8)*n^2 - (103/12)*n + 6 is sufficient to yield a(n) = prime(n) for n = 1..5. - Jon E. Schoenfield, Sep 15 2018
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
de.rec.denksport, FAQ.
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
From Elmo R. Oliveira, Sep 02 2025: (Start)
G.f.: x*(14*x^5 + 14*x^4 - 18*x^3 + 17*x^2 - 9*x + 2)/(x-1)^6.
E.g.f.: 14 + exp(x)*(4*x^5 - 17*x^4 + 64*x^3 - 180*x^2 + 384*x - 336)/24.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n > 6. (End)
MATHEMATICA
Table[(n^5)/6 - (19/8)n^4 + (51/4)n^3 - (253/8)n^2 + (445/12)n - 14, {n, 40}] (* Alonso del Arte, Jan 25 2017 *)
PROG
(PARI) a(n) = (4*n^5 - 57*n^4 + 306*n^3 - 759*n^2 + 890*n)/24 - 14 \\ Harry J. Smith, Jul 01 2009
CROSSREFS
KEYWORD
dumb,easy,nonn
AUTHOR
Rainer Rosenthal, Mar 10 2001
STATUS
approved
