Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #39 Dec 23 2024 14:53:46
%S 6,10,12,14,15,18,20,21,22,26,28,30,33,34,36,38,39,42,45,46,48,50,51,
%T 52,54,55,56,57,58,62,65,66,68,69,70,72,74,75,78,80,82,84,85,86,87,90,
%U 91,93,94,95,98,100,102,105,106,110,111,112,114,116,118,120,122
%N Fermat weak pseudoprimes k to a base d, where d | k and 1 < d < k.
%C Numbers k such that d^k == d (mod k) for some d with d|k and 1 < d < k.
%C Problem: what is the asymptotic density of the set of these numbers?
%C It seems that this sequence has an asymptotic density of 0.626... - _Amiram Eldar_, Jan 19 2021
%H Amiram Eldar, <a href="/A340749/b340749.txt">Table of n, a(n) for n = 1..10000</a>
%H Thomas Ordowski, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2021-January/021256.html">Density of Fermat weak pseudoprimes k to a base d, where d|k and 1<d<k</a>, SeqFan mailing list, Jan 20 2021.
%H Carl Pomerance and Samuel S. Wagstaff, Jr., <a href="https://dais.sanu.ac.rs/handle/123456789/13283">Some thoughts on pseudoprimes</a>, Bulletin (Académie serbe des sciences et des arts, Classe des sciences mathématiques et naturelles, Sciences mathématiques), Vol. 46 (2021), pp. 53-72; <a href="https://arxiv.org/abs/2103.00679">arXiv preprint</a>, arXiv:2103.00679 [math.NT], 2021; <a href="https://www.jstor.org/stable/27053363">JSTOR link</a>; <a href="https://math.dartmouth.edu/~carlp/pspssw3.pdf">author's link</a>.
%e The number 6 is a term, because 6 | 3^6 - 3, wherein 3 | 6 and 1 < 3 < 6.
%t q[n_] := CompositeQ[n] && AnyTrue[Rest @ Most @ Divisors[n], PowerMod[#, n, n] == # &]; Select[Range[120], q] (* _Amiram Eldar_, Jan 19 2021 *)
%o (PARI) isok(k) = fordiv(k, d, if ((d>1) && (d<k) && (Mod(d, k)^k == Mod(d, k)), return(1))); 0; \\ _Michel Marcus_, Jan 21 2021
%Y Cf. A000790.
%K nonn
%O 1,1
%A _Thomas Ordowski_, Jan 19 2021