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.

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

This page as a plain text file.
%I A177028 #20 Mar 26 2021 06:32:14
%S A177028 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,
%T A177028 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,
%U A177028 36,13,4,3,37,38,39,14,40,8,41,42,15
%N A177028 Irregular table: row n contains values k (in descending order) for which n is a k-gonal number.
%C A177028 Every row begins with n and contains all values of k for which n is a k-gonal number.
%C A177028 The cardinality of row n is A177025(n). In particular, if n is prime, then row n contains only n.
%H A177028 T. D. Noe, <a href="/A177028/b177028.txt">Rows n = 3..1000, flattened</a>
%e A177028 The table starts with row n=3 as:
%e A177028 3;
%e A177028 4;
%e A177028 5;
%e A177028 6, 3;
%e A177028 7;
%e A177028 8;
%e A177028 9, 4;
%e A177028 10, 3;
%e A177028 11;
%e A177028 12, 5;
%e A177028 13;
%e A177028 14;
%e A177028 15, 6, 3;
%e A177028 16, 4;
%e A177028 17;
%e A177028 18, 7;
%e A177028 19;
%e A177028 20;
%e A177028 Before n=37, we have row n=36: {36, 13, 4, 3}. Thus 36 is k-gonal for k=3, 4, 13 and 36.
%p A177028 P := proc(n,k) n/2*((k-2)*n-k+4) ;end proc:
%p A177028 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:
%p A177028 for n from 3 to 20 do print(A177028(n)) ; end do: # _R. J. Mathar_, Apr 17 2011
%t A177028 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 *)
%o A177028 (PARI) row(n) = my(list = List()); for (k=3, n, if (ispolygonal(n, k), listput(list, k))); Vecrev(list); \\ _Michel Marcus_, Mar 19 2021
%o A177028 (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
%Y A177028 Cf. A063778, A090467, A139600, A177025, A176948, A176774, A176775.
%K A177028 nonn,tabf,easy
%O A177028 3,1
%A A177028 _Vladimir Shevelev_, May 01 2010