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.

User: Michael Somos

Michael Somos's wiki page.

Michael Somos has authored 2116 sequences. Here are the ten most recent ones:

A385121 a(n+1) = 12*a(n) - a(n-1), a(0) = a(1) = 2, a(n) = a(1-n).

Original entry on oeis.org

2, 2, 22, 262, 3122, 37202, 443302, 5282422, 62945762, 750066722, 8937854902, 106504192102, 1269112450322, 15122845211762, 180205030090822, 2147337515878102, 25587845160446402, 304906804409478722, 3633293807753298262, 43294618888630100422
Offset: 0

Author

Michael Somos, Jun 18 2025

Keywords

Comments

If x = 2, y = 6, z = a(n), w = a(n+1), then x^2+y^2+z^2+w^2 = x*y*z*w.

Examples

			G.f. = 2 + 2*x + 22*x^2 + 262*x^3 + 3122*x^4 + 37202*x^5 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := Which[n<1, a[1-n], n==1, 2, True, 12*a[n-1] - a[n-2]];
  • PARI
    {a(n) = if(n<1, a(1-n), n==1, 2, 12*a(n-1) - a(n-2))};

Formula

G.f.: (2 - 22*x)/(1 - 12*x + x^2).
0 = 40 + a(n)^2 - 12*a(n)*a(n+1) + a(n+1)^2 for all n in Z.
a(n) = 2 * A077417(n-1).
E.g.f.: 2*exp(6*x)*(7*cosh(sqrt(35)*x) - sqrt(35)*sinh(sqrt(35)*x))/7. - Stefano Spezia, Aug 29 2025

A377310 Divisibility sequence associated with elliptic curve y^2 + y = x^3 - x^2 - 2x + 2 and point (1, 0).

Original entry on oeis.org

0, 1, 1, 1, -3, -4, -13, 23, 87, 415, -152, -8063, -38727, -142471, 2309453, 13609844, 187790979, -1743980081, -25547499185, -575984295329, 1873521429456, 217675476797921, 5045023692031697, 65853623974941521, -5934036772012185603, -157454833217800083092
Offset: 0

Author

Michael Somos, Oct 23 2024

Keywords

Comments

Bisection of A210098 (even part). The other bisection is A277279.
The elliptic curve y^2 + y = x^3 - x^2 - 2x + 2 has LMFDB label 57.a1 (Cremona label 57a1).
This is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = 1, y = 1, z = -3.

Examples

			G.f. = x + x^2 + x^3 - 3*x^4 - 4*x^5 - 13*x^6 + 23*x^7 + 87*x^8 + 415*x^9 + ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<6, [0, 1$4, 2][n+1],
          (b(n-1)*b(n-4) -b(n-2)*b(n-3)) / b(n-5))
        end:
    a:= n-> b(2*n):
    seq(a(n), n=0..25);  # Alois P. Heinz, May 05 2025
  • Mathematica
    a[ n_] := a[n] = Which[ n<0, -a[-n], n<5, {0, 1, 1, 1, -3}[[n+1]], True, (a[n-1]*a[n-3] - a[n-2]^2)/a[n-4]];
  • PARI
    {a(n) = my(v); if(n<0, -a(-n), n<5, [0, 1, 1, 1, -3][n+1], v = vector(n, i, if(i<5, a(i))); for(i=5, n, v[i] = (v[i-1]*v[i-3] - v[i-2]^2)/v[i-4]); v[n])};
    
  • PARI
    {a(n) = my(E = ellinit([0, -1, 1, -2, 2]), z); z = ellpointtoz(E, [1, 0]); -(-1)^n*round(ellsigma(E, n*z)/ellsigma(E, z)^(n^2))};
    
  • PARI
    {a(n) = my(E = ellinit([0, -1, 1, -2, 2])); sign(n) * subst( elldivpol( E, abs(n)), x, 1)};

Formula

a(n) = A210098(2*n).
a(n) = -a(-n) for all n in Z.
0 = a(n)*a(n+4) - a(n+1)*a(n+3) + a(n+2)^2 for all n in Z.
0 = a(n)*a(n+5) - a(n+1)*a(n+4) - 3*a(n+2)*a(n+3) for all n in Z.
0 = a(n+1)^2*a(n+2)^2 - a(n)^2*a(n+3)^2 - a(n)*a(n+2)^3 - a(n+1)^3*a(n+3) - 2*a(n)*a(n+1)*a(n+2)*a(n+3) for all n in Z.

Extensions

Duplicate term a(15)=2309453 removed by Georg Fischer, May 05 2025

A362718 Expansion of e.g.f. cos(x)*exp(x^2/2) = Sum_{n>=0} a(n)*x^(2*n)/(2*n)!.

Original entry on oeis.org

1, 0, -2, -16, -132, -1216, -12440, -138048, -1601264, -18108928, -161934624, 404007680, 92590134208, 4221314202624, 159324751301248, 5730872535686144, 205239818509082880, 7450322829180649472, 276342876017093172736, 10509280308463090102272
Offset: 0

Author

Michael Somos, Apr 30 2023

Keywords

Crossrefs

Cf. A001464.

Programs

  • Mathematica
    a[ n_] := If[ n<0, 0, (2*n)! * SeriesCoefficient[ Cos[x] * Exp[x^2/2], {x, 0, 2*n}]];
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x*O(x^(2*n)); (2*n)! * polcoef( cos(x + A)*exp(x^2/2 + A), 2*n))};
    
  • SageMath
    def egfExpand(f, step, size) -> list[int]:
        x = LazyPowerSeriesRing(QQ, "x").gen()
        return [f(x)[step*n] * factorial(step*n) for n in range(size+1)]
    def egf(x): return cos(x)*exp(x^2/2)
    print(egfExpand(egf, 2, 19))  # Peter Luschny, May 02 2023

Formula

a(n) = (-1)^n * A001464(2*n).
0 = a(n)*(360*a(n+2) -600*a(n+3) +230*a(n+4) -28*a(n+5) +a(n+6)) +a(n+1)*(216*a(n+2) -296*a(n+3) +84*a(n+4) -6*a(n+5)) +a(n+2)*(66*a(n+2) -56*a(n+3) +15*a(n+4)) -10*a(n+3)^2 for all n >= 0.

A358735 Triangular array read by rows. T(n, k) is the coefficient of x^k in a(n+3) where a(1) = a(2) = a(3) = 1 and a(m+2) = (m*x + 2)*a(m+1) - a(m) for all m in Z.

Original entry on oeis.org

1, 1, 1, 1, 4, 2, 1, 10, 16, 6, 1, 20, 70, 76, 24, 1, 35, 224, 496, 428, 120, 1, 56, 588, 2260, 3808, 2808, 720, 1, 84, 1344, 8140, 23008, 32152, 21096, 5040, 1, 120, 2772, 24772, 107328, 245560, 298688, 178848, 40320
Offset: 0

Author

Michael Somos, Mar 15 2023

Keywords

Comments

This sequence is essentially A204024 except for extra row, alternating signs and reversed rows.
The sequence of polynomials a(m) satisfies a(m)*a(m-2) = a(m-1) * (a(m-1) + x*a(m-2) + a(m-3)) - a(m-2)^2 for all m > 3.

Examples

			a(3) = 1, a(4) = 1 + x, a(5) = 1 + 4*x + 2*x^2.
Triangular array T(n, k) starts:
n\k | 0   1   2   3   4   5
--- + - --- --- --- --- ---
 0  | 1
 1  | 1   1
 2  | 1   4   2
 3  | 1  10  16   6
 4  | 1  20  70  76  24
 5  | 1  35 224 496 428 120
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := If[ n<0, 0, Module[{a = Table[1, n+3], x}, Do[ a[[m]] = a[[m-1]] *(a[[m-1]] + x*a[[m-2]] + a[[m-3]])/a[[m-2]] - a[[m-2]] //Factor//Expand, {m, 4, n+3}]; Coefficient[ a[[n+3]], x, k]]];
  • PARI
    {T(n, k) = if( n<0, 0, my(a = vector(n+3, i, 1)); for(m = 4, n+3, a[m] = a[m-1]*(a[m-1] + 'x*a[m-2] + a[m-3])/a[m-2] - a[m-2]); polcoeff( a[n+3], k))};

Formula

If x=1, then a(n) = A058797(n+2) = Sum_{k=0..n} T(n, k).
If x=2, then a(n) = A093986(n+2).
T(n, n) = n!, T(n, 0) = 1, T(n, 1) = A000292(n). T(n, 2) = 2*A040977(n-2).

A360381 Generalized Somos-5 sequence a(n) = (a(n-1)*a(n-4) + a(n-2)*a(n-3))/a(n-5) = -a(-n), a(1) = 1, a(2) = -1, a(3) = a(4) = 1, a(5) = -7.

Original entry on oeis.org

0, 1, -1, 1, 1, -7, 8, -1, -57, 391, -455, -2729, 22352, -175111, 47767, 8888873, -69739671, 565353361, 3385862936, -195345149609, 1747973613295, -4686154246801, -632038062613231, 34045765616463119, -319807929289790304, -11453004955077020783
Offset: 0

Author

Michael Somos, Feb 04 2023

Keywords

Comments

This has the same recurrence as Somos-5 (A006721) with different initial values.
The elliptic curve y^2 + xy = x^3 + x^2 - 2x (LMFDB label 102.a1) has infinite order point P = (2, 2). The x and y coordinates of n*P have denominators a(n)^2 and |a(n)^3| respectively.
If b(2*n) = 6^(1/4)*a(2*n), b(2*n+1) = a(2*n+1), then b(n) is a generalized Somos-4 sequence with b(n+2)*b(n-2) = 6^(1/2)*b(n+1)*b(n-1) - b(n)*b(n) for all n in Z.
This is the sequence T_n in the Hone 2022 paper.

Examples

			5*P = (50/49, 20/343) and a(5) = -7, 6*P = (121/64, -1881/512) and a(6) = 8.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = a[3] = a[4] = 1; a[2] = -1; a[5] = -7;
    a[n_?Negative] := -a[-n];
    a[n_] := a[n] = (a[n-1] a[n-4] + a[n-2] a[n-3]) / a[n-5]; (* Andrey Zabolotskiy, Feb 05 2023 *)
    a[ n_] := Module[{A = Table[1, Max[5, Abs[n]]]}, A[[2]] = -1; A[[5]] = -7; Do[ A[[k]] = (A[[k-1]]*A[[k-4]] + A[[k-2]]*A[[k-3]])/A[[k-5]], {k, 6, Length[A]}]; If[n==0, 0, Sign[n]*A[[Abs[n]]] ]];
  • PARI
    {a(n) = my(A = vector(max(5, abs(n)), k, 1)); A[2] = -1; A[5] = -7; for(k=6, #A, A[k] = (A[k-1]*A[k-4] + A[k-2]*A[k-3])/A[k-5]); if(n==0, 0, sign(n)*A[abs(n)])};
    
  • PARI
    {a(n) = my(E = ellinit([1, 1, 0, -2, 0])); subst(elldivpol(E, n), 'x, 2) *(-1)^(n-1) / 6^((n-1)%2 + n^2\4)}; /* Michael Somos, Mar 01 2025 */

Formula

a(2*n) = -A241595(n+1), a(n) = -a(-n) for all n in Z.
From Michael Somos, Aug 19 2025: (Start)
Let S(n) = A006721(n+2) as in Hone. We have for all n in Z:
S(2*n) = S(n-1)*S(n)*a(n-1)*a(n+2) - S(n-2)*S(n+1)*a(n)*a(n+1).
S(2*n+1) = S(n)*S(n+1)*a(n-1)*a(n+2) - S(n-1)*S(n+2)*a(n)*a(n+1).
a(2*n) = a(n)*(a(n-2)*a(n+1)^2 - a(n+2)*a(n-1)^2).
a(2*n+1) = a(n-1)*a(n)^2*a(n+3) - a(n+2)*a(n+1)^2*a(n-2).
S(n-3)*S(n) = S(n-2)*S(n-1) - a(n-2)*a(n-1).
a(n-3)*a(n) = S(n-2)*S(n-1) + a(n-2)*a(n-1).
(End)

A360187 Generalized Somos-5 sequence with a(n) = (-a(n-1)*a(n-4) + 42*a(n-2)*a(n-3))/a(n-5), a(-n) = a(n), a(0) = a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 1, 3, 13, 113, 1525, 57123, 2165017, 262621633, 42422452969, 14070212996451, 7658246457672229, 10650393355715621873, 15512114571284835412957, 75606222210863532170808003, 452005526897888844293504165425
Offset: 0

Author

Michael Somos, Jan 29 2023

Keywords

Comments

The elliptic curve y^2 = x^3 - 2*x (LMFDB label 256.b1) has infinite order point P = (2, 2) and 2-torsion point T = (0, 0). The x and y coordinates of n*P + T have denominators a(n)^2 and a(n)^3 respectively.

Examples

			2*P + T = (-8/9, -28/27). 3*P + T  = (-1/169, 239/2197).
		

Crossrefs

Cf. A166929.

Programs

  • Mathematica
    a[ m_] := With[{n = Abs[m]}, If[ n<3, {1, 1, 3}[[n+1]], (-a[n-1]*a[n-4] + 42*a[n-2]*a[n-3])/a[n-5]]];
  • PARI
    {a(n) = my(E = ellinit([-2, 0])); sqrtint(denominator(elladd(E, [0, 0], ellmul(E, [2, 2], n))[1]))};
    
  • PARI
    {a(n) = my(A); n = abs(n); A = vector(max(4, n+1), k, 1); A[3] = 3; A[4] = 13; for(k = 4, n, A[k+1] = (if(k%2, 4, 8)*A[k]*A[k-2] + A[k-1]^2)/A[k-3]); A[n+1]};

Formula

a(2*n-1) = A166929(n) for all n in Z.

A357537 a(n) = 2*A080635(n) if n > 0. a(0) = 1.

Original entry on oeis.org

1, 2, 2, 6, 18, 78, 378, 2214, 14562, 108702, 897642, 8171766, 81066258, 871695918, 10091490138, 125189658054, 1656458307522, 23288226400062, 346663764078282, 5447099463010326, 90094171024954098, 1564653992673809358, 28467075416816935098, 541467979789775621094
Offset: 0

Author

Michael Somos, Oct 02 2022

Keywords

Examples

			G.f. = 1 + 2*x + 2*x^2 + 6*x^3 + 18*x^4 + 78*x^5 + 378*x^6 + ...
E.g.f. = 1 + 2*x + x^2 + x^3 + 3/4*x^4 + 13/20*x^5 + 21/40*x^6 + ...
		

Crossrefs

Cf. A080635.

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, n! Simplify@SeriesCoefficient[ Sqrt[3] Tan[ Pi/6 + x Sqrt[3]/2], {x, 0, n}]];
    a[ n_] := If[ n < 0, 0, Nest[Expand[(1 + x + x^2) D[#, x]]&, 1 + 2 x, n] /. x->0];
  • PARI
    {a(n) = my(A); if(n<0, 0, A = 1 + 2*x; for( k=1, n, A = A' * (1 + x + x^2)); polcoeff(A, 0))};

Formula

E.g.f.: sqrt(3) tan(Pi/6 + x sqrt(3)/2).
E.g.f. A(x) satisfies 2*A' = 3 + A^2, A'' = A*A'.
Let f(x) = 1 + x + x^2. Then a(n+1) = (f(x)*d/dx)^n f'(x) evaluated at x = 0.

A357438 Triangle T(n,k) read by rows, defined by the equation f(x, y) := Sum_{n, k} T(n, k) * y^k * x^n = 1/(1 - x*y - x^2*y*f(x, y+1)).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 2, 6, 6, 1, 0, 5, 16, 20, 10, 1, 0, 15, 51, 71, 50, 15, 1, 0, 52, 186, 281, 231, 105, 21, 1, 0, 203, 759, 1223, 1114, 616, 196, 28, 1, 0, 877, 3409, 5795, 5701, 3564, 1428, 336, 36, 1, 0, 4140, 16655, 29634, 31011, 21187, 9780
Offset: 1

Author

Michael Somos, Sep 27 2022

Keywords

Comments

Row sums are A000110.

Examples

			Triangle starts:
  1,
  0,   1,
  0,   1,    1,
  0,   1,    3,    1,
  0,   2,    6,    6,    1,
  0,   5,   16,   20,   10,    1,
  0,  15,   51,   71,   50,   15,    1,
  0,  52,  186,  281,  231,  105,   21,  1,
  0, 203,  759, 1223, 1114,  616,  196,  28,  1,
  0, 877, 3409, 5795, 5701, 3564, 1428, 336, 36, 1,
  ...
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := If[n < 0, 0, Coefficient[SeriesCoefficient[ Nest[ 1/(1 - x*y - x^2*y*(#/.y -> y+1))&, 1 + O[x], Ceiling[n/2]], {x, 0, n}], y, k]];
  • PARI
    {T(n, k) = if(n < 0, 0, f = 1 + O(x); forstep(i=1, n, 2, f = 1/(1 - x*y - x^2*y*subst(f, y, y+1))); polcoef(polcoef(f, n), k))};

Formula

f(x, -1) = 1/(1 + x + x^2).
x + x^2*f(x, 2) = 1 - 1/f(x, 1) is g.f. for A074664.

A352625 A (25,-29) Somos-4 sequence.

Original entry on oeis.org

1, 2, 7, 59, 1529, 83313, 7869898, 1687054711, 1123424582771, 1662315215971057, 4257998884448335457, 23385756731869683322514, 397068399296019032727466599, 15886280085653574502219650145963, 1107464108502549897934954766675333353, 157131202095317153373302215985417166354641
Offset: 0

Author

Michael Somos, Mar 24 2022

Keywords

Comments

Hankel transform of A188314 with first term omitted.

Examples

			G.f.: 1 + 2*x + 7*x^2 + 59*x^3 + 1529*x^4 + 83313*x^5 + ...
a(2) = 7 = 2*16 - 5*5 = det([2, 5; 5, 16]).
		

Crossrefs

Programs

  • Mathematica
    b[ n_] := If[OddQ[n], a[-(n-1)/2], a[n/2-1]]; a[ n_] := If[-3<=n<=1, {23, 3, 1, 1, 2}[[n+4]], 2*b[1-n]^3*b[2-n] + b[-n]^2*(b[2-n]*b[3-n] - b[1-n]*b[4-n])];

Formula

a(n) = (25*a(n-1)*a(n-3) - 29*a(n-2)^2)/a(n-4) for all n in Z.
a(n) = (29*a(n-1)*a(n-4) - 13*a(n-2)*a(n-3))/a(n-5) for all n in Z.
a(n) = b(1-2*n) = b(2*n+2) = A188313(-1-n) for all n in Z where b(n) = A006720(n).

A338218 Number of terms in polynomial sequence s(n) = x*y*z*(s(n-1)*s(n-3) + s(n-2)^2)/s(n-4), with s(1) = x, s(2) = s(3) = 1, s(4) = y.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 12, 23, 43, 80, 140, 233, 387, 612, 930, 1411, 2067, 2936, 4170, 5768, 7796, 10537, 13960, 18163, 23639, 30285, 38249, 48322, 60285, 74340, 91706, 111967, 135403
Offset: 1

Author

Michael Somos, Jan 29 2021

Keywords

Comments

The Somos-4 polynomial sequence is s(n).

Examples

			a(6) = 3 because s(6) = x*y^3*z^2 + x*y^3*z + x*y^2*z^2 has 3 terms.
		

Crossrefs

Cf. A333260.

Programs

  • Mathematica
    a[ n_] := If[1 <= n <= 4, 1, RecurrenceTable[{s[m]*s[m - 4] == x*y*z*(s[m - 1]*s[m - 3] + s[m - 2]^2), s[1] == x, s[2] == 1, s[3] == 1, s[4] == y}, s, {m, Max[n, 5 - n]}] // Last // Factor // Expand // Length];

Formula

a(n) = a(5-n) for all n in Z.

Extensions

a(31)-a(34) from Jinyuan Wang, Feb 14 2021