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-4 of 4 results.

A048901 Indices of hexagonal numbers which are also heptagonal.

Original entry on oeis.org

1, 247, 79453, 25583539, 8237820025, 2652552464431, 854113655726677, 275021944591525483, 88556212044815478769, 28514825256485992638055, 9181685176376444813974861, 2956474111967958744107267107
Offset: 1

Views

Author

Keywords

Comments

As n increases, this sequence is approximately geometric with common ratio r = lim_{n->infinity} a(n)/a(n-1) = (2 + sqrt(5))^4 = 161 + 72*sqrt(5). - Ant King, Dec 24 2011

Crossrefs

Programs

  • Magma
    I:=[1, 247, 79453]; [n le 3 select I[n] else 323*Self(n-1)-323*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Dec 28 2011
  • Mathematica
    LinearRecurrence[{323, -323, 1}, {1, 247, 79453}, 12]; (* Ant King, Dec 24 2011 *)

Formula

G.f.: x*(-1 + 76*x + 5*x^2) / ( (x-1)*(x^2 - 322*x + 1) ). - R. J. Mathar, Dec 21 2011
From Ant King, Dec 24 2011: (Start)
a(n) = 322*a(n-1) - a(n-2) - 80.
a(n) = (1/40)*sqrt(5)*((1+sqrt(5))*(sqrt(5)+2)^(4*n-3) + (1-sqrt(5))*(sqrt(5)-2)^(4*n-3) + 2*sqrt(5)).
a(n) = ceiling((1/40)*sqrt(5)*(1+sqrt(5))*(sqrt(5)+2)^(4*n-3)).
(End)

A048902 Indices of heptagonal numbers (A000566) which are also hexagonal.

Original entry on oeis.org

1, 221, 71065, 22882613, 7368130225, 2372515049741, 763942477886281, 245987105364332645, 79207083984837225313, 25504435056012222218045, 8212348880951950716985081, 2644350835231472118646977941
Offset: 1

Views

Author

Keywords

Comments

As n increases, this sequence is approximately geometric with common ratio r = lim_{n->infinity} a(n)/a(n-1) = (2 + sqrt(5))^4 = 161 + 72*sqrt(5). - Ant King, Dec 26 2011

Crossrefs

Programs

  • Magma
    I:=[1, 221, 71065]; [n le 3 select I[n] else 323*Self(n-1)-323*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Dec 28 2011
  • Mathematica
    LinearRecurrence[{323, -323, 1}, {1, 221, 71065}, 12]; (* Ant King, Dec 26 2011 *)

Formula

G.f.: -x*(1 - 102*x + 5*x^2) / ( (x-1)*(x^2 - 322*x + 1) ). - R. J. Mathar, Dec 21 2011
From Ant King, Dec 26 2011: (Start)
a(n) = 322*a(n-1) - a(n-2) - 96.
a(n) = (1/20)*((sqrt(5)+1)*(sqrt(5)+2)^(4*n-3) + (sqrt(5)-1)*(sqrt(5)-2)^(4*n-3) + 6).
a(n) = ceiling((1/20)*(sqrt(5)+1)*(sqrt(5)+2)^(4*n-3)).
(End)

A342300 Least nonnegative number greater than the previous number which is simultaneously an n-gonal and (n+1)-gonal number.

Original entry on oeis.org

0, 1, 3, 36, 9801, 40755, 121771, 297045, 631125, 1212751, 2158695, 3617601, 5773825, 8851275, 13117251, 18886285, 26523981, 36450855, 49146175, 65151801, 85076025, 109597411, 139468635, 175520325, 218664901, 269900415, 330314391, 401087665, 483498225, 578925051, 688851955, 814871421
Offset: 0

Views

Author

Robert G. Wilson v, Jun 04 2021

Keywords

Comments

Also the least nontrivial number simultaneously an n and (n+1)-gonal number for n greater than one.
0 and 1 are always terms of any sequence of polygonal numbers of a particular rank beginning with index 0.
Since the formula for the k-th n-gonal number P(n,k) is k*(4+k*(n-2)-n)/2, one can extrapolate for the non-geometrical terms 0, 1 and 2.
Indices of the n and (n+1)-gonal numbers by pairs: {0, 0} {1, 1}, {3, 2}, {8, 6}, {99, 81}, {165, 143}, {247, 221}, {345, 315}, {459, 425}, {589, 551}, {735, 693}, {897, 851} ..., .
{x, y} of the above are {8n^2 + 10n - 3, 8n^2 - 10n - 7} for n>3 (A303295).
In the first 1000 terms, 1 is congruent to 0 (mod 6), 333 are congruent to 1 (mod 6), and 666 are congruent to 3 (mod 6).

Examples

			a(3) is the least triangular and square number > 3, which is 36: A001110(2).
a(4) is the least square and pentagonal number > 36, which is 9801: A036353(2).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Intersection[ Table[ PolygonalNumber[n, i], {i, 2, 10000}], Table[ PolygonalNumber[n + 1, i], {i, 2, 10000}]][[1]]; a[0] = 0; a[1] = 1; Array[a, 30, 0] (* Or *)
    a[n_] := a[n] = 6a[n - 1] -15a[n - 2] +20a[n - 3] -15a[n - 4] +6a[n - 5] -a[n - 6]; a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 36; a[4] = 9801; a[5] = 40755; a[6] = 121771; a[7] = 297045; a[8] = 631125; a[9] = 1212751; Array[a, 30, 0]

Formula

a(n) = 32n^5 - 112n^4 + 70n^3 + 93n^2 - 57n - 35 for n > 3; a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 36.
G.f.: x*(1 - 3*x + 33*x^2 + 9610*x^3 - 17556*x^4 + 23575*x^5 - 17753*x^6 + 7122*x^7 - 1189*x^8)/(1 - x)^6. - Stefano Spezia, Jun 08 2021

A378245 Numbers that are both k-gonal and (k+1)-gonal for some k >= 3.

Original entry on oeis.org

1, 36, 1225, 9801, 40755, 41616, 121771, 297045, 631125, 1212751, 1413721, 2158695, 3617601, 5773825, 8851275, 13117251, 18886285, 26523981, 36450855, 48024900, 49146175, 65151801, 85076025, 94109401, 109597411, 139468635, 175520325, 218664901, 269900415, 330314391
Offset: 1

Views

Author

Kelvin Voskuijl, Nov 20 2024

Keywords

Examples

			a(2) = 36 is both the 8th triangular and the 6th square number.
a(3) = 1225 is both the 49th triangular and the 35th square number.
a(5) = 40755 is both the 165th pentagonal number and the 143th hexagonal number.
		

Crossrefs

Cf. A001110, A036353, A046180, A048903, A048906, A048924 and A203627 (subsequences).
The subdiagonal of A189216 is also a subsequence.

Programs

  • PARI
    upto(limit) = my(terms=List(1)); for(k=3, oo, my(found=0); for(n=2, oo, my(a = (2*n - 1)^2, b = (4*n*(3*n - 5) + 6), c = (8*(n-1)^2 + 1), s = (a*k^2 - b*k + c), v = n * (n*k - k - 2*n + 4) / 2); if(issquare(s), my(t = sqrtint(s) + k - 3); if(t % (2*(k-1)) == 0, listput(terms, v); found += 1)); if(v >= limit, break)); if(found == 0, break)); Vec(vecsort(terms)); \\ Daniel Suteu, Dec 08 2024

Extensions

a(12)-a(30) from Pontus von Brömssen, Dec 07 2024
Showing 1-4 of 4 results.