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.

A374976 Odd k with p^k mod k != p for all primes p.

This page as a plain text file.
%I A374976 #45 Aug 17 2024 22:52:43
%S A374976 1,9,27,63,75,81,115,119,125,189,207,209,215,235,243,279,299,319,323,
%T A374976 387,407,413,423,515,517,531,535,551,567,575,583,611,621,623,667,675,
%U A374976 707,713,729,731,747,767,779,783,799,815,835,851,869,893,899,917,923,927
%N A374976 Odd k with p^k mod k != p for all primes p.
%C A374976 Alternatively: 1, and odd composites not a pseudoprime to any prime base.
%C A374976 The sequence contains no primes, no pseudoprimes to any prime base (A001567, A005935, A005936, A005938, A020139, A020141...), and no Carmichael numbers (A002997).
%H A374976 Francois R. Grieu, <a href="/A374976/b374976.txt">Table of n, a(n) for n = 1..10000</a>
%e A374976 k=3 (resp. 5, 7) is not in the sequence because for prime p=2 it holds p^k mod k = 2 which is p.
%e A374976 k=9 is in the sequence because for prime p=2 (resp. 3, 5, 7) it holds p^k mod k = 8 (resp. 0, 8, 1) which is not p, and for all other primes p it holds p>=k therefore p^k mod k can't be p.
%t A374976 Cases[Range[1, 930, 2], k_/; (For[p=2, p<k && PowerMod[p,k,k]!=p, p=NextPrime[p]]; p>=k)]
%Y A374976 Cf. A000040, A001567, A005935, A005936, A005938, A020139, A020141, A020145, A002997.
%K A374976 nonn
%O A374976 1,2
%A A374976 _Francois R. Grieu_, Jul 26 2024