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.

Previous Showing 11-16 of 16 results.

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 *)

A242865 Numbers n such that 3^(n - 3) is congruent to 1 modulo n.

Original entry on oeis.org

3, 9299, 31903, 50963, 87043, 115918, 116891, 219827, 241043, 394243, 550243, 617503, 760243, 806623, 1029253, 1050787, 1458083, 1642798, 1899458, 2864755, 3205387, 3588115, 3839363, 4164578, 5041223, 5610583, 5834755, 5977555, 7837903, 8005558, 8067433, 8128823, 9007603, 9298903, 9449113, 9617443, 9835843
Offset: 1

Views

Author

Felix Fröhlich, May 24 2014

Keywords

Crossrefs

Intersection with A033553 gives A277344.

Programs

  • Mathematica
    Select[Range[10^4], Mod[3^(# - 3), #] == 1 &] (* Alonso del Arte, May 27 2014 *)
  • PARI
    for(n=3, 10^6, if(Mod(3, n)^(n-3)==1, print1(n, ", ")))

A192109 Numbers k that divide 2^(k-1) - 2.

Original entry on oeis.org

1, 2, 6, 10, 14, 22, 26, 30, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 170, 178, 182, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482, 502, 514, 526, 538, 542, 554, 562, 566, 586, 614, 622, 626
Offset: 1

Views

Author

Max Alekseyev, Apr 22 2013

Keywords

Crossrefs

Contains A216090 as subsequence.
Subsequence of A015921, consisting of the terms that are not multiples of 4.
The odd terms form A173572.

Programs

  • Haskell
    import Data.List (elemIndices)
    a192109 n = a192109_list !! (n-1)
    a192109_list = map (+ 1) $ elemIndices 0 $ zipWith mod a000918_list [1..]
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Mathematica
    Join[{1,2},Select[Range[700],PowerMod[2,#-1,#]==2&]] (* Harvey P. Dale, May 15 2015 *)
  • PARI
    is(n)=Mod(2,n)^(n-1)==2 \\ Charles R Greathouse IV, Nov 04 2016

A346988 a(n) is the smallest k > n such that n^(k-n) == 1 (mod k).

Original entry on oeis.org

2, 20737, 9299, 7, 13, 311, 15, 127, 17, 37, 14, 23, 17, 157, 106, 31, 29, 312953, 45, 95951, 41, 91, 33, 47, 28, 95, 35, 271, 35, 9629, 39, 311, 85, 397, 46, 71, 43, 1793, 95, 79, 61, 821, 51, 18881, 67, 103, 51, 12409, 73, 409969, 65, 87, 65, 71233, 63, 155, 65, 69, 87, 1962251, 91, 2443783, 155
Offset: 1

Views

Author

Thomas Ordowski, Aug 10 2021

Keywords

Comments

Smallest k > n coprime to n such that n^k == n^n (mod k).
If a(n) is a prime p, then n^(n-1) == 1 (mod p).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n + 1}, While[PowerMod[n, k - n, k] != 1, k++]; k]; Array[a, 60] (* Amiram Eldar, Aug 10 2021 *)
  • PARI
    a(n) = my(k=n+1); while (Mod(n, k)^(k-n) != 1, k++); k; \\ Michel Marcus, Aug 10 2021
    
  • Python
    def A346988(n):
        k, kn = n+1, 1
        while True:
            if pow(n,kn,k) == 1:
                return k
            k += 1
            kn += 1 # Chai Wah Wu, Aug 28 2021

Extensions

More terms from Amiram Eldar, Aug 10 2021

A385073 a(n) = b^(n-1) mod n, where b = A053669(n) is the least integer greater than 1 and coprime to n.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 3, 4, 3, 1, 5, 1, 3, 4, 11, 1, 11, 1, 7, 4, 3, 1, 5, 16, 3, 13, 27, 1, 7, 1, 11, 4, 3, 9, 29, 1, 3, 4, 27, 1, 17, 1, 27, 31, 3, 1, 29, 15, 33, 4, 27, 1, 11, 49, 3, 4, 3, 1, 43, 1, 3, 4, 43, 16, 23, 1, 27, 4, 13, 1, 29, 1, 3, 34, 27, 9, 5, 1, 27, 40, 3, 1, 17
Offset: 1

Views

Author

Robert G. Wilson v, Jun 16 2025

Keywords

Comments

Inspired by Fermat's Little Theorem.
a(n) > 0 for n > 1 since n and b are coprime.

Crossrefs

Programs

  • Maple
    f:= proc(n) local b;
      b:= 2;
      while n mod b = 0 do b:= nextprime(b) od;
      b &^ (n-1) mod n
    end proc:
    f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Jun 18 2025
  • Mathematica
    a[n_] := Block[{b = 2}, While[GCD[n, b] > 1, b++]; PowerMod[b, n - 1, n]]; Array[a, 84]
  • PARI
    a(n) = forprime(p=2, , if(n%p, return(lift(Mod(p, n)^(n-1))))); \\ Michel Marcus, Jun 18 2025

Formula

a(n) = 0 iff n = 1.
a(n) = 1 iff n belongs to A000040, A001567, or A130433.
a(n) = 2 iff n>1 and belongs to A173572;
a(n) = 4 iff n belongs to A033553;
a(n) = 8 iff n>7 and belongs to either A033984 or A173138;
a(n) = 16 iff n>15 and belongs to A276968;
a(n) = 32 iff n>1 and belongs to A215610;
a(n) = 64 iff n>63 and belongs to A276969;
a(n) = 128 iff n>127 and belongs to A215611;
a(n) = 256 iff n>255 and belongs to A276970;
a(n) = 512 iff n>511 and belongs to A215612;
a(n) = 1024 iff n>1023 and belongs to A276971;
a(n) = 2048 iff n>2047 and belongs to A215613;
From Robert Israel, Jun 18 2025: (Start)
a(2*p) = 3 if p is a prime > 3.
a(3*p) = 4 if p is a prime > 2.
a(4*p) = 3^3 if p is a prime > 5.
a(6*p) = 5^5 if p is a prime > 509.
a(8*p) = 3^5 if p is a prime > 271.
a(10*p) = 3^9 if p is a prime > 1951.
a(12*p) = 5^11 if p is a prime > 4069003. (End)
Previous Showing 11-16 of 16 results.