login
Odd integers n such that 2^n == 4 (mod n).
16

%I #41 Apr 03 2023 10:36:12

%S 1,20737,93527,228727,373457,540857,2231327,11232137,15088847,

%T 15235703,24601943,43092527,49891487,66171767,71429177,137134727,

%U 207426737,209402327,269165561,302357057,383696711,513013327

%N Odd integers n such that 2^n == 4 (mod n).

%C The odd terms of A015921.

%C Also, nonprime integers n such that 2^(n-2) == 1 (mod n).

%C For all m, 2^A050259(m)-1 belongs to this sequence.

%C If n > 1 is a term and p is a primitive prime factor of 2^(n-2)-1, then n*p is also a term. Hence, the sequence is infinite. (Rotkiewicz 1984)

%D A. E. Bojarincev, Asymptotic expressions for the n-th composite number, Univ. Mat. Zap. 6:21-43 (1967). (in Russian)

%D R. K. Guy, Unsolved Problems in Number Theory, Springer-Verlag, Third Edition, 2004

%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.

%H Max Alekseyev, <a href="/A173572/b173572.txt">Table of n, a(n) for n = 1..722</a> (all terms below 10^14)

%H C. K. Caldwell, <a href="https://t5k.org/glossary/page.php?sort=Composite"> Composite Numbers</a>

%H A. Rotkiewicz, <a href="https://doi.org/10.1090/S0025-5718-1984-0744937-1">On the congruence 2^(n-2) == 1 (mod n)</a>. Math. Comp. 43 (1984), 271-272.

%p with(numtheory): for n from 1 to 100000000 do: a:= 2^(n-2)- 1; b:= a / n; c:= floor(b): if b = c and tau(n) <> 2 then print (n); else fi;od:

%t m = 4; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^6, 2], PowerMod[2, #, #] == m &]] (* _Robert Price_, Oct 12 2018 *)

%o (PARI) is(n) = n%2==1 && Mod(2,n)^n==Mod(4,n) \\ _Jinyuan Wang_, Feb 22 2019

%Y Cf. A015921, A050259, A173138, A002808.

%K nonn

%O 1,2

%A _Michel Lagneau_, Feb 22 2010

%E Edited and term 1 prepended by _Max Alekseyev_, Aug 09 2012