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.

A111305 Composite numbers k such that a^(k-1) == 1 (mod k) only when a == 1 (mod k).

This page as a plain text file.
%I A111305 #33 Feb 09 2021 02:28:57
%S A111305 4,6,8,10,12,14,16,18,20,22,24,26,30,32,34,36,38,40,42,44,46,48,50,54,
%T A111305 56,58,60,62,64,68,72,74,78,80,82,84,86,88,90,92,94,96,98,100,102,104,
%U A111305 106,108,110,114,116,118,120,122,126,128,132,134,136,138,140,142,144
%N A111305 Composite numbers k such that a^(k-1) == 1 (mod k) only when a == 1 (mod k).
%C A111305 These unCarmichael numbers fail the Fermat primality test as often as possible.
%C A111305 All such numbers are even: for odd n, (-1)^(n-1) = 1.
%C A111305 The even numbers not in this sequence are 2 and A039772.
%C A111305 If c is a Carmichael number, then 2c is in the sequence. Also, the sequence is A209211 without the first two terms. - _Emmanuel Vantieghem_, Jul 03 2013
%H A111305 Romeo Meštrović, <a href="http://arxiv.org/abs/1305.1867">Generalizations of Carmichael numbers I,</a> arXiv:1305.1867v1 [math.NT], May 04 2013.
%e A111305 10 is a term because 3^9 == 3 (mod 10), 7^9 == 7 (mod 10), 9^9 == 9 (mod 10).
%t A111305 Select[Range[4, 144],Count[Table[PowerMod[b, # - 1, #], {b, 1, # - 1}], 1] == 1 &] (* _Geoffrey Critzer_, Apr 11 2015 *)
%o A111305 (PARI) is(n)=for(a=2,n-1, if(Mod(a,n)^(n-1)==1, return(0))); !isprime(n) \\ _Charles R Greathouse IV_, Dec 22 2016
%Y A111305 Cf. A002997, A039772, A209211, A227180.
%K A111305 nonn
%O A111305 1,1
%A A111305 _Karsten Meyer_, Nov 02 2005
%E A111305 Edited by _Don Reble_, May 16 2006