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

A217367 a(n) = ((n+7) / gcd(n+7,4)) * (n / gcd(n,4)).

Original entry on oeis.org

0, 2, 9, 15, 11, 15, 39, 49, 30, 36, 85, 99, 57, 65, 147, 165, 92, 102, 225, 247, 135, 147, 319, 345, 186, 200, 429, 459, 245, 261, 555, 589, 312, 330, 697, 735, 387, 407, 855, 897, 470, 492, 1029, 1075, 561, 585, 1219, 1269, 660, 686, 1425, 1479, 767, 795, 1647
Offset: 0

Views

Author

Jean-François Alcover, Oct 01 2012

Keywords

Comments

The 7th sequence (p=7) of the family A060819(n)*A060819(n+p).

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2+3*x+6*x^4-6*x^5+4*x^6-3*x^7)/(1-x+x^2-x^3)^3)); // G. C. Greubel, Sep 20 2018
  • Mathematica
    a[n_] := n*(n+7)/(2*Mod[1 + Floor[n/2], 2] + 2); Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 01 2012 *)
    CoefficientList[Series[x (2 + 3 x + 6 x^4 - 6 x^5 + 4 x^6 - 3 x^7) / (1 - x + x^2 - x^3)^3, {x, 0, 33}], x] (* Vincenzo Librandi, Jul 17 2013 *)
  • PARI
    my(x='x+O('x^50)); Vec(x*(2+3*x+6*x^4-6*x^5+4*x^6-3*x^7)/(1-x+x^2-x^3)^3) \\ G. C. Greubel, Sep 20 2018
    

Formula

a(n) = n*(n+7)/(2*mod(1 + floor(n/2), 2) + 2).
G.f.: x*(2 + 3*x + 6*x^4 - 6*x^5 + 4*x^6 - 3*x^7)/(1 - x + x^2 - x^3)^3.
From Peter Bala, Aug 07 2022: (Start)
a(n) = numerator of n*(n+7)/4.
a(n) is quasi-polynomial in n: if p(n) = n*(n+7)/4 then a(4*n) = p(4*n), a(4*n+1) = p(4*n+1), a(4*n+2) = 2*p(4*n+2) and a(4*n+3) = 2*p(4*n+3) = A303295(n+1) for n >= 1. (End)
Sum_{n>=1} 1/a(n) = 697/735 + Pi/14. - Amiram Eldar, Aug 16 2022

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
Showing 1-2 of 2 results.