OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Numbers, except 2, satisfy a(n) = 1 + k/3 * (4k^2+5), with k in A005097. - Ralf Stephan, Aug 21 2004
a(n) = (n^3+5*n+6)/6, for n+1 prime, so a(n) = A000125(A006093(n)) - Bert Seghers, Jan 01 2012, corrected by Robert Israel, Jun 20 2019
MAPLE
g:= n -> (n^3+5*n+6)/6:
seq(g(ithprime(i)-1), i=1..100); # Robert Israel, Jun 20 2019
MATHEMATICA
seq[n_Integer?Positive] := Module[{fn01 = 1, fn10 = 1, fnout = 1}, Do[{fn10, fn01, fnout} = {fn10 + 1, fn01 + fn10, fn01 + fnout}, {n - 1}]; {fn10, fn01, fnout}]; Ar = Flatten[ Table[ seq[ Prime[n]], {n, 1, 50}]]; a = {}; Do[a = Append[a, Ar[[n]]], {n, 3, 150, 3}]; a
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 03 2002
STATUS
approved