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.

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

This page as a plain text file.
%I A282633 #13 Feb 20 2017 03:25:19
%S A282633 47,73,83,133,157,173,187,191,203,217,317,319,353,437,463,467,487,499,
%T A282633 557,577,583,593,599,613,623,697,703,727,733,767,829,857,863,871,931,
%U A282633 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 A282633 Numbers n such that n^2 + 1 is the sum of two proper prime powers (A246547) in more than one way.
%H A282633 Robert Israel, <a href="/A282633/b282633.txt">Table of n, a(n) for n = 1..2672</a>
%e A282633 83 is a term because 83^2 + 1 = 7^4 + 67^2 = 43^2 + 71^2.
%p A282633 N:= 10^8: # to get all terms <= sqrt(N-1).
%p A282633 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 A282633 npp:= nops(PP):
%p A282633 res:= {}: R:= 'R':
%p A282633 for i from 2 to npp do
%p A282633    for j from 1 to i-1 do
%p A282633      q:= PP[i]+PP[j];
%p A282633      if q > N then break fi;
%p A282633       if issqr(q-1) then
%p A282633        if assigned(R[q]) then res:= res union {q}
%p A282633         else R[q]:= 1
%p A282633       fi fi
%p A282633 od od:
%p A282633 sort(convert(map(t -> sqrt(t-1), res),list));
%Y A282633 Cf. A002522, A225103, A246547.
%K A282633 nonn
%O A282633 1,1
%A A282633 _Robert Israel_ and _Altug Alkan_, Feb 19 2017