OFFSET
1,3
COMMENTS
This sequence is one of the two "basis" sequences for sequences having the form s(a,b,1)=a, s(a,b,2)=b, s(n)=(4*n-2)*s(a,b,n-1) + s(a,b,n-2), the second being A343688. s(a,b,n) = a*A343688(n) + b*a(n).
Of specific interest is s(3,19,n) and s(1,7,n) which produce the odd terms of A340737 and A340738 respectively and whose quotient converges to e.
a(n) mod n = 1 for even n and n-2 for odd n (empirical).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..366
FORMULA
a(1)=0, a(1)=1, a(n) = (4*n-2)*a(n-1) + a(n-2).
EXAMPLE
a(4)=14*10+1, a(5)=18*141+10...
MAPLE
e := proc(a, b, n) option remember; if n = 1 then a; else if n = 2 then b; else (4*n - 2)*e(a, b, n - 1) + e(a, b, n - 2); end if; end if; end proc
for n from 1 to 20 do print(e(0, 1, n)) od
MATHEMATICA
RecurrenceTable[{a[1]==0, a[2]==1, a[n]==(4n-2)a[n-1]+a[n-2]}, a, {n, 20}] (* Harvey P. Dale, Dec 17 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary Detlefs, Apr 26 2021
STATUS
approved