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

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

%I #13 Jun 11 2015 09:36:21

%S 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,

%T 29,24,31,28,33,32,35,34,39,38,37,30,41,36,43,40,47,42,53,44,45,46,49,

%U 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

%N 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.

%C This is conjectured to be a permutation of the natural numbers.

%H Giovanni Resta, <a href="/A256271/b256271.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%o (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

%Y Cf. A121878, A256270.

%K nonn,easy

%O 1,2

%A _Derek Orr_, Jun 01 2015