A165141 The least positive integer that can be written in exactly n ways as the sum of a square, a pentagonal number and a hexagonal number.
3, 9, 1, 6, 16, 36, 50, 37, 66, 82, 167, 121, 162, 236, 226, 276, 302, 446, 478, 532, 457, 586, 677, 521, 666, 852, 976, 877, 1006, 1046, 1277, 1381, 1857, 1556, 1507, 1657, 1832, 1732, 2336, 2299, 2007, 2677, 2326, 2117, 2591, 2502, 2516, 2592, 3106, 3557
Offset: 1
Examples
For n=5 the a(5)=16 solutions are 0^2+1+15 = 1^2+0+15 = 2^2+12+0 = 3^2+1+6 = 4^2+0+0 = 16.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..2658(terms 1..913 from Quig-Hu Hou)
- F. Ge and Z. W. Sun, On some universal sums of generalized polygonal numbers, preprint, arXiv:0906.2450 [math.NT], 2009-2016.
- M. B. Nathanson, A short proof of Cauchy's polygonal number theorem, Proc. Amer. Math. Soc. 99(1987), 22-24.
- Zhi-Wei Sun, A challenging conjecture on sums of polygonal number (a message to Number Theory List), 2009.
- Zhi-Wei Sun, Polygonal numbers, primes and ternary quadratic forms (a talk given at a number theory conference), 2009.
- Zhi-Wei Sun, Mixed Sums of Primes and Other Terms (a webpage).
- Zhi-Wei Sun, On universal sums of polygonal numbers, preprint, arXiv:0905.0635 [math.NT], 2009-2015.
Programs
-
Mathematica
SQ[x_] := x>-1 && IntegerPart[Sqrt[x]]^2==x; RN[n_] := RN[n] = Sum[If[SQ[n - (3 y^2 - y)/2 - (2 z^2 - z)], 1, 0], {y, 0, (1 + Sqrt[1 + 24 n])/6}, {z, 0, (1 + Sqrt[8 (n - (3 y^2 - y)/2) + 1])/4}] (* iterators modified by Robert G. Wilson v, Apr 05 2025 *); Do[Do[If[RN[m]==n,Print[n," ", m];Goto[aa]],{m,1,1000000}];Label[aa];Continue,{n,1,100}] f = Compile[{{n, Integer}}, Block[{cnt = 0, pentind, hex, hexind = Floor[(1 + Sqrt[8n +1])/4]}, While[ hexind > -1, hex = hexind (2 hexind - 1); pentind = Floor[(1 + Sqrt[1 + 24 (n - hex)])/6]; While[pentind > -1, If[ Floor[ Sqrt[ n - hex - pentind (3 pentind - 1)/2]]^2 == n - hex - pentind (3 pentind - 1)/2, cnt++]; pentind--]; hexind--]; cnt]]; t[] := 0; k = 1; While[k < 100001, If[ t[f[k]] == 0, t[f[k]] = k]; k++]; t /@ Range@ 250 (* Robert G. Wilson v, Apr 04 2025 *)
Formula
a(n) = min{m>0: m=x^2+(3y^2-y)/2+(2z^2-z) has exactly n solutions with x,y,z=0,1,2,...}.
Comments