A225103 Numbers that can be represented as a sum of two distinct nontrivial prime powers in two or more ways.
36, 41, 57, 89, 113, 129, 130, 137, 153, 177, 185, 297, 305, 368, 370, 377, 410, 425, 537, 545, 561, 593, 633, 650, 657, 850, 857, 868, 873, 890, 969, 986, 1010, 1130, 1385, 1490, 1690, 1730, 1802, 1865, 1881, 1898, 1970, 2210, 2213, 2217, 2236, 2330, 2337
Offset: 1
Keywords
Examples
36 = 32 + 4 = 27 + 9, so 36 is in the sequence. 41 = 32 + 9 = 25 + 16, so 41 is in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 10^4: # to get all terms <= N PP:= [seq(seq(p^k, k=2..floor(log[p](N))),p = select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]))]: npp:= nops(PP): res:= {}: R:= 'R': for i from 2 to npp do for j from 1 to i-1 do q:= PP[i]+PP[j]; if assigned(R[q]) then res:= res union {q} else R[q]:= 1 fi od od: sort(convert(res,list)); # Robert Israel, Feb 17 2017
-
Mathematica
nn = 2409; p = Sort[Flatten[Table[Prime[n]^i, {n, PrimePi[Sqrt[nn]]}, {i, 2, Log[Prime[n], nn]}]]]; Transpose[Sort[Select[Tally[Flatten[Table[p[[i]] + p[[j]], {i, Length[p] - 1}, {j, i + 1, Length[p]}]]], #[[1]] <= nn && #[[2]] > 1 &]]][[1]] (* T. D. Noe, Apr 29 2013 *)
Comments