login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that n^2 + 1 is the sum of two proper prime powers (A246547) in more than one way.
1

%I #13 Feb 20 2017 03:25:19

%S 47,73,83,133,157,173,187,191,203,217,317,319,353,437,463,467,487,499,

%T 557,577,583,593,599,613,623,697,703,727,733,767,829,857,863,871,931,

%U 983,1013,1027,1033,1067,1087,1097,1123,1139,1177,1267,1279,1321,1327,1333,1363,1403,1409,1433,1453,1477,1487,1493,1507,1517,1543,1567,1603,1607,1613

%N Numbers n such that n^2 + 1 is the sum of two proper prime powers (A246547) in more than one way.

%H Robert Israel, <a href="/A282633/b282633.txt">Table of n, a(n) for n = 1..2672</a>

%e 83 is a term because 83^2 + 1 = 7^4 + 67^2 = 43^2 + 71^2.

%p N:= 10^8: # to get all terms <= sqrt(N-1).

%p PP:= sort([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 q > N then break fi;

%p if issqr(q-1) then

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

%p else R[q]:= 1

%p fi fi

%p od od:

%p sort(convert(map(t -> sqrt(t-1), res),list));

%Y Cf. A002522, A225103, A246547.

%K nonn

%O 1,1

%A _Robert Israel_ and _Altug Alkan_, Feb 19 2017