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

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

A276740 Numbers n such that 3^n == 5 (mod n).

Original entry on oeis.org

1, 2, 4, 76, 418, 1102, 4687, 7637, 139183, 2543923, 1614895738, 9083990938, 23149317409, 497240757797, 4447730232523, 16000967516764, 65262766108619, 141644055557882
Offset: 1

Views

Author

Dmitry Ezhov, Sep 16 2016

Keywords

Comments

No other terms below 10^15. Some larger terms: 194995887252090239, 2185052151122686482926861593785262. - Max Alekseyev, Oct 13 2016

Examples

			3 == 5 (mod 1), so 1 is a term;
9 == 5 (mod 2), so 2 is a term.
		

Crossrefs

Cf. A066601.
Solutions to 3^n == k (mod n): A277340 (k=-11), A277289 (k=-7), A277288 (k=-5), A015973 (k=-2), A015949 (k=-1), A067945 (k=1), A276671 (k=2), this sequence (k=5), A277628 (k=6), A277126 (k=7), A277630 (k=8), A277274 (k=11).

Programs

  • Mathematica
    Select[Range[10^7], PowerMod[3, #, #] == Mod[5, #] &] (* Michael De Vlieger, Sep 26 2016 *)
  • PARI
    isok(n) = Mod(3, n)^n == Mod(5, n); \\ Michel Marcus, Sep 17 2016
    
  • Python
    A276740_list = [1,2,4]+[n for n in range(5,10**6) if pow(3,n,n) == 5] # Chai Wah Wu, Oct 04 2016

Extensions

a(11)-a(13) from Chai Wah Wu, Oct 05 2016
a(14) from Lars Blomberg, Oct 12 2016
a(15)-a(18) from Max Alekseyev, Oct 13 2016
a(12) was missing Robert G. Wilson v, Oct 19 2016

A277126 Positive integers n such that 3^n == 7 (mod n).

Original entry on oeis.org

1, 2, 295, 883438, 252027511, 7469046275, 26782373099, 53191768475, 55246802458, 819613658855, 893727887879978
Offset: 1

Views

Author

Seiichi Manyama, Oct 06 2016

Keywords

Comments

No other terms below 10^15. A larger term: 9135884036634915191945452485106476242. - Max Alekseyev, Oct 12 2016
Terms are not divisible by 127 (Alekseyev 2016).

Examples

			3 == 7 mod 1, so 1 is a term;
9 == 7 mod 2, so 2 is a term.
		

References

  • M. A. Alekseyev. "Problem 4101". Crux Mathematicorum 42:1 (2016), 28.

Crossrefs

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

Programs

Extensions

a(5) from Joerg Arndt, Oct 06 2016
a(6)-a(11) from Max Alekseyev, Oct 12 2016

A277288 Positive integers k such that k divides 3^k + 5.

Original entry on oeis.org

1, 2, 14, 1978, 38209, 4782974, 9581014, 244330711, 365496202, 1661392258, 116084432414, 288504187458218, 490179448388654, 802245996685561
Offset: 1

Views

Author

Seiichi Manyama, Oct 09 2016

Keywords

Comments

No other terms below 10^15. Some larger terms: 79854828136468902206, 3518556634988844968631084847788071912030455376274045370172567094578. - Max Alekseyev, Oct 14 2016

Examples

			3^14 + 5 = 4782974 = 14 * 341641, so 14 is a term.
		

Crossrefs

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

Programs

  • PARI
    is(n)=Mod(3,n)^n==-5; \\ Joerg Arndt, Oct 09 2016
    
  • Python
    A277288_list = [1,2]+[n for n in range(3,10**6) if pow(3,n,n)==n-5] # Chai Wah Wu, Oct 09 2016
    
  • Sage
    def A277288_list(search_limit):
        n, t, r = 1, Integer(3), [1]
        while n < search_limit:
            n += 1
            t *= 3
            if n.divides(t+5): r.append(n)
        return r # Peter Luschny, Oct 10 2016

Extensions

a(9) from Joerg Arndt, Oct 09 2016
a(10) from Chai Wah Wu, Oct 09 2016
a(11)-a(14) from Max Alekseyev, Oct 14 2016

A277289 Positive integers n such that n | (3^n + 7).

Original entry on oeis.org

1, 2, 4, 5, 8, 25, 44, 4664, 6568, 1353025, 2919526, 5709589, 7827725, 64661225, 85132756, 153872408, 743947534, 34304296003, 38832409867, 40263727492, 1946603375348, 2469908330348, 64471909888247, 274267749806485, 888906849689897, 896501949422459
Offset: 1

Views

Author

Seiichi Manyama, Oct 09 2016

Keywords

Comments

No other terms below 10^15. - Max Alekseyev, Oct 14 2016
492385451091805616444 is a term.

Examples

			3^25 + 7 = 847288609450 = 25 * 33891544378, so 25 is a term.
		

Crossrefs

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

Programs

  • PARI
    is(n)=Mod(3,n)^n==-7; \\ Joerg Arndt, Oct 09 2016
    
  • Python
    A277289_list = [1,2,4,5]+[n for n in range(6,10**6) if pow(3,n,n)==n-7] # Chai Wah Wu, Oct 12 2016

Extensions

a(17) from Joerg Arndt, Oct 09 2016
a(18)-a(20) from Chai Wah Wu, Oct 12 2016
a(21)-a(26) from Max Alekseyev, Oct 14 2016

A277274 Positive integers n such that 3^n == 11 (mod n).

Original entry on oeis.org

1, 2, 1162, 1692934, 3851999, 274422823, 14543645261, 492230729674, 773046873382, 13010754158393, 31446154470014, 583396812890467, 598371102650063
Offset: 1

Views

Author

Seiichi Manyama, Oct 08 2016

Keywords

Comments

No other terms below 10^15. Some larger terms: 38726095838775708310162, 2682806839696008709567739369. - Max Alekseyev, Oct 12 2016

Examples

			3 == 11 mod 1, so 1 is a term.
9 == 11 mod 2, so 2 is a term.
		

Crossrefs

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

Programs

  • Mathematica
    k = 3; lst = {1, 2}; While[k < 12000000001, If[ PowerMod[3, k, k] == 11, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Oct 08 2016 *)

Extensions

a(7)-a(13) from Max Alekseyev, Oct 12 2016

A277340 Positive integers n such that n | (3^n + 11).

Original entry on oeis.org

1, 2, 4, 7, 10, 92, 1099, 29530, 281473, 657892, 3313964, 9816013, 18669155396, 94849225930, 358676424226, 957439868543, 1586504109310, 41431374800470, 241469610359708, 256165266592379
Offset: 1

Views

Author

Seiichi Manyama, Oct 09 2016

Keywords

Comments

No other terms below 10^15. Some larger terms: 9151612250553176993, 1401778935853533028413047652833, 5645122353966835994338815444821661584288016927879134, 313*(3^626+11)/6562567821545333606830 (280 digits). - Max Alekseyev, Oct 14 2016

Examples

			3^10 + 11 = 59060 = 10 * 5906, so 10 is a term.
		

Crossrefs

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

Programs

  • PARI
    is(n)=Mod(3,n)^n==-11; \\ Joerg Arndt, Oct 10 2016
    
  • Python
    A277340_list = [1,2,4,7,10]+[n for n in range(11,10**6) if pow(3,n,n)==n-11] # Chai Wah Wu, Oct 11 2016

Extensions

a(13)-a(14) from Chai Wah Wu, Oct 12 2016
a(15)-a(20) from Max Alekseyev, Oct 14 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

A327840 Numbers m that divide 4^m + 3.

Original entry on oeis.org

1, 7, 16387, 4509253, 24265177, 42673920001, 103949349763, 12939780075073
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Sep 27 2019

Keywords

Comments

Number of solutions < 10^9 to k^n == k-1 (mod n): 1 (if k = 1), 188 (if k = 2, see A006521), 5 (if k = 3, see A015973), 5 (if k = 4, see this sequence), 5 (if k = 5), 10 (if k = 6), 10 (if k = 7), 7 (if k = 8), 5 (if k = 9), 8 (if k = 10), 11 (if k = 11), 8 (if k = 12), 9 (if k = 13), 4 (if k = 14), 3 (if k = 15), 6 (if k = 16), 7 (if k = 17), 7 (if k = 18), ...
a(9) > 10^15. - Max Alekseyev, Nov 10 2022

Crossrefs

Solutions to k^n == 1-k (mod n): A006521 (k = 2), A015973 (k = 3), this sequence (k = 4), A123047 (k = 5), A327943 (k = 6).
Solutions to 4^n == k (mod n): A000079 (k = 0), A015950 (k = -1), A014945 (k = 1), A130421 (k = 2), this sequence (k = -3), A130422 (k = 3).

Programs

  • Magma
    [1] cat [n: n in [1..10^8] | Modexp(4,n,n) + 3 eq n];
    
  • Mathematica
    Select[Range[10^7], IntegerQ[(PowerMod[4, #, # ]+3)/# ]&] (* Metin Sariyar, Sep 28 2019 *)
  • PARI
    is(n)=Mod(4,n)^n==-3 \\ Charles R Greathouse IV, Sep 29 2019

Extensions

a(6)-a(7) from Giovanni Resta, Sep 29 2019
a(8) from Max Alekseyev, Nov 10 2022
Showing 1-10 of 18 results. Next