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-9 of 9 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

A212336 Expansion of 1/(1 - 23*x + 23*x^2 - x^3).

Original entry on oeis.org

1, 23, 506, 11110, 243915, 5355021, 117566548, 2581109036, 56666832245, 1244089200355, 27313295575566, 599648413462098, 13164951800590591, 289029291199530905, 6345479454589089320, 139311518709760434136, 3058507932160140461673
Offset: 0

Views

Author

Bruno Berselli, Jun 08 2012

Keywords

Comments

Partial sums of A077421.

Crossrefs

Sequences with g.f. of the type 1/(1-k*x+k*x^2-x^3): A334673 (k=24), A212336 (k=23), A212335 (k=22), A097833 (k=21), A097832 (k=20), A049664 (k=19), A097831-A097829 (k=18,17,16), A076139 (k=15), A097828-A097826 (k=14,13,12), A097784 (k=11), A092420 (k=10), A076765 (k=9), A092521 (k=8), A053142 (k=7), A089817(k=6), A061278 (k=5), A027941 (k=4), A000217 (k=3), A021823 (k=2), A133872 (k=1), A079978 (k=0).

Programs

  • Magma
    m:=17; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-23*x+23*x^2-x^3)));
    
  • Magma
    I:=[1,23,506]; [n le 3 select I[n] else 23*Self(n-1)-23*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Aug 18 2013
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <1|-23|23>>^n. <<1, 23, 506>>)[1, 1]:
    seq(a(n), n=0..20);  # Alois P. Heinz, Jun 15 2012
  • Mathematica
    CoefficientList[Series[1/(1 - 23 x + 23 x^2 - x^3), {x, 0, 16}], x]
    LinearRecurrence[{23, -23, 1}, {1, 23, 506}, 20] (* Vincenzo Librandi, Aug 18 2013 *)
  • Maxima
    makelist(coeff(taylor(1/(1-23*x+23*x^2-x^3), x, 0, n), x, n), n, 0, 16);
    
  • PARI
    Vec(1/(1-23*x+23*x^2-x^3)+O(x^17))
    
  • Sage
    [(1/20)*(-1 +21*chebyshev_U(n, 11) -chebyshev_U(n-1, 11)) for n in (0..30)] # G. C. Greubel, Feb 07 2022

Formula

G.f.: 1/((1-x)*(1 - 22*x + x^2)).
a(n) = (((6+sqrt(30))^(2*n+3) + (6-sqrt(30))^(2*n+3))/6^(n+1) - 12)/240.
a(n) = a(-n-3) = 23*a(n-1) - 23*a(n-2) + a(n-3).
a(n)*a(n+2) = a(n+1)*(a(n+1)-1).
a(n+1) - 11*a(n) = A133285(n+2).
11*a(n+1) - a(n) = (1/5)*A157096(n+2).
a(n) = (1/20)*(-1 + 21*ChebyshevU(n, 11) - ChebyshevU(n-1, 11)). - G. C. Greubel, Feb 07 2022

A077784 Numbers k such that (10^k - 1)/3 + 2*10^floor(k/2) is a palindromic wing prime (a.k.a. near-repdigit palindromic prime).

Original entry on oeis.org

3, 5, 35, 159, 237, 325, 355, 371, 481, 1649, 3641, 4709, 269623
Offset: 1

Views

Author

Patrick De Geest, Nov 16 2002

Keywords

Comments

Prime versus probable prime status and proofs are given in the author's table.
a(13) > 2*10^5. - Robert Price, Apr 03 2016

Examples

			5 is a term because (10^5 - 1)/3 + 2*10^2 = 33533.
		

References

  • C. Caldwell and H. Dubner, "Journal of Recreational Mathematics", Volume 28, No. 1, 1996-97, pp. 1-9.

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[(10^n + 6*10^Floor[n/2] - 1)/3], Print[n]], {n, 3, 4800, 2}] (* Robert G. Wilson v, Dec 16 2005 *)

Formula

a(n) = 2*A183175(n) + 1.

Extensions

Name corrected by Jon E. Schoenfield, Oct 31 2018
a(13) from Robert Price, Aug 03 2024

A077828 Expansion of 1/(1-3*x-3*x^2-3*x^3).

Original entry on oeis.org

1, 3, 12, 48, 189, 747, 2952, 11664, 46089, 182115, 719604, 2843424, 11235429, 44395371, 175422672, 693160416, 2738935377, 10822555395, 42763953564, 168976333008, 667688525901, 2638286437419, 10424853888984, 41192486556912, 162766880649945, 643152663287523
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...12, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784, A097826-7.
Cf. A071675.

Programs

  • Mathematica
    CoefficientList[Series[1/(1-3x-3x^2-3x^3),{x,0,30}],x] (* or *) LinearRecurrence[ {3,3,3},{1,3,12},30] (* Harvey P. Dale, Dec 25 2018 *)
  • PARI
    Vec(1/(1-3*x-3*x^2-3*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

Formula

a(n) = sum{k=0..n, T(n-k, k)3^(n-k)}, T(n, k) = trinomial coefficients (A027907). - Paul Barry, Feb 15 2005
a(n) = sum{k=0..n, sum{i=0..floor((n-k)/2), C(n-k-i, i)C(k, n-k-i)}*3^k}. - Paul Barry, Apr 26 2005

A077829 Expansion of 1/(1-3*x-3*x^2-2*x^3).

Original entry on oeis.org

1, 3, 12, 47, 183, 714, 2785, 10863, 42372, 165275, 644667, 2514570, 9808261, 38257827, 149227404, 582072215, 2270414511, 8855914986, 34543132921, 134737972743, 525555146964, 2049965624963, 7996038261267, 31189121952618, 121655411891581, 474525678055131
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...14, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784, A097826-A097828, A076139.

Programs

  • Mathematica
    CoefficientList[Series[1/(1 - 3*x - 3*x^2 - 2*x^3), {x, 0, 30}], x] (* Wesley Ivan Hurt, Jan 20 2024 *)
    LinearRecurrence[{3,3,2},{1,3,12},30] (* Harvey P. Dale, Dec 20 2024 *)
  • PARI
    Vec(1/(1-3*x-3*x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

Formula

G.f.: 1/(1-3*x-3*x^2-2*x^3).
a(n) = 3*a(n-1) + 3*a(n-2) + 2*a(n-3). - Wesley Ivan Hurt, Jan 20 2024

A077831 Expansion of 1/(1-3*x-2*x^2-2*x^3).

Original entry on oeis.org

1, 3, 11, 41, 151, 557, 2055, 7581, 27967, 103173, 380615, 1404125, 5179951, 19109333, 70496151, 260067021, 959412031, 3539362437, 13057045415, 48168685181, 177698871247, 655548074933, 2418379337655, 8921631905325, 32912750541151, 121418274109413
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(1-3x-2x^2-2x^3),{x,0,30}],x] (* or *) LinearRecurrence[{3,2,2},{1,3,11},30] (* Harvey P. Dale, Feb 28 2025 *)
  • PARI
    Vec(1/(1-3*x-2*x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

A077826 Expansion of (1-x)^(-1)/(1-2*x-3*x^2-2*x^3).

Original entry on oeis.org

1, 3, 10, 32, 101, 319, 1006, 3172, 10001, 31531, 99410, 313416, 988125, 3115319, 9821846, 30965900, 97627977, 307797347, 970410426, 3059468848, 9645763669, 30410754735, 95877738174, 302279267892, 953013259777, 3004619799579, 9472837914274, 29865561746840
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...10, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784.
Partial sums of A077833.

Programs

Formula

From Wesley Ivan Hurt, Jun 26 2022: (Start)
G.f.: (1-x)^(-1)/(1-2*x-3*x^2-2*x^3).
a(n) = 3*a(n-1) + a(n-2) - a(n-3) - 2*a(n-4). (End)

A077827 Expansion of (1-x)^(-1)/(1-2*x-2*x^2-2*x^3).

Original entry on oeis.org

1, 3, 9, 27, 79, 231, 675, 1971, 5755, 16803, 49059, 143235, 418195, 1220979, 3564819, 10407987, 30387571, 88720755, 259032627, 756281907, 2208070579, 6446770227, 18822245427, 54954172467, 160446376243, 468445588275, 1367692273971, 3993168476979, 11658612678451
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002, Jun 05 2007

Keywords

Crossrefs

Partial sums of S(n, x), for x=1...11, A021823, A000217, A027941, A061278, A089817, A053142, A092521, A076765, A092420, A097784, A097826.

Programs

  • Mathematica
    CoefficientList[Series[(1-x)^(-1)/(1-2x-2x^2-2x^3),{x,0,40}],x]  (* Harvey P. Dale, Mar 27 2011 *)
  • PARI
    Vec((1-x)^(-1)/(1-2*x-2*x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012

A077830 Expansion of 1/(1-3*x-2*x^2-3*x^3).

Original entry on oeis.org

1, 3, 11, 42, 157, 588, 2204, 8259, 30949, 115977, 434606, 1628619, 6103000, 22870056, 85702025, 321155187, 1203479779, 4509855786, 16899992477, 63330128340, 237319937332, 889320046107, 3332590398005, 12488371098225, 46798254229006, 175369276077483
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/(1-3x-2x^2-3x^3),{x,0,40}],x] (* or *) LinearRecurrence[{3,2,3},{1,3,11},40] (* Harvey P. Dale, Nov 05 2021 *)
Showing 1-9 of 9 results.