OFFSET
1,2
COMMENTS
Mod 3 analog of A077223. A permutation of the natural numbers. There's an obvious limit to the number of successive values which can be consecutive integers.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
S:= {0, 1}: mink:= 2: A[1]:= 1:
for n from 2 to 100 do
for k from mink + (n-mink mod 3) by 3 do
if not member(k, S) and numtheory:-issqrfree(A[n-1]+k) then
A[n]:= k; S:= S union {k};
if k = mink then mink := min({$mink .. max(S)+1} minus S) fi;
break
fi
od
od:seq(A[i], i=1..100); # Robert Israel, Jun 19 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 01 2007
EXTENSIONS
Corrected and extended by Giovanni Resta, Jun 19 2016
STATUS
approved