OFFSET
1,1
COMMENTS
A000079 is a subsequence, starting from the 4th term, 2^3.
The subsequence of odd terms begins: 9, 25, 81, 125, 5041.
EXAMPLE
9 = 8 + 1.
25 = 16 + 9.
81 = 49 + 32.
125 = 121 + 4.
5041 = 71^2 = 4913 + 128 = 17^3 + 2^7.
MATHEMATICA
Select[#, Last@ # == 1 &][[All, 1]] &@ Fold[Function[{s, k}, Append[s, If[And[! PrimeQ@ k, DivisorSigma[1, k]*EulerPhi[k] > (k - 1)^2], {k, If[AnyTrue[IntegerPartitions[k, {2}], SubsetQ[s[[All, 1]], #] &], 1, 0]}, Nothing]]], {}, Range[10^4]] (* Michael De Vlieger, Jan 31 2020 *)
PROG
(Python)
from sympy import isprime
TOP = 10**5
primePowers={}
primePowers[1]=1
for x in range(2, TOP):
if isprime(x):
p = pp = x
while pp < TOP**2:
pp *= p
primePowers[pp] = 1
a=[]
pps = sorted(primePowers.keys())[:]
for pp in pps:
for p in pps:
if p*2 > pp: break
if (pp-p) in primePowers:
print(pp)
a.append(pp)
break
print(sorted(a))
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 25 2020
STATUS
approved