A262944 Number of ordered pairs (x,y) with x >= 0 and y > 0 such that n - x^4 - y*(y+1)/2 is a square or a pentagonal number.
1, 2, 2, 2, 2, 3, 4, 3, 1, 3, 5, 3, 2, 2, 5, 5, 3, 3, 5, 5, 3, 6, 6, 3, 3, 8, 6, 5, 5, 3, 7, 5, 5, 3, 4, 4, 8, 9, 3, 5, 7, 6, 3, 5, 5, 7, 5, 3, 4, 5, 6, 6, 9, 4, 5, 7, 7, 5, 4, 4, 7, 6, 1, 5, 5, 7, 7, 7, 1, 6, 10, 8, 6, 3, 4, 3, 6, 4, 6, 9, 5, 7, 9, 3, 5, 8, 9, 8, 3, 3, 11, 10, 6, 6, 8, 12, 5, 6, 4, 7
Offset: 1
Keywords
Examples
a(1) = 1 since 1 = 0^4 + 1*2/2 + p_5(0), where p_5(n) denotes the pentagonal number n*(3*n-1)/2. a(9) = 1 since 9 = 1^4 + 2*3/2 + p_5(2). a(63) = 1 since 63 = 0^4 + 7*8/2 + p_5(5). a(69) = 1 since 69 = 2^4 + 7*8/2 + 5^2. a(489) = 1 since 489 = 3^4 + 12*13/2 + p_5(15). a(714) = 1 since 714 = 4^4 + 18*19/2 + p_5(14). a(1089) = 1 since 1089 = 4^4 + 38*39/2 + p_5(8).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
Crossrefs
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]]||(IntegerQ[Sqrt[24n+1]]&&Mod[Sqrt[24n+1]+1,6]==0) Do[r=0;Do[If[SQ[n-x^4-y(y+1)/2],r=r+1],{x,0,n^(1/4)},{y,1,(Sqrt[8(n-x^4)+1]-1)/2}];Print[n," ",r];Continue,{n,1,100}]
Comments