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-10 of 15 results. Next

A129654 Number of different ways to represent n as general polygonal number P(m,r) = 1/2*r*((m-2)*r-(m-4)) = n>1, for m,r>1.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 2, 2, 4, 3, 2, 3, 2, 2, 4, 3, 2, 3, 3, 2, 3, 4, 2, 3, 2, 2, 3, 3, 3, 5, 2, 2, 3, 3, 2, 3, 2, 2, 5, 3, 2, 3, 3, 2, 4, 3, 2, 3, 4, 2, 3, 3, 2, 3, 2, 2, 3, 4, 3, 5, 2, 2, 3, 4, 2, 3, 2, 2, 4, 3, 2, 4, 2, 2, 5, 3, 2, 3, 3, 2, 3, 3, 2, 3, 4, 3, 3, 3, 3, 4, 2, 2, 3, 4, 2, 3, 2, 2, 5, 3
Offset: 2

Views

Author

Alexander Adamchuk, Apr 27 2007

Keywords

Comments

The indices k of the first appearance of number n in a(k) are listed in A063778(n) = {2,3,6,15,36,225,...} = Least number k>1 such that k could be represented in n different ways as general m-gonal number P(m,r) = 1/2*r*((m-2)*r-(m-4)).
From Gus Wiseman, May 03 2019: (Start)
Also the number of integer partitions of n whose augmented differences are all equal, where the augmented differences aug(y) of an integer partition y of length k are given by aug(y)i = y_i - y{i + 1} + 1 if i < k and aug(y)_k = y_k; for example aug(6,5,5,3,3,3) = (2,1,3,1,1,3). Equivalently, a(n) is the number of integer partitions of n whose differences are all equal to the last part minus one. The Heinz numbers of these partitions are given by A307824. For example, the a(35) = 5 partitions are:
(35)
(23,12)
(11,9,7,5,3)
(8,7,6,5,4,3,2)
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
(End)

Examples

			a(6) = 3 because 6 = P(2,6) = P(3,3) = P(6,2).
		

Crossrefs

Programs

  • Maple
    A129654 := proc(n) local resul, dvs, i, r, m ;
       dvs := numtheory[divisors](2*n) ;
       resul := 0 ;
       for i from 1 to nops(dvs) do
          r := op(i, dvs) ;
          if r > 1 then
             m := (2*n/r-4+2*r)/(r-1) ;
             if is(m, integer) then
                resul := resul+1 ;
             fi ;
          fi ;
       od ;
       RETURN(resul) ;
    end: # R. J. Mathar, May 14 2007
  • Mathematica
    a[n_] := (dvs = Divisors[2*n]; resul = 0; For[i = 1, i <= Length[dvs], i++, r = dvs[[i]]; If[r > 1, m = (2*n/r-4+2*r)/(r-1); If[IntegerQ[m], resul = resul+1 ] ] ]; resul); Table[a[n], {n, 2, 106}] (* Jean-François Alcover, Sep 13 2012, translated from R. J. Mathar's Maple program *)
    Table[Length[Intersection[Divisors[2 n - 2] + 1, Divisors[2 n]]], {n, 2, 106}] (* Jonathan Sondow, May 09 2014 *)
    atpms[n_]:=Select[Join@@Table[i*Range[k,1,-1],{k,n},{i,0,n}],Total[#+1]==n&];
    Table[Length[atpms[n]],{n,100}] (* Gus Wiseman, May 03 2019 *)
  • PARI
    a(n) = sumdiv(2*n, d, (d>1) && (2*n/d + 2*d - 4) % (d-1) == 0); \\ Daniel Suteu, Dec 22 2018

Formula

a(n) = A177025(n) + 1.
G.f.: x * Sum_{k>=1} x^k / (1 - x^(k*(k + 1)/2)) (conjecture). - Ilya Gutkovskiy, Apr 09 2020

A177025 Number of ways to represent n as a polygonal number.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 3, 2, 1, 2, 2, 1, 2, 3, 1, 2, 1, 1, 2, 2, 2, 4, 1, 1, 2, 2, 1, 2, 1, 1, 4, 2, 1, 2, 2, 1, 3, 2, 1, 2, 3, 1, 2, 2, 1, 2, 1, 1, 2, 3, 2, 4, 1, 1, 2, 3, 1, 2, 1, 1, 3, 2, 1, 3, 1, 1, 4, 2, 1, 2, 2, 1, 2, 2, 1, 2, 3, 2, 2, 2, 2, 3, 1, 1, 2, 3
Offset: 3

Views

Author

Vladimir Shevelev, May 01 2010

Keywords

Comments

Frequency of n in the array A139601 or A086270 of polygonal numbers.
Since n is always n-gonal number, a(n) >= 1.
Conjecture: Every positive integer appears in the sequence.
Records of 2, 3, 4, 5, ... are reached at n = 6, 15, 36, 225, 561, 1225, ... see A063778. [R. J. Mathar, Aug 15 2010]

References

  • J. J. Tattersall, Elementary Number Theory in Nine chapters, 2nd ed (2005), Cambridge Univ. Press, page 22 Problem 26, citing Wertheim (1897)

Crossrefs

Programs

  • Maple
    A177025 := proc(p)
        local ii,a,n,s,m ;
        ii := 2*p ;
        a := 0 ;
        for n in numtheory[divisors](ii) do
            if n > 2 then
                s := ii/n ;
                if (s-2) mod (n-1) = 0 then
                    a := a+1 ;
                end if;
            end if;
        end do:
        return a;
    end proc: # R. J. Mathar, Jan 10 2013
  • Mathematica
    nn = 100; t = Table[0, {nn}]; Do[k = 2; While[p = k*((n - 2) k - (n - 4))/2; p <= nn, t[[p]]++; k++], {n, 3, nn}]; t (* T. D. Noe, Apr 13 2011 *)
    Table[Length[Intersection[Divisors[2 n - 2] + 1, Divisors[2 n]]] - 1, {n, 3, 100}] (* Jonathan Sondow, May 09 2014 *)
  • PARI
    a(n) = sum(i=3, n, ispolygonal(n, i)); \\ Michel Marcus, Jul 08 2014
    
  • Python
    from sympy import divisors
    def a(n):
        i=2*n
        x=0
        for d in divisors(i):
            if d>2:
                s=i/d
                if (s - 2)%(d - 1)==0: x+=1
        return x # Indranil Ghosh, Apr 28 2017, translated from Maple code by R. J. Mathar

Formula

a(n) = A129654(n) - 1.
G.f.: x * Sum_{k>=2} x^k / (1 - x^(k*(k + 1)/2)) (conjecture). - Ilya Gutkovskiy, Apr 09 2020

Extensions

Extended by R. J. Mathar, Aug 15 2010

A177028 Irregular table: row n contains values k (in descending order) for which n is a k-gonal number.

Original entry on oeis.org

3, 4, 5, 6, 3, 7, 8, 9, 4, 10, 3, 11, 12, 5, 13, 14, 15, 6, 3, 16, 4, 17, 18, 7, 19, 20, 21, 8, 3, 22, 5, 23, 24, 9, 25, 4, 26, 27, 10, 28, 6, 3, 29, 30, 11, 31, 32, 33, 12, 34, 7, 35, 5, 36, 13, 4, 3, 37, 38, 39, 14, 40, 8, 41, 42, 15
Offset: 3

Views

Author

Vladimir Shevelev, May 01 2010

Keywords

Comments

Every row begins with n and contains all values of k for which n is a k-gonal number.
The cardinality of row n is A177025(n). In particular, if n is prime, then row n contains only n.

Examples

			The table starts with row n=3 as:
3;
4;
5;
6, 3;
7;
8;
9, 4;
10, 3;
11;
12, 5;
13;
14;
15, 6, 3;
16, 4;
17;
18, 7;
19;
20;
Before n=37, we have row n=36: {36, 13, 4, 3}. Thus 36 is k-gonal for k=3, 4, 13 and 36.
		

Crossrefs

Programs

  • Maple
    P := proc(n,k) n/2*((k-2)*n-k+4) ;end proc:
    A177028 := proc(n) local k ,j,r,kg ; r := {} ; for k from n to 3 by -1 do for j from 1 do kg := P(j,k) ; if kg = n then r := r union {k} ;elif kg > n then break ; end if; end do; end do: sort(convert(r,list),`>`) ; end proc:
    for n from 3 to 20 do print(A177028(n)) ; end do: # R. J. Mathar, Apr 17 2011
  • Mathematica
    nn = 100; t = Table[{}, {nn}]; Do[n = 2; While[p = n*(4 - 2*n - r + n*r)/2; p <= nn, AppendTo[t[[p]], r]; n++], {r, 3, nn}]; Flatten[Reverse /@ t] (* T. D. Noe, Apr 18 2011 *)
  • PARI
    row(n) = my(list = List()); for (k=3, n, if (ispolygonal(n, k), listput(list, k))); Vecrev(list); \\ Michel Marcus, Mar 19 2021
    
  • PARI
    row(n)=my(v=List());fordiv(2*n,k, if(k<2,next); if(k==n, break); my(s=(2*n/k-4+2*k)/(k-1)); if(denominator(s)==1, listput(v,s))); Vec(v) \\ Charles R Greathouse IV, Mar 19 2021

A320943 Numbers that have exactly 26 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.

Original entry on oeis.org

1559439365121, 2468046593376, 7760419091425
Offset: 1

Views

Author

Hugh Erling, Oct 24 2018

Keywords

Examples

			a(1): 1559439365121 has representations P(n,k) = P(3, 519813121708)=P(6, 103962624343)=P(9, 43317760144)=P(11, 28353443004)=P(18, 10192414153)=P(27, 4442847196)=P(33, 2953483648)=P(57, 977092336)=P(66, 727011361)=P(69, 664722664)=P(81, 481308448)=P(86, 426659199)=P(129, 188885584)=P(131, 183140268)=P(171, 107288572)=P(209, 71744544)=P(237, 55761976)=P(414, 18240979)=P(473, 13969968)=P(513, 11874388)=P(711, 6178324)=P(729, 5876784)=P(1881, 881968)=P(3537, 249376)=P(16899, 10924)=P(720981, 8).
a(2): 2468046593376 has representations P(n,k) = P(3, 822682197793)=P(6, 164536439560)=P(12, 37394645356)=P(18, 16131023488)=P(24, 8942197804)=P(26, 7593989520)=P(39, 3330697159)=P(42, 2866488496)=P(56, 1602627660)=P(72, 965589436)=P(84, 707988124)=P(96, 541238290)=P(116, 370021980)=P(126, 313402744)=P(392, 32204796)=P(416, 28591830)=P(576, 14903665)=P(647, 11809911)=P(783, 8061483)=P(936, 5640220)=P(1827, 1479601)=P(2912, 582306)=P(4302, 266776)=P(5823, 145603)=P(7056, 99160)=P(145551, 235).
a(3): 7760419091425 has representations P(n,k) = P(5, 776041909144)=P(7, 369543766260)=P(10, 172453757589)=P(13, 99492552456)=P(19, 45382567788)=P(25, 25868063640)=P(35, 13042721164)=P(37, 11652280920)=P(49, 6598995828)=P(55, 5225871444)=P(65, 3730970719)=P(82, 2336771785)=P(143, 764347396)=P(145, 743335164)=P(154, 658723293)=P(205, 371134344)=P(290, 185190769)=P(325, 147396376)=P(475, 68935548)=P(1225, 10351368)=P(1378, 8179601)=P(1729, 5194893)=P(2755, 2045644)=P(7585, 269814)=P(1969825, 6)=P(3939649, 3).
		

Crossrefs

Programs

A321156 Numbers that have exactly 5 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.

Original entry on oeis.org

561, 1485, 1701, 2016, 2556, 2601, 2850, 3025, 3060, 3256, 3321, 4186, 4761, 4851, 5226, 5320, 5565, 5841, 6175, 6216, 6336, 6525, 6670, 7425, 7821, 7840, 8001, 8100, 8625, 8646, 9730, 9856, 9945, 9976, 10116, 10296, 10450, 10585, 11025, 11305, 11340, 12025, 12090
Offset: 1

Views

Author

Hugh Erling, Oct 28 2018

Keywords

Comments

n | 2*m where m is a term in this sequence. - David A. Corneth, Oct 29 2018

Examples

			561 has representations P(3, 188)=P(6, 39)=P(11, 12)=P(17, 6)=P(33, 3).
1485 has representations P(3, 496)=P(5, 150)=P(9, 43)=P(15, 16)=P(54, 3).
1701 has representations P(3, 568)=P(6, 115)=P(9, 49)=P(18, 13)=P(21, 10).
		

Crossrefs

Programs

  • PARI
    isok(n) = sum(k=3, n-1, ispolygonal(n, k)) == 5; \\ Michel Marcus, Oct 29 2018
    
  • PARI
    is(n) = my(d=divisors(n<<1)); sum(i=2, #d, k=2*(d[i]^2 - 2 * d[i] + n) / (d[i] - 1) / d[i]; k == k\1 && min(d[i], k) >=3) == 5 \\ David A. Corneth, Oct 29 2018

A321157 Numbers that have exactly 7 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.

Original entry on oeis.org

11935, 12376, 21736, 24220, 41041, 45441, 51360, 52326, 53361, 54145, 54405, 58311, 58696, 73360, 82720, 89425, 90321, 96580, 101025, 102025, 108801, 113050, 117216, 118405, 122265, 122500, 122760, 123201, 123256, 127281, 128961, 135201, 144585, 152076, 165376, 166635, 169456, 174097
Offset: 1

Views

Author

Hugh Erling, Oct 29 2018

Keywords

Examples

			11935 has representations P(n,k) = P(5, 1195) = P(7, 570) = P(10, 267) = P(14, 133) = P(35, 22) = P(55, 10) = P(154, 3).
12376 has representations P(n,k) = P(4, 2064) = P(7, 591) = P(16, 105) = P(26, 40) = P(34, 24) = P(56, 10) = P(91, 5).
21736 has representations P(n,k) = P(4, 3624) = P(8, 778) = P(11, 397) = P(16, 183) = P(19, 129) = P(22, 96) = P(208, 3).
		

Crossrefs

A321158 Numbers that have exactly 8 representations as a k-gonal number, P(m,k) = m*((k-2)*m - (k-4))/2, k and m >= 3.

Original entry on oeis.org

11781, 61776, 75141, 133056, 152361, 156520, 176176, 179740, 188650, 210925, 241605, 266085, 292825, 298936, 338625, 342585, 354025, 358281, 360801, 365365, 371925, 391392, 395200, 400960, 417340, 419805, 424270, 438516
Offset: 1

Views

Author

Hugh Erling, Oct 29 2018

Keywords

Examples

			a(1) 11781 has representations P(m,k) = P(3, 3928)=P(6, 787)=P(9,329)=P(11, 216)=P(21, 58)=P(63, 8)=P(77, 6)=P(153, 3).
a(2) 61776 has representations P(m,k) = P(3, 20593)=P(6, 4120)=P(8,2208)=P(11, 1125)=P(26, 192)=P(36, 100)=P(176, 6)=P(351, 3).
a(3) 75141 has representations P(m,k) = P(3, 25048)=P(6, 5011)=P(9,2089)=P(11, 1368)=P(18, 493)=P(27, 216)=P(66, 37)=P(69, 34).
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Module[{k}, Sum[Boole[d >= 3 && (k = 2(d^2 - 2d + n)/(d^2 - d); IntegerQ[k] && k >= 3)], {d, Divisors[2n]}]];
    Select[Range[500000], r[#] == 8&] (* Jean-François Alcover, Sep 23 2019, after Andrew Howroyd *)
  • PARI
    r(n)={sumdiv(2*n, d, if(d>=3, my(k=2*(d^2 - 2*d + n)/(d^2 - d)); !frac(k) && k>=3))}
    for(n=1, 5*10^5, if(r(n)==8, print1(n, ", "))) \\ Andrew Howroyd, Nov 26 2018
  • Python
    # See link.
    

A321159 Numbers that have exactly 9 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.

Original entry on oeis.org

27405, 126225, 194481, 201825, 273105, 478401, 538461, 615681, 718641, 859600, 862785, 1056160, 1187145, 1257201, 1328481, 1413126, 1439361, 1532601, 1540540, 1619541, 1625625, 1708785, 1842400, 1849926, 1890945
Offset: 1

Views

Author

Hugh Erling, Oct 29 2018

Keywords

Examples

			a(1) 27405 has representations P(n,k) = P(3, 9136)=P(5, 2742)=P(9, 763)=P(14, 303)=P(18, 181)=P(27, 80)=P(35, 48)=P(63, 16)=P(105, 7).
a(2) 126225 has representations P(n,k) = P(3, 42076)=P(5, 12624)=P(9, 3508)=P(15, 1204)=P(17, 930)=P(33, 241)=P(50, 105)=P(99, 28)=P(225, 7).
a(3) 194481 has representations P(n,k) = P(3, 64828)=P(6, 12967)=P(9, 5404)=P(14, 2139)=P(18, 1273)=P(21, 928)=P(27, 556)=P(81, 62)=P(441, 4).
		

Crossrefs

Programs

  • PARI
    isok(n) = sum(k=3, n-1, ispolygonal(n, k)) == 9; \\ Michel Marcus, Nov 02 2018
  • Python
    # See Erling link.
    

A321160 Numbers that have exactly 10 representations as a k-gonal number, P(n,k) = n*((k-2)*n - (k-4))/2, k and n >= 3.

Original entry on oeis.org

220780, 519156, 1079001, 1154440, 1324576, 1447551, 2429505, 2454705, 2491776, 2603601, 2665125, 2700621, 2772225, 2953665, 3000025, 3086721, 3316600, 3665376, 4488561, 4741660, 5142501, 5388201, 5785101, 6076225
Offset: 1

Views

Author

Hugh Erling, Oct 29 2018

Keywords

Examples

			a(1) 220780 has representations P(n,k) = P(4, 36798) = P(7, 10515) = P(10, 4908) = P(14, 2428) = P(19, 1293) = P(28, 586) = P(35, 373) = P(38, 316) = P(40, 285) = P(664, 3).
a(2) 519156 has representations P(n,k) = P(3, 173053) = P(6, 34612) = P(8, 18543) = P(11, 9441) = P(27, 1481) = P(36, 826) = P(66, 244) = P(92, 126) = P(99, 109) = P(456, 7).
a(3) 1079001 has representations P(n,k) = P(3, 359668) = P(6, 71935) = P(9, 29974) = P(11, 19620) = P(14, 11859) = P(21, 5140) = P(27, 3076) = P(66, 505) = P(81, 335) = P(126, 139).
		

Crossrefs

Programs

  • PARI
    isok(n) = sum(k=3, n-1, ispolygonal(n, k)) == 10; \\ Michel Marcus, Nov 02 2018
  • Python
    # See links.
    

A333916 a(n) is the least integer that is pyramidal in exactly n ways.

Original entry on oeis.org

4, 10, 30, 550, 1540, 48070, 223300, 2634940, 402610950, 1570545340, 13960282700, 5677137442900, 248297918605660
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 09 2020

Keywords

Comments

a(n) has exactly n representations as an m-gonal pyramidal number P(m, k) = k*(k + 1)*(k*(m - 2) - m + 5) / 6, with m > 2, k > 1.
a(12) > 5*10^11. - Giovanni Resta, Apr 11 2020

Examples

			a(3) = 30 because 30 is the least integer which is pyramidal in 3 ways (30 is the fourth square pyramidal number, the third octagonal pyramidal number and also the second 31-gonal pyramidal number).
		

Crossrefs

Extensions

a(9) from Jinyuan Wang, Apr 10 2020
a(10)-a(11) from Giovanni Resta, Apr 10 2020
a(12)-a(13) from Bert Dobbelaere, Apr 12 2020
Showing 1-10 of 15 results. Next