OFFSET
1,2
COMMENTS
Is this sequence a permutation of the positive integers?
EXAMPLE
The sum of the first 7 terms of the sequence is 32. 17 is the smallest positive integer m that does not occur earlier in the sequence and is such that 32+m is of the form j^r, r >=2. So a(8) = 17 and the sum of the first 8 terms of the sequence is 49 = 7^2.
MATHEMATICA
f[n_] := n == 1 || GCD @@ Last /@ FactorInteger[n] > 1; g[l_List] := Block[{k = 1, s = Plus @@ l}, While[MemberQ[l, k] || ! f[s + k], k++ ]; Append[l, k]]; Nest[g, {}, 70] (* Ray Chandler, Jan 23 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 13 2007
EXTENSIONS
Extended by Ray Chandler, Jan 23 2007
STATUS
approved