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 27 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

A015921 Positive integers n such that 2^n == 4 (mod n).

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 14, 22, 26, 30, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 132, 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, 372, 382, 386, 394, 398, 422, 446
Offset: 1

Views

Author

Keywords

Comments

Odd terms are given by A173572.
For all m, 2^A050259(m)-1 belongs to this sequence.

Crossrefs

Contains A050990 as a subsequence.

Programs

  • Mathematica
    Select[Range[500], PowerMod[2, #, #] == 4 &] (* Alonso del Arte, Jul 07 2011 *)

Extensions

Edited and terms 1,2,4 prepended by Max Alekseyev, Jul 29 2011

A015973 Positive integers n such that n | (3^n + 2).

Original entry on oeis.org

1, 5, 77, 278377, 3697489, 219596687717, 56865169816619
Offset: 1

Views

Author

Keywords

Comments

No other terms below 10^15. Some larger term: 3142423971953435020522506484187. - Max Alekseyev, Aug 04 2011

Crossrefs

Solutions to 3^n == k (mod n): A277340 (k=-11), A277289 (k=-7), A277288 (k=-5), this sequence (k=-2), A015949 (k=-1), A067945 (k=1), A276671 (k=2), A276740 (k=5), A277126 (k=7), A277274 (k=11).

Extensions

a(1)=1 prepended and a(6)-a(7) added by Max Alekseyev, Aug 04 2011

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

A116629 Positive integers k such that 13^k == 3 (mod k).

Original entry on oeis.org

1, 2, 5, 166, 287603, 9241538, 2366680105, 8347156585, 21682897793, 6988245760865, 9045859950329, 10076294257985, 50299408064905, 254874726648713
Offset: 1

Views

Author

Zak Seidov, Feb 19 2006

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Nov 24 2017
Some larger terms: 1440926367749746685, 76025040962646716305439353859479569558065. - Max Alekseyev, Jun 29 2011

Crossrefs

Solutions to 13^n == k (mod n): A001022 (k=0), A015963 (k=-1), A116621 (k=1), A116622 (k=2), this sequence (k=3), A116630 (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, 2}, Select[Range[1, 5000], Mod[13^#, #] == 3 &]] (* G. C. Greubel, Nov 19 2017 *)
    Join[{1, 2}, Select[Range[10000000], PowerMod[13, #, #] == 3 &]] (* Robert Price, Apr 10 2020 *)
  • PARI
    isok(n) = Mod(13, n)^n == 3; \\ Michel Marcus, Nov 19 2017

Extensions

Two more terms from Ryan Propper, Jan 09 2008
Terms 1,2 are prepended and a(9)-a(14) are added by Max Alekseyev, Jun 29 2011; Nov 24 2017

A033982 Integers n such that 2^n == 11 (mod n).

Original entry on oeis.org

1, 3, 262279, 143823239, 382114303, 1223853491, 381541784791, 556985326431, 6236258437049, 98828020264153
Offset: 1

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

894157816841269897394424491194255510200782699 belongs to this sequence. [From Max Alekseyev]

Crossrefs

Programs

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

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar
Terms 1, 3 prepended by Max Alekseyev, May 18 2011
a(9), a(10) from Max Alekseyev, Jul 30 2011

A276671 Positive integers k such that 3^k == 2 (mod k).

Original entry on oeis.org

1, 2929, 9742277641, 23341869101, 15092205901438895, 16311037042239935
Offset: 1

Views

Author

Max Alekseyev, Oct 05 2016

Keywords

Comments

No other terms below 2*10^16. A larger term: 31744873758348589012852097851.

Crossrefs

Programs

  • Mathematica
    Join[{1}, Select[Range[10000], PowerMod[3, #, #] == 2 &]] (* Alonso del Arte, Oct 11 2016 *)
  • PARI
    isok(n) = Mod(3, n)^n == Mod(2, n); \\ Dmitry Ezhov, Sep 28 2016

Extensions

Order of terms corrected by Felix Fröhlich, Oct 06 2016
a(5)-a(6) from Sergey Paramonov, Oct 03 2021

A033983 Integers n such that 2^n == 15 (mod n).

Original entry on oeis.org

1, 13, 481, 44669, 1237231339, 1546675117, 62823773963, 284876771881, 1119485807557, 26598440989093
Offset: 1

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

No other terms below 10^14.

Crossrefs

Programs

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

Extensions

One more term from Joe K. Crump (joecr(AT)carolina.rr.com), Jun 20 2000
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar
Terms 1, 13 prepended by Max Alekseyev, May 18 2011
a(10) from Max Alekseyev, Dec 15 2013

A051447 Integers n such that 2^n == 9 (mod n).

Original entry on oeis.org

1, 7, 2228071, 16888457, 352978207, 1737848873, 77362855777, 567442642711
Offset: 1

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

No other terms below 10^15. [Max Alekseyev, May 20 2012]

Crossrefs

Programs

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

Extensions

Edited by N. J. A. Sloane, Jun 22 2008, at the suggestion of Don Reble
Terms 1, 7 prepended by Max Alekseyev, May 18 2011

A128121 Numbers k such that 2^k == 5 (mod k).

Original entry on oeis.org

1, 3, 19147, 129505699483, 674344345281, 1643434407157, 5675297754009, 12174063716147, 162466075477787, 313255455573801, 324082741109271
Offset: 1

Views

Author

Alexander Adamchuk, Feb 15 2007

Keywords

Crossrefs

Cf. A015910, A036236, A050259 (numbers k such that 2^k == 3 (mod k)), A033981, A051447, A033982, A051446, A033983, A128122, A128123, A128124, A128125, A128126.

Programs

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

Extensions

1 and 3 added by N. J. A. Sloane, Apr 23 2007
Missing a(10) inserted by Sergey Paramonov, Sep 06 2021
Showing 1-10 of 27 results. Next