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.

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

This page as a plain text file.
%I A177025 #35 Apr 09 2020 23:49:40
%S A177025 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,
%T A177025 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,
%U A177025 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
%N A177025 Number of ways to represent n as a polygonal number.
%C A177025 Frequency of n in the array A139601 or A086270 of polygonal numbers.
%C A177025 Since n is always n-gonal number, a(n) >= 1.
%C A177025 Conjecture: Every positive integer appears in the sequence.
%C A177025 Records of 2, 3, 4, 5, ... are reached at n = 6, 15, 36, 225, 561, 1225, ... see A063778. [_R. J. Mathar_, Aug 15 2010]
%D A177025 J. J. Tattersall, Elementary Number Theory in Nine chapters, 2nd ed (2005), Cambridge Univ. Press, page 22 Problem 26, citing Wertheim (1897)
%H A177025 T. D. Noe, <a href="/A177025/b177025.txt">Table of n, a(n) for n = 3..10000</a>
%H A177025 E. Deza and M. Deza, <a href="http://www.worldscientific.com/doi/suppl/10.1142/8188/suppl_file/8188_chap01.pdf">Figurate Numbers</a>, World Scientific, 2012; see p. 45.
%F A177025 a(n) = A129654(n) - 1.
%F A177025 G.f.: x * Sum_{k>=2} x^k / (1 - x^(k*(k + 1)/2)) (conjecture). - _Ilya Gutkovskiy_, Apr 09 2020
%p A177025 A177025 := proc(p)
%p A177025     local ii,a,n,s,m ;
%p A177025     ii := 2*p ;
%p A177025     a := 0 ;
%p A177025     for n in numtheory[divisors](ii) do
%p A177025         if n > 2 then
%p A177025             s := ii/n ;
%p A177025             if (s-2) mod (n-1) = 0 then
%p A177025                 a := a+1 ;
%p A177025             end if;
%p A177025         end if;
%p A177025     end do:
%p A177025     return a;
%p A177025 end proc: # _R. J. Mathar_, Jan 10 2013
%t A177025 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 *)
%t A177025 Table[Length[Intersection[Divisors[2 n - 2] + 1, Divisors[2 n]]] - 1, {n, 3, 100}] (* _Jonathan Sondow_, May 09 2014 *)
%o A177025 (PARI) a(n) = sum(i=3, n, ispolygonal(n, i)); \\ _Michel Marcus_, Jul 08 2014
%o A177025 (Python)
%o A177025 from sympy import divisors
%o A177025 def a(n):
%o A177025     i=2*n
%o A177025     x=0
%o A177025     for d in divisors(i):
%o A177025         if d>2:
%o A177025             s=i/d
%o A177025             if (s - 2)%(d - 1)==0: x+=1
%o A177025     return x # _Indranil Ghosh_, Apr 28 2017, translated from Maple code by _R. J. Mathar_
%Y A177025 Cf. A129654, A139601, A090428, A176949, A176948, A176774, A176744, A176747, A176775, A175873, A176874.
%K A177025 nonn
%O A177025 3,4
%A A177025 _Vladimir Shevelev_, May 01 2010
%E A177025 Extended by _R. J. Mathar_, Aug 15 2010