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.

Showing 1-4 of 4 results.

A176997 Integers k such that 2^(k-1) == 1 (mod k).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 08 2010

Keywords

Comments

Old definition was: Odd integers n such that 2^(n-1) == 4^(n-1) == 8^(n-1) == ... == k^(n-1) (mod n), where k = A062383(n). Dividing 2^(n-1) == 4^(n-1) (mod n) by 2^(n-1), we get 1 == 2^(n-1) (mod n), implying the current definition. - Max Alekseyev, Sep 22 2016
The union of {1}, the odd primes, and the Fermat pseudoprimes, i.e., {1} U A065091 U A001567. Also, the union of A006005 and A001567 (conjectured by Alois P. Heinz, Dec 10 2010). - Max Alekseyev, Sep 22 2016
These numbers were called "fermatians" by Shanks (1962). - Amiram Eldar, Apr 21 2024

Examples

			5 is in the sequence because 2^(5-1) == 4^(5-1) == 8^(5-1) == 1 (mod 5).
		

References

  • Daniel Shanks, Solved and Unsolved Problems in Number Theory, Spartan Books, Washington D.C., 1962.

Crossrefs

The odd terms of A015919.
Odd integers n such that 2^n == 2^k (mod n): this sequence (k=1), A173572 (k=2), A276967 (k=3), A033984 (k=4), A276968 (k=5), A215610 (k=6), A276969 (k=7), A215611 (k=8), A276970 (k=9), A215612 (k=10), A276971 (k=11), A215613 (k=12).

Programs

  • Mathematica
    m = 1; Join[Select[Range[m], Divisible[2^(# - 1) - m, #] &],
    Select[Range[m + 1, 10^3], PowerMod[2, # - 1, #] == m &]] (* Robert Price, Oct 12 2018 *)
  • PARI
    isok(n) = Mod(2, n)^(n-1) == 1; \\ Michel Marcus, Sep 23 2016
    
  • Python
    from itertools import count, islice
    def A176997_gen(startvalue=1): # generator of terms >= startvalue
        if startvalue <= 1:
            yield 1
        k = 1<<(s:=max(startvalue,1))-1
        for n in count(s):
            if k % n == 1:
                yield n
            k <<= 1
    A176997_list = list(islice(A176997_gen(),30)) # Chai Wah Wu, Jun 30 2022

Extensions

Edited by Max Alekseyev, Sep 22 2016

A062172 Table T(n,k) by antidiagonals of n^(k-1) mod k [n,k > 0].

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 3, 1, 1, 0, 1, 2, 1, 0, 1, 0, 0, 1, 1, 3, 1, 1, 0, 1, 0, 1, 0, 1, 4, 0, 0, 1, 0, 0, 1, 4, 3, 1, 5, 1, 3, 1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 3, 7, 5, 1, 1, 1, 1, 1, 1, 0, 1, 8, 1, 4, 7, 0, 0, 2, 1, 0, 1, 0, 0, 1, 1, 3, 1, 5, 0, 7, 1, 3, 0, 3, 0, 1, 0
Offset: 1

Views

Author

Henry Bottomley, Jun 12 2001

Keywords

Examples

			T(5,3)=5^(3-1) mod 3=25 mod 3=1. Rows start (0,1,1,1,1,...), (0,0,1,0,1,...), (0,1,0,3,1...), (0,0,1,0,1,...), (0,1,1,1,0,...), ...
		

Crossrefs

Cf. A002997, A060154. Rows include A057427, A062173, A062174, A062175, A062176. Columns include A000004, A000035, A011655, A010684 with interleaved 0's, A011558, A010875. Diagonals include all the rows again and A000004 and A009001 unsigned.

A176176 Numbers k such that 2^(k-1) == 4^(k-1) (mod k).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 16, 17, 19, 23, 28, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 112, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 07 2010

Keywords

Comments

Numbers k such that A062173(k) = A062175(k).
Question: is the sequence (Powers of 2) UNION (odd primes), the union of A000079 and A005408?
The answer to the question is no: 2^(28-1) mod 28 = 4^(28-1) mod 28 = 8. Also, any base-2 Fermat pseudoprime (A001567) is a term of this sequence. - D. S. McNeil, Dec 07 2010

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PowerMod[2,#-1,#]==PowerMod[4,#-1,#]&] (* Harvey P. Dale, Nov 10 2011 *)

Extensions

Extended by D. S. McNeil, Dec 07 2010

A176817 Nonprimes k such that 2^(k-1) == 4^(k-1) (mod k).

Original entry on oeis.org

1, 4, 8, 16, 28, 32, 64, 112, 128, 256, 341, 448, 496, 512, 561, 645, 1016, 1024, 1105, 1288, 1387, 1729, 1792, 1905, 2044, 2047, 2048, 2416, 2465, 2701, 2821, 3277, 4033, 4096, 4369, 4371, 4672, 4681, 4984, 5461, 6601, 7168, 7936, 7957, 8128, 8192, 8321, 8481, 8911
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 07 2010

Keywords

Comments

All powers of two are present.

Crossrefs

Programs

  • Mathematica
     fQ[n_] := !PrimeQ@ n && PowerMod[2, n - 1, n] == PowerMod[4, n - 1, n]; Select[ Range@ 10000, fQ]
Showing 1-4 of 4 results.