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.

A366930 a(n) is the smallest odd composite k such that n^((k+1)/2) == n (mod k).

This page as a plain text file.
%I A366930 #27 Nov 05 2023 09:02:59
%S A366930 9,9,341,121,341,65,15,21,9,9,9,33,33,21,21,15,15,9,9,9,21,15,21,33,
%T A366930 25,15,9,9,9,21,15,15,25,33,21,9,9,9,57,39,15,21,21,21,9,9,9,65,21,21,
%U A366930 21,15,39,9,9,9,21,21,57,145,15,15,9,9,9,33,15,33,25,21
%N A366930 a(n) is the smallest odd composite k such that n^((k+1)/2) == n (mod k).
%C A366930 If this sequence is bounded, then it is periodic with period P = LCM(A), where A is the set of all (pairwise distinct) terms.
%C A366930 Note that n^((1729+1)/2) == n (mod 1729) for every n >= 0, where 1729 is the smallest absolute Euler pseudoprime (A033181).
%C A366930 Thus a(n) <= 1729. So, as said, this sequence is periodic.
%C A366930 What is its period?
%C A366930 The period P of this sequence may be longer than the period of Euler primary pretenders (A309316), namely P > 41#*571#/4 (248 digits).
%F A366930 a(n) >= A309316(n).
%t A366930 a[n_] := Module[{k = 9}, While[PrimeQ[k] || PowerMod[n, (k + 1)/2, k] != Mod[n, k], k += 2]; k]; Array[a, 100, 0] (* _Amiram Eldar_, Nov 01 2023 *)
%o A366930 (PARI) a(n) = my(k=3); while (isprime(k) || Mod(n, k)^((k+1)/2) != n, k+=2); k; \\ _Michel Marcus_, Nov 01 2023
%Y A366930 Cf. A033181, A309316, A366973, A366982.
%K A366930 nonn
%O A366930 0,1
%A A366930 _Thomas Ordowski_, Nov 01 2023