OFFSET
0,2
COMMENTS
First prime terms are a(n) with a = 1, 4, 6, 18, 88.
FORMULA
a(n) = (28*4^n + 27(-1)^n - 25)/30.
G.f. = (1 - 2*x + 6*x^2)/(1 - 4*x - x^2 + 4*x^3).
MATHEMATICA
RecurrenceTable[{a[0]==1, a[1]==2, a[n]==3a[n-1]+4a[n-2]+5}, a, {n, 30}] (* Harvey P. Dale, May 30 2020 *)
PROG
(Sage)
from sage.combinat.sloane_functions import recur_gen2b
it = recur_gen2b(1, 2, 3, 4, lambda n: 5)
[next(it) for i in range(24)] # Zerinvary Lajos, Jul 16 2008
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 26 2007
STATUS
approved