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.

Showing 1-3 of 3 results.

A048736 Dana Scott's sequence: a(n) = (a(n-2) + a(n-1) * a(n-3)) / a(n-4), a(0) = a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 13, 22, 41, 111, 191, 361, 982, 1693, 3205, 8723, 15042, 28481, 77521, 133681, 253121, 688962, 1188083, 2249605, 6123133, 10559062, 19993321, 54419231, 93843471, 177690281, 483649942, 834032173, 1579219205, 4298430243, 7412446082, 14035282561, 38202222241, 65877982561
Offset: 0

Views

Author

Keywords

Comments

The recursion has the Laurent property. If a(0), a(1), a(2), a(3) are variables, then a(n) is a Laurent polynomial (a rational function with a monic monomial denominator). - Michael Somos, Feb 05 2012
A generalization is if the recursion is modified to a(n) = (a(n-2) + a(n-1) * b*a(n-3)) / a(n-4) where b is a constant, and with arbitrary nonzero initial values, (a(0), a(1), a(2), a(3)), then a(n) = c*(a(n-3) - a(n-6)) + a(n-9) for all n in Z where c is another constant. - Michael Somos, Oct 28 2021

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 13*x^6 + 22*x^7 + 41*x^8 + 111*x^9 + ...
		

Crossrefs

Cf. A192241, A192242 (primes and where they occur).
Cf. A276531.

Programs

  • Haskell
    a048736 n = a048736_list !! n
    a048736_list = 1 : 1 : 1 : 1 :
       zipWith div
         (zipWith (+)
           (zipWith (*) (drop 3 a048736_list)
                        (drop 1 a048736_list))
           (drop 2 a048736_list))
         a048736_list
    -- Reinhard Zumkeller, Jun 26 2011
    
  • Magma
    I:=[1,1,1,1]; [n le 4 select I[n] else (Self(n-2) + Self(n-1)*Self(n-3)) / Self(n-4): n in [1..30]]; // G. C. Greubel, Feb 20 2018
  • Maple
    P:=proc(q) local n,v; v:=[1,1,1,1]; for n from 1 to q do
    v:=[op(v),(v[-2]+v[-1]*v[-3])/v[-4]] od: op(v); end: P(35); # Paolo P. Lava, Aug 24 2025
  • Mathematica
    RecurrenceTable[{a[0] == a[1] == a[2] == a[3] == 1, a[n] == (a[n - 2] + a[n - 1]a[n - 3])/a[n - 4]}, a[n], {n, 40}] (* or *) LinearRecurrence[{0, 0, 10, 0, 0, -10, 0, 0, 1}, {1, 1, 1, 1, 2, 3, 5, 13, 22}, 41] (* Harvey P. Dale, Oct 22 2011 *)
  • PARI
    Vec((1+x+x^2-9*x^3-8*x^4-7*x^5+5*x^6+3*x^7+2*x^8) / (1-10*x^3+10*x^6-x^9)+O(x^99)) \\ Charles R Greathouse IV, Jul 01 2011
    

Formula

a(n) = 9*a(n-3) - a(n-6) - 3 - ( ceiling(n/3) - floor(n/3) ), with a(0) = a(1) = a(2) = a(3) = 1, a(4) = 2, a(5) = 3. - Michael Somos
From Jaume Oliver Lafont, Sep 17 2009: (Start)
a(n) = 10*a(n-3) - 10*a(n-6) + a(n-9).
G.f.: (1 + x + x^2 - 9*x^3 - 8*x^4 - 7*x^5 + 5*x^6 + 3*x^7 + 2*x^8)/(1 - 10*x^3 + 10*x^6 - x^9). (End)
a(n) = a(3-n) for all n in Z. - Michael Somos, Feb 05 2012

Extensions

More terms from Michael Somos

A192241 Primes in Dana Scott's sequence (A048736).

Original entry on oeis.org

2, 3, 5, 13, 41, 191, 1693, 77521, 6123133, 19993321, 65877982561, 45970265603856656467133467254989217935871992827865240416294386431
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 01 2011

Keywords

Comments

a(n) = A048736(A192242(n)); the larger entries were found as probable primes and then successfully checked with Alpertron's ECM applet.

Crossrefs

Cf. A129739 (primes in Somos-4 sequence).

A192816 a(n) = A192815(n)/2.

Original entry on oeis.org

0, 1, 2, 7, 36, 173, 806, 3763, 17608, 82393, 385482, 1803487, 8437740, 39476613, 184694254, 864105611, 4042781584, 18914450865, 88492648850, 414019362743, 1937020023220, 9062490569821, 42399528318646, 198369310046307, 928085399264344
Offset: 0

Views

Author

Clark Kimberling, Jul 10 2011

Keywords

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!( x*(1-3*x)/(1-5*x+3*x^2-7*x^3) )); // G. C. Greubel, Jan 03 2019
    
  • Mathematica
    (* See A192814. *)
    LinearRecurrence[{5,-3,7}, {0,1,2}, 30] (* G. C. Greubel, Jan 03 2019 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1-3*x)/(1-5*x+3*x^2-7*x^3))) \\ G. C. Greubel, Jan 03 2019
    
  • Sage
    (x*(1-3*x)/(1-5*x+3*x^2-7*x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 03 2019

Formula

a(n) = 5*a(n-1) - 3*a(n-2) + 7*a(n-3).
G.f.: x*(1-3*x)/(1-5*x+3*x^2-7*x^3). - Bruno Berselli, Jul 11 2011
Showing 1-3 of 3 results.