|
|
A276308
|
|
a(n) = (a(n-1)+1)*(a(n-3)+1)/a(n-4) for n > 3, a(0) = a(1) = a(2) = a(3) = 1.
|
|
1
|
|
|
1, 1, 1, 1, 4, 10, 22, 115, 319, 736, 3886, 10816, 24991, 131989, 367405, 848947, 4483720, 12480934, 28839196, 152314471, 423984331, 979683706, 5174208274, 14402986300, 33280406797, 175770766825, 489277549849, 1130554147381, 5971031863756, 16621033708546
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 35*a(n-3)-35*a(n-6)+a(n-9) for n>8.
G.f.: (1+x+x^2-34*x^3-31*x^4-25*x^5+22*x^6+10*x^7+4*x^8) / ((1-x)*(1+x+x^2)*(1-34*x^3+x^6)).
(End)
|
|
PROG
|
(Ruby)
def A(m, n)
a = Array.new(m, 1)
ary = [1]
while ary.size < n + 1
i = (a[1] + 1) * (a[-1] + 1)
break if i % a[0] > 0
a = *a[1..-1], i / a[0]
ary << a[0]
end
ary
end
A(4, n)
end
(PARI) Vec((1+x+x^2-34*x^3-31*x^4-25*x^5+22*x^6+10*x^7+4*x^8)/((1-x)*(1+x+x^2)*(1-34*x^3+x^6)) + O(x^35)) \\ Colin Barker, Aug 29 2016
(PARI) a276308(maxn) = {a=vector(maxn); a[1]=a[2]=a[3]=a[4]=1; for(n=5, maxn, a[n]=(a[n-1]+1)*(a[n-3]+1)/a[n-4]); a} \\ Colin Barker, Aug 30 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|