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.

A173138 Composite numbers k such that 2^(k-4) == 1 (mod k).

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