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 37 results. Next

A036236 Least inverse of A015910: smallest integer k > 0 such that 2^k mod k = n, or 0 if no such k exists.

Original entry on oeis.org

1, 0, 3, 4700063497, 6, 19147, 10669, 25, 9, 2228071, 18, 262279, 3763, 95, 1010, 481, 20, 45, 35, 2873, 2951, 3175999, 42, 555, 50, 95921, 27, 174934013, 36, 777, 49, 140039, 56, 2463240427, 110, 477, 697, 91, 578, 623, 156, 2453, 540923, 55, 70, 345119, 287
Offset: 0

Views

Author

Keywords

Comments

a(1) = 0, that is, no n exists with 2^n mod n = 1. Proof: Assume that there exists such n > 1. Consider its smallest prime divisor p. Then 2^n == 1 (mod p) implying that the multiplicative order ord_p(2) divides n. However, since ord_p(2) < p and p is the smallest divisor of n, we have ord_p(2) = 1, that is, p divides 2^1 - 1 = 1 which is impossible. - Max Alekseyev
_Labos Elemer_ asked on Sep 27 2001 if all numbers > 1 eventually appear in A015910, that is, if a(n) > 0 for n > 1.
Ron Graham's conjecture from 1960 states that for any n > 1 there are infinitely many solutions to 2^k mod k = n. - Max Alekseyev, Oct 19 2024
Obviously k > n. - Daniel Forgues, Jul 06 2015

Examples

			n = 0: 2^1 mod 1 = 0, a(0) = 1;
n = 1: 2^k mod k = 1, no such k exists, so a(1) = 0;
n = 2: 2^3 mod 3 = 2, a(2) = 3;
n = 3: 2^4700063497 mod 4700063497 = 3, a(3) = 4700063497.
		

References

  • P. Erdős and R. L. Graham, Old and new problems and results in combinatorial number theory, Monographies de L'Enseignement Mathématique, 28, 1980.
  • R. K. Guy, Unsolved Problems in Number Theory, Section F10.

Crossrefs

Programs

  • Mathematica
    a = Table[0, {75} ]; Do[ b = PowerMod[2, n, n]; If[b < 76 && a[[b]] == 0, a[[b]] = n], {n, 1, 5*10^9} ]; a
    (* Second program: *)
    t = Table[0, {1000} ]; k = 1; While[ k < 6500000000, b = PowerMod[2, k, k]; If[b < 1001 && t[[b]] == 0, t[[b]] = k]; k++ ]; t
    nk[n_] := Module[ {k}, k = 1; While[PowerMod[2, k, k] != n, k++]; k]
    Join[{1, 0}, Table[nk[i], {i, 2, 46}]]  (* Robert Price, Oct 11 2018 *)
  • PARI
    a(n)=if(n==1,return(0));my(k=n);while(lift(Mod(2,k)^k)!=n,k++);k \\ Charles R Greathouse IV, Oct 12 2011

Formula

It's obvious that for each k, a(k) > k and we can easily prove that 2^(3^n) = 3^n-1 (mod 3^n). So 3^n is the least k with 2^k mod k = 3^n-1. Hence for each n, a(3^n-1) = 3^n. - Farideh Firoozbakht, Nov 14 2006

Extensions

a(3) was first computed by the Lehmers.
More terms from Joe K. Crump (joecr(AT)carolina.rr.com), Sep 04 2000
a(69) = 887817490061261 = 29 * 37 * 12967 * 63809371. - Hagen von Eitzen, Jul 26 2009
Edited by Max Alekseyev, Jul 29 2011

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

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

Original entry on oeis.org

2, 3, 118, 7, 39, 155, 38, 9, 14, 18659, 13, 8153, 92, 1317, 106, 35, 26, 49, 34, 57, 68, 253, 327, 1271, 28, 27, 94, 1633, 46, 161, 415, 1141, 44, 909589, 86, 161015, 119, 1293, 82, 673279, 129, 577679, 4578, 77, 164, 65, 74, 3589, 76, 147, 115
Offset: 1

Views

Author

Alexander Adamchuk, Jan 30 2007

Keywords

Crossrefs

Programs

  • Mathematica
    t = Table[0, {10000} ]; k = 1; While[ k < 4300000000, a = PowerMod[11, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t
    f[n_]:=Module[{k=1},While[PowerMod[11,k,k]!=n,k++];k]; Array[f,51] (* Harvey P. Dale, Mar 12 2013 *)

Extensions

a(52) from Max Alekseyev & Joe K. Crump (joecr(AT)carolina.rr.com), Feb 06 2007
a(108), a(514), a(754), a(808), a(820), a(880), a(934), a(948) added by Daniel Morel, May 18 2010, Jun 17 2010
a-file updated by Max Alekseyev, Dec 10 2010
a(112), a(348), a(810) added by Daniel Morel, Mar 12 2015
Showing 1-10 of 37 results. Next