OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the natural numbers.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Prime Power
EXAMPLE
a(8) = 9 because 1, 2, 3, 4, 5, 6 and 7 have already been used in the sequence, 7 + 8 = 15 is not prime power while 7 + 9 = 16 is a prime power.
MAPLE
N:= 100: # to get all terms before the first term > N
S:= [$2..N]:
a[1]:= 1: found:= true:
for n from 2 while found do
found:= false;
for j from 1 to nops(S) do
if ispp(a[n-1]+S[j]) then
found:= true;
a[n]:= S[j];
S:= subsop(j=NULL, S);
break
fi
od;
od:
seq(a[i], i=1..n-2); # Robert Israel, Apr 16 2017
MATHEMATICA
f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! PrimePowerQ[a + k], k++]; Append[s, k]]; Nest[f, {1}, 80]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 19 2017
STATUS
approved