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

A006521 Numbers n such that n divides 2^n + 1.

Original entry on oeis.org

1, 3, 9, 27, 81, 171, 243, 513, 729, 1539, 2187, 3249, 4617, 6561, 9747, 13203, 13851, 19683, 29241, 39609, 41553, 59049, 61731, 87723, 97641, 118827, 124659, 177147, 185193, 250857, 263169, 292923, 354537, 356481, 373977, 531441, 555579, 752571
Offset: 1

Views

Author

Keywords

Comments

Closed under multiplication: if x and y are terms then so is x*y.
More is true: 1. If n is in the sequence then so is any multiple of n having the same prime factors as n. 2. If n and m are in the sequence then so is lcm(n,m). For a proof see the Bailey-Smyth reference. Elements of the sequence that cannot be generated from smaller elements of the sequence using either of these rules are called *primitive*. The sequence of primitive solutions of n|2^n+1 is A136473. 3. The sequence satisfies various congruences, which enable it to be generated quickly. For instance, every element of this sequence not a power of 3 is divisible either by 171 or 243 or 13203 or 2354697 or 10970073 or 22032887841. See the Bailey-Smyth reference. - Toby Bailey and Christopher J. Smyth, Jan 13 2008
A000051(a(n)) mod a(n) = 0. - Reinhard Zumkeller, Jul 17 2014
The number of terms < 10^n: 3, 5, 9, 15, 25, 40, 68, 114, 188, 309, 518, 851, .... - Robert G. Wilson v, May 03 2015
Also known as Novák numbers after Břetislav Novák who was apparently the first to study this sequence. - Charles R Greathouse IV, Nov 03 2016
Conjecture: if n divides 2^n+1, then (2^n+1)/n is squarefree. Cf. A272361. - Thomas Ordowski, Dec 13 2018
Conjecture: For k > 1, k^m == 1 - k (mod m) has an infinite number of positive solutions. - Juri-Stepan Gerasimov, Sep 29 2019

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 243, p. 68, Ellipses, Paris 2008.
  • R. Honsberger, Mathematical Gems, M.A.A., 1973, p. 142.
  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #16.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A014945.
Cf. A057719 (prime factors), A136473 (primitive n such that n divides 2^n+1).
Cf. A066807 (the corresponding quotients).
Solutions to k^m == k-1 (mod m): 1 (k = 1), this sequence (k = 2), A015973 (k = 3), A327840 (k = 4), A123047 (k = 5), A327943 (k = 6), A328033 (k = 7).
Column k=2 of A333429.

Programs

  • Haskell
    a006521 n = a006521_list !! (n-1)
    a006521_list = filter (\x -> a000051 x `mod` x == 0) [1..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..6*10^5] | (2^n+1) mod n eq 0 ]; // Vincenzo Librandi, Dec 14 2018
  • Maple
    for n from 1 to 1000 do if 2^n +1 mod n = 0 then lprint(n); fi; od;
    S:=1,3,9,27,81:C:={171,243,13203,2354697,10970073,22032887841}: for c in C do for j from c to 10^8 by 2*c do if 2&^j+1 mod j = 0 then S:=S, j;fi;od;od; S:=op(sort([op({S})])); # Toby Bailey and Christopher J. Smyth, Jan 13 2008
  • Mathematica
    Do[If[PowerMod[2, n, n] + 1 == n, Print[n]], {n, 1, 10^6}]
    k = 9; lst = {1, 3}; While[k < 1000000, a = PowerMod[2, k, k]; If[a + 1 == k, AppendTo[lst, k]]; k += 18]; lst (* Robert G. Wilson v, Jul 06 2009 *)
    Select[Range[10^5], Divisible[2^# + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • PARI
    for(n=1,10^6,if(Mod(2,n)^n==-1,print1(n,", "))); \\ Joerg Arndt, Nov 30 2014
    
  • Python
    A006521_list = [n for n in range(1,10**6) if pow(2,n,n) == n-1] # Chai Wah Wu, Jul 25 2017
    

Extensions

More terms from David W. Wilson, Jul 06 2009

A015951 Numbers k such that k | 5^k + 1.

Original entry on oeis.org

1, 2, 3, 9, 21, 26, 27, 63, 81, 147, 189, 243, 338, 441, 567, 609, 729, 903, 1029, 1323, 1378, 1701, 1827, 2187, 2667, 2709, 3087, 3969, 4263, 4394, 4401, 5103, 5481, 6321, 6561, 7203, 8001, 8127, 9261, 9429, 11907, 12789, 13149, 13203
Offset: 1

Views

Author

Keywords

Crossrefs

5^k+m is divisible by k: A123062 (m=2), A123052 (m=3), A123047 (m=4).
Column k=5 of A333429.

Programs

  • Magma
    [n: n in [1..10^5] | Modexp(5, n, n)+1 eq n]; // Jinyuan Wang, Dec 29 2018
    
  • Mathematica
    Select[Range@ 14000, Divisible[5^# + 1, #] &] (* Michael De Vlieger, Oct 10 2016 *)
    Select[Range[15000],PowerMod[5,#,#]==#-1&] (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    isok(n) = Mod(5, n)^n == -1; \\ Michel Marcus, Oct 11 2016
    
  • Python
    for n in range(1,10**5):
        if pow(5,n,n)+1 == n: print(n, end=', ') # Stefano Spezia, Dec 30 2018

A123062 Numbers k that divide 5^k + 2.

Original entry on oeis.org

1, 7, 51373, 78127, 138943, 620299, 2842933, 137422693, 2259290321, 413879131637, 434757575329, 915535274009, 14864856896743
Offset: 1

Views

Author

Alexander Adamchuk, Nov 04 2006

Keywords

Comments

No further terms up to 10^15. Larger term: 64629734103979763971. - Max Alekseyev, Oct 15 2016

Crossrefs

Solutions to 5^n == k (mod n): A067946 (k=1), A015951 (k=-1), A124246 (k=2), this sequence (k=-2), A123061 (k=3), A123052 (k=-3), A125949 (k=4), A123047 (k=-4), A123091 (k=5), A015891 (k=-5), A277350 (k=6), A277348 (k=-6).

Programs

  • Mathematica
    Select[Range[1000000], IntegerQ[(PowerMod[5,#,# ]+2)/# ]&]
  • PARI
    is(n)=Mod(5,n)^n==-2 \\ Charles R Greathouse IV, Nov 04 2016

Extensions

More terms from Farideh Firoozbakht, Nov 18 2006
a(9) from Ryan Propper, Jan 29 2007
a(10)-a(13) from Max Alekseyev, Jul 28 2009, Oct 15 2016

A124246 Numbers k that divide 5^k - 2.

Original entry on oeis.org

1, 3, 123, 202884639, 242405133, 92273577267, 2670733723929, 81035221987959
Offset: 1

Views

Author

Farideh Firoozbakht, Nov 19 2006

Keywords

Comments

No other terms below 10^15. Some larger terms: 60092749466423900486673922957841, 401021769827858799355246286337987697472836927856337282726789534497163. - Max Alekseyev, Oct 15 2016

Crossrefs

Solutions to 5^n == k (mod n): A067946 (k=1), A015951 (k=-1), this sequence (k=2), A123062 (k=-2), A123061 (k=3), A123052 (k=-3), A125949 (k=4), A123047 (k=-4), A123091 (k=5), A015891 (k=-5), A277350 (k=6), A277348 (k=-6).

Programs

  • Mathematica
    Do[If[Mod[(PowerMod[5,n,n]-2),n]==0,Print[n]],{n,1000000000}]
  • PARI
    is(n)=Mod(5,n)^n==2 \\ Charles R Greathouse IV, Nov 04 2016

Extensions

a(6)-a(8) from Max Alekseyev, Jul 28 2009, Jun 02 2010, Oct 15 2016

A123061 Numbers k that divide 5^k - 3.

Original entry on oeis.org

1, 2, 22, 77, 242, 371, 16102, 45727, 73447, 81286, 112277, 368237, 10191797, 13563742, 30958697, 389974222, 6171655457, 55606837682, 401469524477, 434715808966, 1729670231597, 12399384518278, 28370781933478, 32458602019394, 45360785149757, 1073804398767214
Offset: 1

Views

Author

Alexander Adamchuk, Nov 04 2006

Keywords

Comments

Some larger terms: 10157607413638637338691, 678641208236297002873422185407157785099272404809011007522511134591325167. - Max Alekseyev, Oct 20 2016

Crossrefs

Solutions to 5^n == k (mod n): A067946 (k=1), A015951 (k=-1), A124246 (k=2), A123062 (k=-2), this sequence (k=3), A123052 (k=-3), A125949 (k=4), A123047 (k=-4), A123091 (k=5), A015891 (k=-5), A277350 (k=6), A277348 (k=-6).

Programs

  • Mathematica
    Select[Range[1000000], IntegerQ[(PowerMod[5,#,# ]-3)/# ]&]
    Do[If[IntegerQ[(PowerMod[5, n, n ]-3)/n], Print[n]], {n, 10^9}] (* Ryan Propper, Dec 30 2006 *)
  • PARI
    is(n)=Mod(5,n)^n==3 \\ Charles R Greathouse IV, Nov 04 2016

Extensions

More terms from Farideh Firoozbakht, Nov 18 2006
Corrected and extended by Ryan Propper, Jan 01 2007
Entry revised by N. J. A. Sloane, Jan 24 2007
a(18) from Lars Blomberg, Dec 12 2011
a(19)-a(26) from Max Alekseyev, Oct 20 2016

A123052 Numbers k that divide 5^k + 3.

Original entry on oeis.org

1, 2, 4, 14, 628, 11524, 16814, 188404, 441484, 2541014, 3984724, 172315684, 208268941, 40874725514, 280454588548, 489850370956, 1235856817732, 62479203805793, 95467808763364, 116016015619396, 396249210287836
Offset: 1

Views

Author

Alexander Adamchuk, Nov 04 2006

Keywords

Comments

No other terms below 10^15. A larger term: 783847656467936404. - Max Alekseyev, Oct 16 2016

Crossrefs

Solutions to 5^n == k (mod n): A067946 (k=1), A015951 (k=-1), A124246 (k=2), A123062 (k=-2), A123061 (k=3), this sequence (k=-3), A125949 (k=4), A123047 (k=-4), A123091 (k=5), A015891 (k=-5), A277350 (k=6), A277348 (k=-6).

Programs

  • Mathematica
    Select[Range[1000000], IntegerQ[(PowerMod[5,#,# ]+3)/# ]&]
  • PARI
    is(n)=Mod(5,n)^n==-3 \\ Charles R Greathouse IV, Apr 06 2014

Extensions

a(10)-a(13) from Ryan Propper, Dec 30 2006, Jan 02 2007
More terms from Lars Blomberg, Nov 25 2011
Terms a(14) onwards were reported incorrect by Toshitaka Suzuki, and have been deleted. - N. J. A. Sloane, Mar 18 2014
a(14)-a(17) from Toshitaka Suzuki, Mar 18 2014, Apr 03 2014
a(18)-a(21) from Max Alekseyev, Oct 16 2016

A125949 Numbers k that divide 5^k - 4.

Original entry on oeis.org

1, 4769, 8563651, 300414792131, 2353957351049, 15960089894129, 452045914836301, 657236915690111
Offset: 1

Views

Author

Alexander Adamchuk, Feb 04 2007

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Oct 17 2016

Crossrefs

Solutions to 5^n == k (mod n): A067946 (k=1), A015951 (k=-1), A124246 (k=2), A123062 (k=-2), A123061 (k=3), A123052 (k=-3), this sequence (k=4), A123047 (k=-4), A123091 (k=5), A015891 (k=-5), A277350 (k=6), A277348 (k=-6).

Programs

  • Mathematica
    a(1) = 1; Do[ If[ PowerMod[5, 2n - 1, 2n - 1] - 4 == 0, Print[2n - 1]], {n,10^9}]
  • PARI
    is(n)=Mod(5,n)^n==4 \\ Charles R Greathouse IV, May 15 2013

Extensions

a(4)-a(8) from Max Alekseyev, Jun 09 2010, Oct 17 2016

A277350 Positive integers n such that 5^n == 6 (mod n).

Original entry on oeis.org

1, 15853, 5520343, 111966563, 2232207889, 5551501871
Offset: 1

Views

Author

Seiichi Manyama, Oct 10 2016

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Oct 18 2016

Crossrefs

Cf. Solutions to 5^n == k (mod n): A277348 (k=-6), A015891 (k=-5), A123047 (k=-4), A123052 (k=-3), A123062 (k=-2), A015951 (k=-1), A067946 (k=1), A124246 (k=2), A123061 (k=3), A125949 (k=4), A123091 (k=5), this sequence (k=6).

Programs

A277348 Positive integers n such that n | (5^n + 6).

Original entry on oeis.org

1, 11, 341, 581337017, 7202608727, 27146455379, 1358496201131, 9843739213499, 172392038905691
Offset: 1

Views

Author

Seiichi Manyama, Oct 10 2016

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Oct 17 2016

Examples

			5^11 + 6 = 48828131 = 11 * 4438921, so 11 is a term.
		

Crossrefs

Cf. A066603.
Cf. Solutions to 5^n == k (mod n): this sequence (k=-6), A015891 (k=-5), A123047 (k=-4), A123052 (k=-3), A123062 (k=-2), A015951 (k=-1), A067946 (k=1), A124246 (k=2), A123061 (k=3), A125949 (k=4), A123091 (k=5), A277350 (k=6).

Programs

  • PARI
    isok(n) = Mod(5, n)^n == -6; \\ Michel Marcus, Oct 10 2016

Formula

A066603(a(n)) = a(n) - 6 for n > 1.

Extensions

a(5)-a(9) from Max Alekseyev, Oct 17 2016

A327943 Numbers m that divide 6^m + 5.

Original entry on oeis.org

1, 11, 341, 186787, 8607491, 9791567, 11703131, 14320387, 50168819, 952168003, 71654478989, 1328490399527
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 30 2019

Keywords

Comments

Conjecture: For k > 1, k^m == 1 - k (mod m) has infinitely many positive solutions.
Also includes 11834972807906571233 = 31*381773316384082943. - Robert Israel, Oct 03 2019
a(13) > 10^15. - Max Alekseyev, Nov 10 2022

Crossrefs

Solutions to k^m == 1-k (mod m): A006521 (k = 2), A015973 (k = 3), A327840 (k = 4), A123047 (k = 5), this sequence (k = 6).

Programs

  • Magma
    [1] cat [n: n in [1..10^8] | Modexp(6, n, n) + 5 eq n];
  • Mathematica
    Join[{1},Select[Range[98*10^5],PowerMod[6,#,#]==#-5&]] (* The program generates the first six terms of the sequence. To generate more, increase the Range constant but the program may take a long time to run. *) (* Harvey P. Dale, Feb 05 2022 *)

Extensions

a(11) from Giovanni Resta, Oct 02 2019
a(12) from Max Alekseyev, Nov 10 2022
Showing 1-10 of 16 results. Next