%I #32 Mar 21 2022 11:10:14
%S 4,40369,673663,990409,1697609,2073127,6462649,7527199,7559479,
%T 14421169,21484129,37825753,57233047,130647919,141735559,179203369,
%U 188967289,218206489,259195009,264538057,277628449,330662479,398321239,501126487,506958313,612368311,767983759
%N Composite numbers k such that 2^(k-4) == 1 (mod k).
%C Besides the initial term, the sequence coincides with A033984 and consists of the odd terms > 7 of A015924.
%D A. E. Bojarincev, Asymptotic expressions for the n-th composite number, Univ. Mat. Zap. 6:21-43 (1967). - In Russian.
%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.
%H Michael S. Branicky, <a href="/A173138/b173138.txt">Table of n, a(n) for n = 1..62</a>
%e 4 is a term: 2^(4 - 4) = 1 (mod 4).
%p with(numtheory): for n from 1 to 100000000 do: a:= 2^(n-4)- 1; b:= a / n; c:= floor(b): if b = c and tau(n) <> 2 then print (n); else fi;od:
%t Select[Range[500000000],!PrimeQ[#]&&PowerMod[2,#-4,#]==1&] (* _Harvey P. Dale_, Nov 23 2011 *)
%o (PARI) is(n)=!isprime(n) && n>1 && Mod(2,n)^(n-4)==1 \\ _Charles R Greathouse IV_, Nov 23 2011
%o (Python)
%o from sympy import isprime, prime, nextprime
%o def afind(k=4):
%o while True:
%o if pow(2, k-4, k) == 1 and not isprime(k): print(k, end=", ")
%o k += 1
%o afind() # _Michael S. Branicky_, Mar 21 2022
%Y Cf. A002808, A005381, A033984.
%K nonn
%O 1,1
%A _Michel Lagneau_, Feb 10 2010
%E Simplified the definition, added cross-reference to A033984 _R. J. Mathar_, May 18 2010
%E More terms from _Harvey P. Dale_, Nov 23 2011
%E Typo in a(13) corrected by _Georg Fischer_, Mar 19 2022
%E a(24) and beyond from _Michael S. Branicky_, Mar 21 2022
|