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”).

A284049
a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) is a prime power, with a(1) = 1.
3
1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 12, 13, 10, 15, 14, 17, 20, 21, 16, 25, 18, 19, 22, 27, 26, 23, 24, 29, 30, 31, 28, 33, 34, 37, 36, 35, 32, 39, 40, 41, 38, 43, 46, 51, 50, 47, 42, 55, 48, 49, 52, 45, 44, 53, 54, 59, 62, 63, 58, 67, 60, 61, 64, 57, 56, 65, 66, 71, 68, 69, 70, 79, 72, 77, 74, 75, 76, 73, 78, 85, 82
OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the natural numbers.
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]
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 19 2017
STATUS
approved