OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers if the number of twin prime pairs is infinite.
MATHEMATICA
f[n_] := Block[{c = (Prime[n + 2] - Prime[n + 1])/2, d = 0, k = 1}, While[d < c, k++; If[ !MemberQ[lst, k], d++ ]]; AppendTo[lst, k]]; lst = {1}; Do[ f[n], {n, 2, 80}]; Table[Position[lst, n], {n, 72}] // Flatten (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 06 2006
EXTENSIONS
More terms from Robert G. Wilson v, Jun 07 2006
STATUS
approved