The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225103 Numbers that can be represented as a sum of two distinct nontrivial prime powers in two or more ways. 5

%I #11 Feb 17 2017 18:50:35

%S 36,41,57,89,113,129,130,137,153,177,185,297,305,368,370,377,410,425,

%T 537,545,561,593,633,650,657,850,857,868,873,890,969,986,1010,1130,

%U 1385,1490,1690,1730,1802,1865,1881,1898,1970,2210,2213,2217,2236,2330,2337

%N Numbers that can be represented as a sum of two distinct nontrivial prime powers in two or more ways.

%C Indices of terms bigger than 1 in A225099.

%C Nontrivial prime powers are numbers of the form p^k where p is a prime number and k >= 2. That is, A025475 except the first term A025475(1) = 1.

%C Only 267 of the terms below 2^34 are odd.

%H Robert Israel, <a href="/A225103/b225103.txt">Table of n, a(n) for n = 1..10000</a>

%e 36 = 32 + 4 = 27 + 9, so 36 is in the sequence.

%e 41 = 32 + 9 = 25 + 16, so 41 is in the sequence.

%p N:= 10^4: # to get all terms <= N

%p PP:= [seq(seq(p^k, k=2..floor(log[p](N))),p = select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]))]:

%p npp:= nops(PP):

%p res:= {}: R:= 'R':

%p for i from 2 to npp do

%p for j from 1 to i-1 do

%p q:= PP[i]+PP[j];

%p if assigned(R[q]) then res:= res union {q}

%p else R[q]:= 1

%p fi

%p od od:

%p sort(convert(res,list)); # _Robert Israel_, Feb 17 2017

%t 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 *)

%Y Cf. A025475, A225099, A225102.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, Apr 28 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 07:32 EDT 2024. Contains 372530 sequences. (Running on oeis4.)