[go: up one dir, main page]

login
A126019
a(0)=1, a(1)=2; for n>1, a(n)=3*a(n-1)+4*a(n-2)+5.
0
1, 2, 15, 58, 239, 954, 3823, 15290, 61167, 244666, 978671, 3914682, 15658735, 62634938, 250539759, 1002159034, 4008636143, 16034544570, 64138178287, 256552713146, 1026210852591, 4104843410362, 16419373641455, 65677494565818
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
Sequence in context: A265909 A034571 A295828 * A071237 A006470 A084169
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 26 2007
STATUS
approved