A274794 Numbers n such that n^3 is the sum of two triangular numbers in exactly one way.
0, 1, 3, 4, 7, 9, 10, 19, 24, 25, 34, 37, 39, 42, 49, 54, 55, 72, 73, 78, 85, 87, 93, 94, 102, 108, 109, 118, 138, 142, 147, 157, 160, 165, 168, 175, 192, 195, 202, 210, 214, 220, 228, 232, 243, 247, 249, 250, 252, 253, 258, 267, 273, 274, 279, 289, 297, 312, 333
Offset: 1
Keywords
Examples
3 is a term because 3^3 = 27 = 6 + 21.
Programs
-
Mathematica
Select[Range@ 333, Length[PowersRepresentations[4 #^3 + 1, 2, 2]] == 1 &] (* after Ant King at A052343, or *) nn = 20; t = (#^2 + #)/2 & /@ Range[0, nn^3]; Select[Range[0, nn], Function[n, Count[Transpose@ {#, n^3 - #} &@ Range[0, Floor[n^3/2]], k_ /; Times @@ Boole@ Map[MemberQ[t, #] &, k] == 1] == 1]] (* Michael De Vlieger, Jul 07 2016 *)
-
PARI
a052343(n) = sum(i=0, (sqrtint(4*n + 1) - 1)\2, issquare(n - i - i^2)); lista(nn) = for(n=0, nn, if(a052343(n^3) == 1, print1(n, ", ")));
Comments