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

A127821 a(n) = least k such that the remainder of 13^k divided by k is n.

Original entry on oeis.org

2, 11, 5, 51, 44, 7, 15, 371285, 10, 74853, 158, 13757837, 17, 5805311, 22, 2181, 38, 25, 30, 9667, 74, 87, 146, 23441, 88, 19629779, 35, 45, 70, 235433, 46, 55, 34, 309, 134
Offset: 1

Views

Author

Alexander Adamchuk, Jan 30 2007

Keywords

Comments

a(36) > 10^16. - Max Alekseyev, Oct 25 2016

Crossrefs

Programs

  • Mathematica
    t = Table[0, {10000} ]; k = 1; While[ k < 3500000000, a = PowerMod[13, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t

Extensions

More terms from Robert G. Wilson v, Feb 06 2007
a(264), a(798), a(884), a(896), a(976), a(980), a(152), a(171), a(296), a(464), a(824), a(870) from Daniel Morel, Jun 17, Nov 30 2010

A078457 a(n) = least positive k such that the remainder when 3^k is divided by k is n.

Original entry on oeis.org

1, 2, 2929, 5, 41459, 76, 21, 295, 2352527, 10, 963400369, 1162, 15, 68, 22082967607, 42, 144937, 217, 25, 1054, 1948397, 60, 14495, 266, 721, 28, 4343, 33, 193511, 52, 6884974839, 49, 1055, 48, 622699582951, 39806, 333, 44, 205, 70, 791, 460, 335, 725, 439889
Offset: 0

Views

Author

Robert G. Wilson v, Dec 31 2002

Keywords

Comments

a(n) > n. Numbers n such that a(n-1) = n are listed in A015949.
a(n) for which no value is currently known: n = 394, 494, 634, 730, 974, 986, 1000, ...

Crossrefs

Programs

  • Mathematica
    a = Table[0, {50}]; Do[b = PowerMod[3, n, n]; If[b < 51 && a[[b]] == 0, a[[b]] = n], {n, 1, 56*10^6}]; a
    t = Table[0, {1000} ]; k = 1; While[ k < 200000000, a = PowerMod[3, k, k]; If[a < 1001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t

Extensions

More terms from Don Reble, Jan 02 2003
a(14) conjectured by Max Alekseyev, Jun 17 2006
a(14) confirmed by Ryan Propper, Feb 03 2007
a(30) from Ryan Propper, Feb 03 2007
a(56), a(110), a(128), a(134), a(187), a(286), a(348), a(392), a(470), a(512), a(550), a(596), a(672), a(676), a(688), a(703), a(716), a(748), a(772), a(784), a(860), a(980) from Jan-Christoph Schlage-Puchta (jcp(AT)mathematik.uni-freiburg.de), May 26 2008
Corrections from Jon E. Schoenfield, Oct 10 2008
a(664), a(928) from Mark Forbes (m.g.forbes(AT)ieee.org), Oct 25 2009
a(34), a(74), a(160) from Hagen von Eitzen, May 08, Jun 16 2009
a(254), a(310) from Daniel Morel, Sep 13, Sep 29 2009
Edited by Max Alekseyev, Feb 11 2012

A119678 a(n) is the least k such that 4^k mod k = n.

Original entry on oeis.org

3, 14, 137243, 5, 6821, 10, 57, 124, 35, 18, 2791496231, 244, 51, 505, 199534799, 20, 30271293169, 49, 45, 236, 399531841, 42, 533, 25, 39, 50, 352957, 36, 995, 98, 33, 112, 47503, 55, 42345881, 44, 2981, 289, 805, 78, 1019971289, 25498, 2121, 212
Offset: 1

Views

Author

Ryan Propper, Jun 12 2006

Keywords

Comments

a(n) > n.
Numbers n > 1 such that a(n-1) = n are listed in A015950.
a(87) > 10^14.
a(11) <= 2791496231, a(17) <= 140631956671, a(53) <= 52134328061 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 10 2007

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[PowerMod[4, k, k] != n, k++ ]; Print[k], {n, 30}]
    t = Table[0, {10000} ]; k = 1; While[ k < 5000000000, a = PowerMod[4, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t (* search limits expanded by Robert G. Wilson v, Jul 14 2009 *)
  • Python
    def a(n):
      k = 1
      while 4**k % k != n: k += 1
      return k
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, Mar 14 2021

Formula

a(5^k-1) = 5^k.

Extensions

a(11) = 2791496231 from Robert G. Wilson v, Feb 11 2007; confirmed by Ryan Propper, Feb 15 2007
Link corrected by R. J. Mathar, Jul 24 2009
a(83) = 3085807457009 = 113 * 331 * 82501603 from Hagen von Eitzen, Jul 27 2009

A119679 a(n) = least k such that the remainder when 5^k is divided by k is n.

Original entry on oeis.org

2, 3, 22, 4769, 7, 15853, 114, 9, 28, 35, 14, 1328467, 68, 111, 1555, 9569200211, 76, 2030227, 49, 21, 299, 1097122717, 51, 546707, 26, 27, 121, 529, 596, 3095, 138, 93, 136, 34723, 45, 589, 198, 87, 18142961, 595, 292, 319, 318, 117, 55, 20485243, 91
Offset: 1

Views

Author

Ryan Propper, Jun 12 2006

Keywords

Comments

From Alexander Adamchuk, Jan 31 2007: (Start)
a(n) > n.
For numbers n such that a(n-1) = n, see A015951 except first term. (End)
a(58) <= 16860204577843069 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 06 2007

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[PowerMod[5, k, k] != n, k++ ]; Print[k], {n, 30}]
    Table[0, {10000}]; k = 1; lst = {}; While[k < 5000000000, a = PowerMod[5, k, k]; If[ a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a,k}]]; k++ ]; t (* changed (to reflect the new limits) by Robert G. Wilson v, Jul 14 2009 *)

Extensions

Revised by Max Alekseyev, Sep 25 2007
a(172) = 26598818717 = 23 * 593 * 1039 * 1877, a(288) = 9158745413 = 241 * 347 * 109519, a(518) = 33288260241 = 3 * 43 * 258048529, a(558) = 7722115807 = 7 * 157 * 7026493 from Daniel Morel, May 18 2010
a(848) = 6672480963 = 3 * 241 * 9228881 from Daniel Morel, May 26 2010
a(416) = 10545901269 from Daniel Morel, Jul 05 2010
a(948) = 146246024857 from Daniel Morel, Jul 12 2010
a(822) = 466661006683 from Daniel Morel, Aug 24 2010

A119714 a(n) is the least k such that the remainder when 8^k is divided by k is n.

Original entry on oeis.org

7, 3, 5, 6, 39, 58, 7342733, 9, 36196439, 18, 501, 26, 13607, 249, 119, 20, 33, 25, 866401, 22, 533, 35, 185, 50, 196673, 27, 1843, 36, 69, 34, 551, 55, 3773365, 110, 159, 116, 355, 237, 8401, 52, 471, 81815, 85, 261, 11783479, 3258, 93, 92, 1885511821439
Offset: 1

Views

Author

Ryan Propper, Jun 12 2006

Keywords

Comments

a(61) = 1802190094793 = 11 * 59 * 17839 * 155663. - Hagen von Eitzen, Jul 28 2009

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[PowerMod[8, k, k] != n, k++ ]; Print[k], {n, 48}]
    t = Table[0, {10000}]; k = 1; lst = {}; While[k < 4300000000, a = PowerMod[8, k, k]; If[ a<10001 && t[[a]]==0, t[[a]]=k; Print[{a,k}]]; k++ ]; t (* Mathematica coding extended to reflect the new search limits as posted in the a-file by Robert G. Wilson v, Jul 17 2009 *)

Extensions

a(49) from Hagen von Eitzen, Jul 24 2009

A127817 a(n) = least k such that the remainder when 9^k is divided by k is n.

Original entry on oeis.org

2, 7, 6, 5, 38, 723, 74, 2592842671511, 11, 3827, 14, 717, 34, 59035, 21, 259, 152, 237, 62, 626131, 30, 169, 58, 25, 56, 1921, 39, 361, 65, 49, 63010, 287, 48, 55, 46, 63, 932, 3786791, 69, 69637, 230, 221, 6707, 1057, 57, 4907, 253, 681, 148, 393217991, 70
Offset: 1

Views

Author

Alexander Adamchuk, Jan 30 2007

Keywords

Examples

			For n=4, since 9^5 == 4 (mod 5) and 9^k is not congruent to 4 (mod k) for any k < 5, a(4) = 5. _Michael B. Porter_, Dec 10 2016
		

Crossrefs

Programs

  • Maple
    a127817 := [seq(0,j=1..nmax)] ; for k from 1 do n := modp(9^k,k) ; if n > 0 and n <= nmax then if op(n,a127817) = 0 then a127817 := subsop(n=k,a127817) ; print( op(1..50,a127817) ) ; fi; fi; od: # R. J. Mathar, Jul 16 2009
  • Mathematica
    t = Table[0, {10000}]; k = 1; lst = {}; While[k < 4500000000, a = PowerMod[9, k, k]; If[ a<10001 && t[[a]]==0, t[[a]]=k; Print[{a,k}]]; k++ ]; t

Extensions

a(8) <= 2592842671511 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 06 2007
I changed the Mathematica coding to reflect the current limits Robert G. Wilson v, Jul 18 2009
Value for a(8) as suggested by J. K. Crump confirmed by Hagen von Eitzen, Jul 21 2009
Authorship of a-file corrected by R. J. Mathar, Aug 24 2009

A119715 a(n) = least k such that the remainder when 7^k is divided by k is n.

Original entry on oeis.org

2, 5, 46, 339, 22, 387497, 11, 535, 10, 111, 38, 8399, 15, 497, 34, 327, 365, 515, 30, 7219931, 28, 321, 26, 223793, 44, 10718597, 242, 35, 2330, 209, 39, 305, 136, 309, 4382, 10596486211, 45, 24751, 7327, 121, 236, 78821, 55, 4117, 76, 1751, 30514339, 83795, 50, 1333
Offset: 1

Views

Author

Ryan Propper, Jun 12 2006

Keywords

Crossrefs

Programs

  • Mathematica
    t = Table[0, {10000}]; k = 1; lst = {}; While[k < 4100000000, a = PowerMod[7, k, k]; If[ a<10001 && t[[a]]==0, t[[a]]=k; Print[{a,k}]]; k++ ]; t (* changed (to reflect the new limits) by Robert G. Wilson v, Jul 17 2009 *)
    lk[n_]:=Module[{k=1},While[PowerMod[7,k,k]!=n,k++];k]; Array[lk,50] (* The program will take a long time to run. *) (* Harvey P. Dale, Jan 29 2023 *)

Extensions

a(36) = 10596486211 and later terms from Ryan Propper, Feb 02 2007

A127816 a(n) = least k >= 1 such that the remainder when 6^k is divided by k is n.

Original entry on oeis.org

5, 34, 213, 68, 4021227877, 7, 121129, 14, 69, 26, 767, 51, 6191, 22, 201, 20, 1919, 33, 169, 44, 39, 1778, 1926049, 174, 2673413, 50, 63, 451, 1257243481237, 93, 851, 316, 183, 14809, 1969, 38, 1362959, 1826, 177, 289, 65, 87, 5567, 1252, 57, 1651, 6403249
Offset: 1

Views

Author

Alexander Adamchuk, Jan 30 2007, Feb 05 2007

Keywords

Comments

a(7^k-1) = 7^k.

Crossrefs

Programs

  • Mathematica
    t = Table[0, {10000}]; k = 1; lst = {}; While[k < 5600000000, a = PowerMod[6, k, k]; If[ a<10001 && t[[a]]==0, t[[a]]=k; Print[{a,k}]]; k++ ]; t

Formula

a(7^k-1) = 7^k.

Extensions

a(5) from Joe K. Crump confirmed and a(6)-a(28) added by Ryan Propper, Feb 21 2007
I combined the two Mathematica codings into one and extended the search limits. - Robert G. Wilson v, Jul 16 2009
a(29) as conjectured by J. K. Crump confirmed by Hagen von Eitzen, Jul 21 2009
Corrected authorship of the a-file - R. J. Mathar, Aug 24 2009

A127818 a(n) is the least k such that the remainder when 10^k is divided by k is n.

Original entry on oeis.org

3, 14, 7, 6, 35, 94, 993, 46, 22963573117, 11, 15084115509707, 22, 21, 86, 99985, 24, 221819, 82, 327, 1996, 28039, 26, 169, 38, 39, 74, 24257, 36, 10191082613, 65, 49, 34, 4739, 66, 99965, 188, 171, 62, 3753219157, 60, 3961, 58, 87, 76, 28315, 159, 10441
Offset: 1

Views

Author

Alexander Adamchuk, Jan 30 2007

Keywords

Comments

a(9) <= 22963573117 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 09 2007
a(11) <= 15084115509707 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 06 2007
a(29) <= 112237795073 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 09 2007
a(39) <= 3753219157 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 10 2007

Crossrefs

Programs

  • Mathematica
    t = Table[0, {10000} ]; k = 1; While[ k < 4000000000, a = PowerMod[10, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t
  • Python
    def a(n):
      k = 1
      while 10**k % k != n: k += 1
      return k
    print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Mar 14 2021

Extensions

Crump's values for a(9), a(11), a(39) confirmed, a(29) = 10191082613 = 16763 * 607951 by Hagen von Eitzen, Jul 29 2009
Showing 1-10 of 67 results. Next