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-10 of 17 results. Next

A015910 a(n) = 2^n mod n.

Original entry on oeis.org

0, 0, 2, 0, 2, 4, 2, 0, 8, 4, 2, 4, 2, 4, 8, 0, 2, 10, 2, 16, 8, 4, 2, 16, 7, 4, 26, 16, 2, 4, 2, 0, 8, 4, 18, 28, 2, 4, 8, 16, 2, 22, 2, 16, 17, 4, 2, 16, 30, 24, 8, 16, 2, 28, 43, 32, 8, 4, 2, 16, 2, 4, 8, 0, 32, 64, 2, 16, 8, 44, 2, 64, 2, 4, 68, 16, 18, 64, 2, 16, 80, 4, 2, 64
Offset: 1

Views

Author

Keywords

Comments

2^n == 2 mod n if and only if n is a prime or a member of A001567 or of A006935. [Guy]. - N. J. A. Sloane, Mar 22 2012; corrected by Thomas Ordowski, Mar 26 2016
Known solutions to 2^n == 3 (mod n) are given in A050259.
This sequence is conjectured to include every integer k >= 0 except k = 1. A036236 includes a proof that k = 1 is not in this sequence, and n = A036236(k) solves a(n) = k for all other 0 <= k <= 1000. - David W. Wilson, Oct 11 2011
It could be argued that a(0) := 1 would make sense, e.g., thinking of "mod n" as "in Z/nZ", and/or because (anything)^0 = 1. See also A112987. - M. F. Hasler, Nov 09 2018

Examples

			a(7) = 2 because 2^7 = 128 = 2 mod 7.
a(8) = 0 because 2^8 = 256 = 0 mod 8.
a(9) = 8 because 2^9 = 512 = 8 mod 9.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, F10.

Crossrefs

Programs

Formula

a(2^k) = 0. - Alonso del Arte, Nov 10 2014
a(n) == 2^(n-phi(n)) mod n, where phi(n) = A000010(n). - Thomas Ordowski, Mar 26 2016

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

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

Original entry on oeis.org

1, 20737, 93527, 228727, 373457, 540857, 2231327, 11232137, 15088847, 15235703, 24601943, 43092527, 49891487, 66171767, 71429177, 137134727, 207426737, 209402327, 269165561, 302357057, 383696711, 513013327
Offset: 1

Views

Author

Michel Lagneau, Feb 22 2010

Keywords

Comments

The odd terms of A015921.
Also, nonprime integers n such that 2^(n-2) == 1 (mod n).
For all m, 2^A050259(m)-1 belongs to this sequence.
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)

References

  • A. E. Bojarincev, Asymptotic expressions for the n-th composite number, Univ. Mat. Zap. 6:21-43 (1967). (in Russian)
  • R. K. Guy, Unsolved Problems in Number Theory, Springer-Verlag, Third Edition, 2004
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.

Crossrefs

Programs

  • Maple
    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:
  • Mathematica
    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 *)
  • PARI
    is(n) = n%2==1 && Mod(2,n)^n==Mod(4,n) \\ Jinyuan Wang, Feb 22 2019

Extensions

Edited and term 1 prepended by Max Alekseyev, Aug 09 2012

A116630 Positive integers n such that 13^n == 4 (mod n).

Original entry on oeis.org

1, 3, 51, 129, 125869, 158287, 1723647, 1839003, 90808797, 3661886147, 7368982721, 130424652229, 1616928424359, 4003183891851, 66657658685869
Offset: 1

Views

Author

Zak Seidov, Feb 19 2006

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Nov 26 2017
Some larger terms: 84058689739550643018360088224267, 11083544368708558891212925543084197628431243723. - Max Alekseyev, Jun 26 2011

Crossrefs

Solutions to 13^n == k (mod n): A001022 (k=0), A015963(k=-1), A116621 (k=1), A116622 (k=2), A116629(k=3), this sequence (k=4), A116611 (k=5), A116631 (k=6), A116632 (k=7), A295532 (k=8), A116636 (k=9), A116620(k=10), A116638 (k=11), A116639 (k=15)

Programs

  • Mathematica
    Join[{1, 3}, Select[Range[1, 5000], Mod[13^#, #] == 4 &]] (* G. C. Greubel, Nov 19 2017 *)
    Join[{1, 3}, Select[Range[2000000], PowerMod[13, #, #] == 4 &]] (* Robert Price, Apr 10 2020 *)
  • PARI
    isok(n) = Mod(13, n)^n == 4; \\ Michel Marcus, Nov 19 2017

Extensions

More terms from Ryan Propper, Jan 09 2008
Terms 1,3 prepended and a(12)-a(15) added by Max Alekseyev, Jun 26 2011, Nov 26 2017

A128122 Numbers m such that 2^m == 6 (mod m).

Original entry on oeis.org

1, 2, 10669, 6611474, 43070220513807782
Offset: 1

Views

Author

Alexander Adamchuk, Feb 15 2007

Keywords

Comments

No other terms below 10^17. - Max Alekseyev, Nov 18 2022
A large term: 862*(2^861-3)/281437921287063162726198552345362315020202285185118249390789 (203 digits). - Max Alekseyev, Sep 24 2016

Examples

			2 == 6 (mod 1), so 1 is a term;
4 == 6 (mod 2), so 2 is a term.
		

Crossrefs

Solutions to 2^m == k (mod m): A000079 (k=0),A187787 (k=1/2), A296369 (k=-1/2), A006521 (k=-1), A296370 (k=3/2), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), this sequence (k=6), A245728 (k=-6), A033981 (k=7), A240941 (k=-7), A015922 (k=8), A245319 (k=-8), A051447 (k=9), A240942 (k=-9), A128123 (k=10), A245594 (k=-10), A033982 (k=11), A128124 (k=12), A051446 (k=13), A128125 (k=14), A033983 (k=15), A015924 (k=16), A124974 (k=17), A128126 (k=18), A125000 (k=19), A015925 (k=2^5), A015926 (k=2^6), A015927 (k=2^7), A015929 (k=2^8), A015931 (k=2^9), A015932 (k=2^10), A015935 (k=2^11), A015937 (k=2^12)

Programs

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

Extensions

1 and 2 added by N. J. A. Sloane, Apr 23 2007
a(5) from Max Alekseyev, Nov 18 2022

A296369 Numbers m such that 2^m == -1/2 (mod m).

Original entry on oeis.org

1, 5, 65, 377, 1189, 1469, 25805, 58589, 134945, 137345, 170585, 272609, 285389, 420209, 538733, 592409, 618449, 680705, 778805, 1163065, 1520441, 1700945, 2099201, 2831009, 4020029, 4174169, 4516109, 5059889, 5215769
Offset: 1

Views

Author

Max Alekseyev, Dec 10 2017

Keywords

Comments

Equivalently, 2^(m+1) == -1 (mod m), or m divides 2^(m+1) + 1.
The sequence is infinite, see A055685.

Crossrefs

Solutions to 2^m == k (mod m): A296370 (k=3/2), A187787 (k=1/2), this sequence (k=-1/2), A000079 (k=0), A006521 (k=-1), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), A128122 (k=6), A245728 (k=-6), A033981 (k=7), A240941 (k=-7), A015922 (k=8), A245319 (k=-8), A051447 (k=9), A240942 (k=-9), A128123 (k=10), A245594 (k=-10), A033982 (k=11), A128124 (k=12), A051446 (k=13), A128125 (k=14), A033983 (k=15), A015924 (k=16), A124974 (k=17), A128126 (k=18), A125000 (k=19), A015925 (k=2^5), A015926 (k=2^6), A015927 (k=2^7), A015929 (k=2^8), A015931 (k=2^9), A015932 (k=2^10), A015935 (k=2^11), A015937 (k=2^12)

Programs

  • Mathematica
    Select[Range[10^5], Divisible[2^(# + 1) + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • Python
    A296369_list = [n for n in range(1,10**6) if pow(2,n+1,n) == n-1] # Chai Wah Wu, Nov 04 2019

Formula

a(n) = A055685(n) - 1.

Extensions

Incorrect term 4285389 removed by Chai Wah Wu, Nov 04 2019

A015926 Positive integers n such that 2^n == 2^6 (mod n).

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 24, 30, 31, 32, 36, 42, 48, 64, 66, 72, 78, 84, 90, 96, 102, 114, 126, 138, 144, 168, 174, 176, 186, 192, 210, 222, 234, 246, 252, 258, 282, 288, 318, 336, 354, 366, 390, 396, 402, 426, 438, 456, 474, 496, 498, 504, 510, 534, 546
Offset: 1

Views

Author

Keywords

Comments

The odd terms are given by A215610.
For all m, 2^A033981(m)-1 belongs to this sequence.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Mod[2^# - 2^6, #] == 0 &] (* T. D. Noe, Aug 17 2012 *)

Extensions

Edited by Max Alekseyev, Jul 30 2011

A015929 Positive integers n such that 2^n == 2^8 (mod n).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 16, 20, 24, 32, 40, 48, 56, 60, 64, 80, 88, 96, 104, 120, 127, 128, 136, 140, 152, 160, 184, 192, 224, 232, 240, 248, 256, 260, 272, 296, 308, 320, 328, 344, 376, 384, 408, 416, 424, 472, 480
Offset: 1

Views

Author

Keywords

Comments

The odd terms are given by A215611.
For all m, 2^A051447(m)-1 belongs to this sequence.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Mod[2^# - 2^8, #] == 0 &] (* T. D. Noe, Aug 17 2012 *)

Extensions

Edited by Max Alekseyev, Jul 30 2011

A015932 Positive integers n such that 2^n == 2^10 (mod n).

Original entry on oeis.org

1, 2, 4, 6, 7, 8, 10, 12, 16, 24, 28, 30, 32, 34, 48, 50, 64, 70, 73, 96, 110, 112, 128, 130, 150, 170, 190, 192, 230, 256, 290, 310, 330, 370, 384, 410, 430, 442, 448, 470, 512, 530, 532, 550, 590, 610, 670, 710
Offset: 1

Views

Author

Keywords

Comments

The odd terms are given by A215612.
For all m, 2^A033982(m)-1 belongs to this sequence.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Mod[2^# - 2^10, #] == 0 &] (* T. D. Noe, Aug 17 2012 *)

Extensions

Edited by Max Alekseyev, Jul 30 2011

A015937 Positive integers n such that 2^n == 2^12 (mod n).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 22, 23, 24, 32, 36, 40, 42, 48, 60, 62, 64, 68, 72, 80, 84, 89, 96, 120, 126, 128, 132, 144, 156, 160, 168, 180, 192, 204, 228, 240, 252, 256, 276, 288, 312, 320, 336, 340, 348, 352, 360, 372, 384, 420, 444, 462
Offset: 1

Views

Author

Keywords

Comments

The odd terms are given by A215613.
For all m, 2^A051446(m)-1 belongs to this sequence.

Crossrefs

Programs

  • Mathematica
    With[{c=2^12},Select[Range[1,6000],Divisible[2^#-c,#]&]] (* Harvey P. Dale, Mar 20 2011 *)

Extensions

Edited by Max Alekseyev, Jul 31 2011
Showing 1-10 of 17 results. Next