cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A271341 Somos's sequence {a(4,n)} defined in comment in A018896.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 10, 19, 35, 60, 156, 284, 499, 930, 1836, 7116, 21586, 52869, 115344, 356076, 972840, 3350009, 11844969, 37689894, 215136930, 785604755, 2444023816, 7985904285, 36968693334, 230985863335, 1429813280831, 6838592493455, 27144055289355, 191201731942399
Offset: 0

Views

Author

Keywords

Comments

The sequence of the first differences begins from 9 zeros, 5 1's and 4 consecutive squares, beginning with 2^2.
A generalization see in the comment in A018896.

Crossrefs

Programs

  • Magma
    [n le 10 select 1 else (Self(n-1)*Self(n-9) + Self(n-5)^2 )/Self(n-10): n in [1..40]]; // G. C. Greubel, Feb 21 2018
  • Mathematica
    k = 4; Set[#, 1] & /@ Map[a[k, #] &, Range[0, 2 k + 1]]; a[k_, n_] /;
    n >= 2 k + 2 := (a[k, n - 1] a[k, n - 2 k - 1] + a[k, n - k - 1]^2) / a[k, n - 2 k - 2]; Table[a[k, n], {n, 0, 42}] (* Michael De Vlieger, Apr 04 2016 *)
    a[n_ /; 0 <= n <= 10] = 1; a[n_]:= a[n] = (a[n-1]*a[n-9] + a[n-5]^2)/a[n -10]; Table[a[n], {n,0,40}] (* G. C. Greubel, Feb 21 2018 *)
  • PARI
    {a(n) = if(n< 10, 1, (a(n-1)*a(n-9) + a(n-5)^2)/a(n-10))};
    for(n=0,40, print1(a(n), ", ")) \\ G. C. Greubel, Feb 21 2018
    

Extensions

More terms from Michael De Vlieger, Apr 04 2016