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

A256271
a(1) = 1; for n > 1, a(n) is the smallest number not already in the sequence such that a(n)^2 + a(n-1)^2 is squarefree.
4
1, 2, 3, 5, 4, 7, 6, 11, 8, 9, 10, 13, 12, 17, 14, 15, 16, 19, 18, 23, 20, 27, 22, 25, 21, 26, 29, 24, 31, 28, 33, 32, 35, 34, 39, 38, 37, 30, 41, 36, 43, 40, 47, 42, 53, 44, 45, 46, 49, 48, 59, 50, 51, 52, 55, 54, 61, 56, 57, 58, 63, 62, 65, 64, 67, 60, 71, 66, 73, 68, 69, 70, 79, 74, 75, 76, 77, 72, 83, 78, 85
OFFSET
1,2
COMMENTS
This is conjectured to be a permutation of the natural numbers.
LINKS
MATHEMATICA
a={1}; While[Length[a]<1000, e=Last@a; s = Select[ Complement[ Range@e, a], SquareFreeQ[e^2 + #^2]&, 1]; If[s!={}, s=s[[1]], s=e+1; While[ MemberQ[a, s] || !SquareFreeQ[ e^2 + s^2], s++]]; AppendTo[a, s]]; a (* first 1000 terms, Giovanni Resta, Jun 02 2015 *)
PROG
(PARI) v=[1]; n=1; while(n<100, if(issquarefree(n^2+v[#v]^2)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v
CROSSREFS
Sequence in context: A372043 A276346 A123882 * A293977 A282649 A102454
KEYWORD
nonn,easy
AUTHOR
Derek Orr, Jun 01 2015
STATUS
approved