OFFSET
1,1
COMMENTS
The terms are primes for n = 1, 2, 4, 12, 22, 32 and possibly further n’s (Question).
LINKS
Hieronymus Fischer, Table of n, a(n) for n = 1..100
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,9,-18,9,0,10,-20,10).
FORMULA
a(n) = ((3982 + 2709*k + 567*k^2 + 54*k^3)*10^m - 1980*m - 2200 - 495*k + 162*((n+1) mod 2) * (-1)^m * (-1)^floor(n/2))/891, where m=floor((n-1)/4), k=(n-1) mod 4.
G.f.: (2*x*(1+x^10) + 3*x^2*(1 + x^3 + x^5 + x^6) + 5*x^3*(1+x^6) + 7*x^4*(1+x^2))/((1-x)*(1-10*x^4)*(1-x^8)).
From Chai Wah Wu, Feb 08 2023: (Start)
a(n) = 2*a(n-1) - a(n-2) + 9*a(n-4) - 18*a(n-5) + 9*a(n-6) + 10*a(n-8) - 20*a(n-9) + 10*a(n-10) for n > 10.
G.f.: x*(-2*x^7 + 2*x^6 - 5*x^5 + 2*x^4 - 2*x^3 - 2*x^2 - x - 2)/((x - 1)^2*(x^4 + 1)*(10*x^4 - 1)). (End)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Hieronymus Fischer, Jun 08 2012
EXTENSIONS
Typo in g.f. corrected by Hieronymus Fischer, Sep 03 2012
STATUS
approved