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-7 of 7 results.

A015922 Numbers k such that 2^k == 8 (mod k).

Original entry on oeis.org

1, 2, 3, 4, 8, 9, 15, 21, 33, 39, 51, 57, 63, 69, 87, 93, 111, 123, 129, 141, 159, 177, 183, 195, 201, 213, 219, 237, 248, 249, 267, 291, 303, 309, 315, 321, 327, 339, 381, 393, 399, 411, 417, 447, 453, 471, 489, 501, 519, 537, 543, 573, 579, 591, 597, 633
Offset: 1

Views

Author

Keywords

Comments

For all m, 2^A015921(m) - 1 belongs to this sequence.

Crossrefs

Contains A033553 as a subsequence.
The odd terms form A276967.

Programs

  • Mathematica
    a015922Q[n_Integer] := If[Mod[2^n, n] == Mod[8, n], True, False];
    a015922[n_Integer] :=
    Flatten[Position[Thread[a015922Q[Range[n]]], True]];
    a015922[1000000] (* Michael De Vlieger, Jul 16 2014 *)
    m = 8; Join[Select[Range[m], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^3], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)
    Join[{1,2,3,4,8},Select[Range[650],PowerMod[2,#,#]==8&]] (* Harvey P. Dale, Aug 22 2020 *)
  • PARI
    isok(n) = Mod(2, n)^n == Mod(8, n); \\ Michel Marcus, Oct 13 2013, Jul 16 2014

Extensions

First 5 terms inserted by David W. Wilson

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

A276968 Odd integers n such that 2^n == 2^5 (mod n).

Original entry on oeis.org

1, 3, 5, 25, 65, 85, 145, 165, 185, 205, 221, 265, 305, 365, 445, 465, 485, 505, 545, 565, 685, 745, 785, 825, 865, 905, 965, 985, 1025, 1085, 1145, 1165, 1205, 1285, 1345, 1385, 1405, 1465, 1565, 1585, 1685, 1705, 1745, 1765, 1865, 1925, 1945, 1985, 2005, 2045, 2105, 2165, 2245, 2285, 2305, 2325
Offset: 1

Views

Author

Max Alekseyev, Sep 22 2016

Keywords

Comments

Also, integers n such that 2^(n-5) == 1 (mod n).
Contains A050993 as a subsequence.
For all m, 2^A128122(m)-1 belongs to this sequence.

Crossrefs

The odd terms of A015925.
Odd integers n such that 2^n == 2^k (mod n): A176997 (k=1), A173572 (k=2), A276967 (k=3), A033984 (k=4), this sequence (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 = 2^5; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &],
    Select[Range[m + 1, 10^3, 2], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)

A276969 Odd integers n such that 2^n == 2^7 (mod n).

Original entry on oeis.org

1, 3, 7, 15, 49, 91, 133, 217, 255, 259, 301, 427, 469, 511, 527, 553, 679, 721, 763, 889, 973, 1015, 1057, 1099, 1141, 1267, 1351, 1393, 1477, 1561, 1603, 1687, 1897, 1939, 1981, 2107, 2149, 2191, 2317, 2359, 2443, 2569, 2611, 2653, 2779, 2863, 2947, 3031, 3073, 3199, 3241, 3409, 3493, 3661, 3787
Offset: 1

Views

Author

Max Alekseyev, Sep 22 2016

Keywords

Comments

Also, integers n such that 2^(n-7) == 1 (mod n).
Contains A208155 as a subsequence.
For all m, 2^A015922(m)-1 belongs to this sequence.

Crossrefs

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

Programs

  • Mathematica
    m = 2^7; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &],
    Select[Range[m + 1, 10^3, 2], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)
  • PARI
    is(n)=n%2 && Mod(2,n)^n==128 \\ Charles R Greathouse IV, Sep 22 2016

A276970 Odd integers n such that 2^n == 2^9 (mod n).

Original entry on oeis.org

1, 3, 5, 9, 17, 21, 27, 45, 63, 99, 105, 117, 153, 171, 189, 207, 261, 273, 279, 333, 369, 387, 423, 429, 477, 513, 531, 549, 585, 603, 639, 657, 711, 747, 801, 873, 909, 927, 945, 963, 981, 1017, 1143, 1179, 1197, 1209, 1233, 1251, 1341, 1359, 1365, 1413, 1467, 1503, 1557, 1611, 1629, 1665, 1719, 1737
Offset: 1

Views

Author

Max Alekseyev, Sep 22 2016

Keywords

Comments

Also, integers n such that 2^(n-9) == 1 (mod n).
Contains A208157 as a subsequence.
For all m, 2^A128123(m)-1 belongs to this sequence.

Crossrefs

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

Programs

  • Mathematica
    m = 2^9; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &], Select[Range[m + 1, 10^3, 2], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 15 2018 *)

A276971 Odd integers n such that 2^n == 2^11 (mod n).

Original entry on oeis.org

1, 3, 11, 15, 31, 35, 51, 121, 341, 451, 455, 671, 781, 1111, 1235, 1271, 1441, 1547, 1661, 1991, 2091, 2101, 2321, 2651, 2761, 2981, 3091, 3421, 3641, 3731, 3751, 4403, 4411, 4631, 4741, 5071, 5401, 5731, 5951, 6171, 6191, 6281, 6611, 6851, 6941, 7051, 7271, 7601, 7711, 8261, 8371, 8435, 8921
Offset: 1

Views

Author

Max Alekseyev, Sep 22 2016

Keywords

Comments

Also, integers n such that 2^(n-11) == 1 (mod n).
For all m, 2^A128124(m)-1 belongs to this sequence.

Crossrefs

The odd terms of A015935.
Odd integers n such that 2^n == 2^k (mod n): A176997 (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), this sequence (k=11), A215613 (k=12).
Cf. A128124.

Programs

  • Mathematica
    m = 2^11; Join[Select[Range[1, m, 2], Divisible[2^# - m, #] &],
    Select[Range[m + 1, 10^6, 2], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 12 2018 *)

A357125 Positive integers n such that 2^(n-3) == -1 (mod n).

Original entry on oeis.org

1, 5, 4553, 46777, 82505, 4290773, 4492205, 4976429, 21537833, 21549349, 51127261, 56786089, 60296573, 80837773, 87761789, 94424465, 138644873, 168865001, 221395541, 255881453, 297460453, 305198249, 360306365, 562654205, 635374253, 673867253, 808333573, 1164757553, 1210317349
Offset: 1

Views

Author

Max Alekseyev, Sep 13 2022

Keywords

Comments

Also, odd integers n dividing 2^n + 8.
Some large terms: 5603900696716667005, 446661376165868432471569407934747098747181600670953926245, 1533278864164902082788937853692280620552397221686019535813.

Crossrefs

The odd terms of A245319.

Programs

  • Mathematica
    Select[Range[2155*10^4],PowerMod[2,#-3,#]==#-1&]//Quiet (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Feb 08 2025 *)
Showing 1-7 of 7 results.