login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A271838
Somos's sequence {a(8,n)} defined in comment in A018896: a(0)=a(1)= ... = a(17) = 1; for n>=18, a(n) = (a(n-1)*a(n-17)+ a(n-9)^2)/a(n-18).
7
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 23, 39, 64, 100, 149, 213, 294, 688, 1130, 1683, 2484, 3800, 6100, 10143, 17082, 28584, 87352, 234714, 521145, 1013424, 1809100, 3067659, 5075784, 8375940, 22379904, 47848348
OFFSET
0,19
LINKS
Eric Weisstein's World of Mathematics, Somos Sequence
MATHEMATICA
a[k_, n_]:=a[k, n] = If[n>2*k+1, (a[k, (n-1)]*a[k, (n-2*k-1)]+(a[k, (n-k-1)])^2 )/a[k, (n-2*k-2)], 1]; Map[a[8, #]&, Range[0, 50]] (* Peter J. C. Moses, Apr 15 2016 *)
RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==a[6]==a[7]==a[8]==a[9]== a[10]==a[11]==a[12]==a[13]==a[14]==a[15]==a[16]==a[17]==1, a[n]==(a[n-1]a[n-17]+ a[n-9]^2)/a[n-18]}, a, {n, 60}] (* Harvey P. Dale, Jun 30 2023 *)
PROG
(PARI) {a(n) = if(n< 18, 1, (a(n-1)*a(n-17) + a(n-9)^2)/a(n-18))};
for(n=0, 40, print1(a(n), ", ")) \\ G. C. Greubel, Feb 21 2018
(Magma) [n le 18 select 1 else (Self(n-1)*Self(n-17) + Self(n-9)^2 )/Self(n-18): n in [1..40]]; // G. C. Greubel, Feb 21 2018
KEYWORD
nonn
AUTHOR
STATUS
approved