%I #17 Feb 06 2022 23:03:52
%S 4,68,1832,80796
%N a(n) is the least number that starts a sequence of exactly n nonsquarefree numbers under the iteration x_{n+1} = x_n^2 - x_n + 1.
%C 1000000 < a(5) <= 58229352.
%e a(3) = 1832 because 1832 is divisible by 2^2, 1832^2-1832+1 = 3354393 is divisible by 7^2, 3354393^2-3354393+1 = 11251949044057 is divisible by 97^2, and 11251949044057^2-11251949044057+1 = 126606357290043984177975193 is squarefree, and 1832 is the smallest number that works.
%p f:= proc(n) local x,i;
%p x:= n;
%p for i from 0 do
%p if numtheory:-issqrfree(x) then return count fi;
%p x:= x^2-x+1
%p od
%p end proc:
%p W:= Vector(4):
%p for n from 1 while W[4] = 0 do
%p v:= f(n);
%p if v >= 1 and W[v] = 0 then W[v]:= n fi
%p od:
%p convert(W,list);
%Y Cf. A013929.
%K nonn,more
%O 1,1
%A _Robert Israel_, Feb 03 2022