OFFSET
0,3
COMMENTS
This is a permutation of the natural numbers. Up to 500000 terms the fixed points are 0, 1, 2, 4, 5, 15, 16, 18, 21, 22, 24, 25, 29, and it is likely no more exist.
LINKS
Scott R. Shannon, Image of the first 500000 terms. The green line is y = n.
EXAMPLE
a(3) = 6 as a(1)+a(2) = 3, 6 does not equal 3, and gcd(3,6) > 1.
a(4) = 4 as a(2)+a(3) = 8, 4 does not equal 8, and gcd(8,4) > 1.
MATHEMATICA
s = {0, 1, 2}; u = 3; c[_] = 0; Set[{i, j}, s[[-2 ;; -1]]]; Array[Set[c[s[[#]]], #] &, Length[s]]; s~Join~Reap[Do[Set[k, u]; While[Nand[c[k] == 0, GCD[i + j, k] > 1, i + j != k], k++]; Sow[k]; Set[c[k], n]; If[k == u, While[c[u] == 1, u++]]; i = j; j = k, {n, Length[s] + 1, 2^10}], n]][[-1, -1]] (* Michael De Vlieger, Jan 28 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jan 28 2022
STATUS
approved