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”).
%I #11 Mar 09 2021 20:15:17
%S 13,26,39,47,52,78,79,91,94,104,113,141,143,156,158,169,173,182,188,
%T 197,208,226,237,247,273,282,286,299,312,316,329,338,339,346,353,364,
%U 376,377,394,403,416,429,439,452,474,481,494,507,517,519,546,553,559,564,572,591,598
%N Moduli n for which A248218(n) = 4 (length of the terminating cycle of 0 under x -> x^2+1 modulo n).
%C If x is a member and y is a member of this sequence or A248219 or A256342, then LCM(x,y) is a member. - _Robert Israel_, Mar 09 2021
%H Robert Israel, <a href="/A256344/b256344.txt">Table of n, a(n) for n = 1..10000</a>
%e See A256342 or A256349.
%p filter:= proc(n) local x, k, R,p;
%p x:= 0; R[0]:= 0;
%p for k from 1 do
%p x:= x^2+1 mod n;
%p if assigned(R[x]) then return evalb(k-R[x] = 4)
%p else R[x]:= k
%p fi
%p od;
%p end proc:
%p select(filter, [$1..1000]); # _Robert Israel_, Mar 09 2021
%o (PARI) for(i=1,600,A248218(i)==4&&print1(i","))
%Y Cf. A248218, A248219, A256342 - A256349, A003095, A247981.
%K nonn
%O 1,1
%A _M. F. Hasler_, Mar 25 2015