cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A225103 #11 Feb 17 2017 18:50:35
%S A225103 36,41,57,89,113,129,130,137,153,177,185,297,305,368,370,377,410,425,
%T A225103 537,545,561,593,633,650,657,850,857,868,873,890,969,986,1010,1130,
%U A225103 1385,1490,1690,1730,1802,1865,1881,1898,1970,2210,2213,2217,2236,2330,2337
%N A225103 Numbers that can be represented as a sum of two distinct nontrivial prime powers in two or more ways.
%C A225103 Indices of terms bigger than 1 in A225099.
%C A225103 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 A225103 Only 267 of the terms below 2^34 are odd.
%H A225103 Robert Israel, <a href="/A225103/b225103.txt">Table of n, a(n) for n = 1..10000</a>
%e A225103 36 = 32 + 4 = 27 + 9, so 36 is in the sequence.
%e A225103 41 = 32 + 9 = 25 + 16, so 41 is in the sequence.
%p A225103 N:= 10^4: # to get all terms <= N
%p A225103 PP:= [seq(seq(p^k, k=2..floor(log[p](N))),p = select(isprime, [2,seq(i,i=3..floor(sqrt(N)),2)]))]:
%p A225103 npp:= nops(PP):
%p A225103 res:= {}: R:= 'R':
%p A225103 for i from 2 to npp do
%p A225103   for j from 1 to i-1 do
%p A225103     q:= PP[i]+PP[j];
%p A225103     if assigned(R[q]) then res:= res union {q}
%p A225103     else R[q]:= 1
%p A225103     fi
%p A225103 od od:
%p A225103 sort(convert(res,list)); # _Robert Israel_, Feb 17 2017
%t A225103 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 A225103 Cf. A025475, A225099, A225102.
%K A225103 nonn
%O A225103 1,1
%A A225103 _Alex Ratushnyak_, Apr 28 2013