cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343723 a(n) is 1/4 of the number of starting residues r modulo n from which repeated iterations of the mapping r -> r^2 mod n never reach a fixed point.

This page as a plain text file.
%I A343723 #9 May 07 2021 00:43:29
%S A343723 0,0,0,0,0,0,1,0,1,0,2,0,2,2,0,0,0,2,4,0,3,4,5,0,4,4,4,4,6,0,7,0,6,0,
%T A343723 5,4,8,8,6,0,8,6,10,8,5,10,11,0,10,8,0,8,12,8,10,8,12,12,14,0,14,14,
%U A343723 12,0,10,12,16,0,15,10,17,8,16,16,12,16,17,12,19
%N A343723 a(n) is 1/4 of the number of starting residues r modulo n from which repeated iterations of the mapping r -> r^2 mod n never reach a fixed point.
%F A343723 a(n) = A343722(n)/4.
%o A343723 (PARI) pos(list, r) = forstep (k=#list, 1, -1, if (list[k] == r, return (#list - k + 1)););
%o A343723 isok(r, n) = {my(list = List()); listput(list, r); for (k=1, oo, r = lift(Mod(r, n)^2); my(i = pos(list, r)); if (i==1, return (1)); if (i>1, return(0)); listput(list, r); );}
%o A343723 a(n) = sum(r=0, n-1, 1 - isok(r, n))/4; \\ _Michel Marcus_, May 02 2021
%Y A343723 Cf. A343722.
%K A343723 nonn
%O A343723 1,11
%A A343723 _Jon E. Schoenfield_, May 02 2021