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

A015891 Numbers k such that k | 5^k + 5.

Original entry on oeis.org

1, 2, 5, 6, 10, 30, 70, 1565, 2806, 3126, 51670, 58290, 214405, 285286, 378258, 1854766, 2170486, 2222122, 2247610, 3463230, 4147522, 5942526, 9381126, 14818486, 15743890, 20162858, 34087054, 34838686, 38742166, 71067430
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A067946 = numbers n such that n divides 5^n-1. Cf. A015951 = numbers n such that n | 5^n + 1.

Programs

  • Mathematica
    Select[Range[1000000], IntegerQ[(PowerMod[5,#,# ]+5)/# ]&] (* Alexander Adamchuk *)

Extensions

Corrected by Alexander Adamchuk, Nov 04 2006

A055685 Numbers k such that 2^k == -1 (mod k-1).

Original entry on oeis.org

2, 6, 66, 378, 1190, 1470, 25806, 58590, 134946, 137346, 170586, 272610, 285390, 420210, 538734, 592410, 618450, 680706, 778806, 1163066, 1520442, 1700946, 2099202, 2831010, 4020030, 4174170, 4516110, 5059890, 5215770
Offset: 1

Views

Author

Robert G. Wilson v, Jun 09 2000

Keywords

Comments

The sequence is infinite. In fact, even its intersection with A006517 (given by A219037) is infinite.

Crossrefs

Programs

  • Mathematica
    Do[If[PowerMod[2, n, n-1]==n-2, Print[n]], {n, 2, 12900000}]
  • Python
    A055685_list = [n for n in range(2,10**6) if pow(2,n,n-1) == n-2] # Chai Wah Wu, Nov 04 2019

Formula

a(n) = A296369(n) + 1.

Extensions

Edited by Max Alekseyev, Oct 11 2012
Incorrect term 4285390 removed by Chai Wah Wu, Nov 04 2019

A014741 Numbers k such that k divides 2^(k+1) - 2.

Original entry on oeis.org

1, 2, 6, 18, 42, 54, 126, 162, 294, 342, 378, 486, 882, 1026, 1134, 1314, 1458, 1806, 2058, 2394, 2646, 3078, 3402, 3942, 4374, 5334, 5418, 6174, 6498, 7182, 7938, 9198, 9234, 10206, 11826, 12642, 13122, 14154, 14406, 16002, 16254
Offset: 1

Views

Author

Keywords

Comments

Also, numbers k such that k divides Eulerian number A000295(k+1) = 2^(k+1) - k - 2.
Also, numbers k such that k divides A086787(k) = Sum_{i=1..k} Sum_{j=1..k} i^j.
All terms greater than 1 are even; for a proof, see comment in A036236. - Max Alekseyev, Feb 03 2012
If k>1 is a term, then 3*k is also a term. - Alexander Adamchuk, Nov 03 2006
Prime numbers of the form a(m)+1 are given by A069051. - Max Alekseyev, Nov 14 2012
The number 2^m - 2 is a term of this sequence if and only if m - 1 is a term. - Thomas Ordowski, Jul 01 2024

Crossrefs

Programs

Formula

For n > 1, a(n) = 2*A014945(n-1). - Max Alekseyev, Nov 14 2012

A128122 Numbers m such that 2^m == 6 (mod m).

Original entry on oeis.org

1, 2, 10669, 6611474, 43070220513807782
Offset: 1

Views

Author

Alexander Adamchuk, Feb 15 2007

Keywords

Comments

No other terms below 10^17. - Max Alekseyev, Nov 18 2022
A large term: 862*(2^861-3)/281437921287063162726198552345362315020202285185118249390789 (203 digits). - Max Alekseyev, Sep 24 2016

Examples

			2 == 6 (mod 1), so 1 is a term;
4 == 6 (mod 2), so 2 is a term.
		

Crossrefs

Solutions to 2^m == k (mod m): A000079 (k=0),A187787 (k=1/2), A296369 (k=-1/2), A006521 (k=-1), A296370 (k=3/2), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), this sequence (k=6), A245728 (k=-6), A033981 (k=7), A240941 (k=-7), A015922 (k=8), A245319 (k=-8), A051447 (k=9), A240942 (k=-9), A128123 (k=10), A245594 (k=-10), A033982 (k=11), A128124 (k=12), A051446 (k=13), A128125 (k=14), A033983 (k=15), A015924 (k=16), A124974 (k=17), A128126 (k=18), A125000 (k=19), A015925 (k=2^5), A015926 (k=2^6), A015927 (k=2^7), A015929 (k=2^8), A015931 (k=2^9), A015932 (k=2^10), A015935 (k=2^11), A015937 (k=2^12)

Programs

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

Extensions

1 and 2 added by N. J. A. Sloane, Apr 23 2007
a(5) from Max Alekseyev, Nov 18 2022

A015888 Numbers k such that k | (3^k + 3).

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 15, 28, 366, 435, 532, 804, 1036, 4636, 6364, 7932, 11476, 15051, 19684, 40132, 75396, 80956, 247395, 266476, 280756, 307396, 356644, 490372, 531444, 544348, 557956, 565516, 572716, 808228, 1007574, 1256356, 1695484
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1,2},Select[Range[17*10^5],PowerMod[3,#,#]==#-3&]] (* Harvey P. Dale, Mar 31 2024 *)

Extensions

Terms 1, 2 inserted by Max Alekseyev, Nov 24 2017

A015889 Numbers k that divide 4^k + 4.

Original entry on oeis.org

1, 2, 4, 10, 20, 52, 130, 370, 1066, 1090, 2626, 4580, 7540, 9140, 21268, 21682, 24634, 26596, 29380, 38740, 40330, 65026, 146810, 152164, 154180, 159172, 211492, 271426, 290116, 330706, 432730, 567988, 575956, 710788, 782090
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[800000],Divisible[4^#+4,#]&] (* Harvey P. Dale, Jun 06 2012 *)

Extensions

Corrected (a(2) = 2 inserted) by Harvey P. Dale, Jun 06 2012

A015892 Numbers k such that k | 6^k + 6.

Original entry on oeis.org

1, 2, 3, 6, 14, 42, 66, 111, 606, 742, 3486, 6666, 8646, 13118, 26751, 58618, 66886, 125686, 141526, 144886, 489958, 525994, 695254, 752691, 1198554, 1234806, 2200386, 2479686, 2671306, 2862006, 3277626, 3716602, 5923126, 6490947
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], Mod[PowerMod[6, #, #] + 6, #] == 0 &] (* Giovanni Resta, Oct 23 2018 *)

Extensions

Missing a(2)-a(3) from Giovanni Resta, Oct 23 2018

A015893 Numbers k such that k | 7^k + 7.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 28, 35, 56, 91, 172, 175, 616, 742, 904, 946, 1204, 1267, 1288, 2275, 2486, 4795, 5551, 7288, 10396, 10696, 16426, 16471, 18536, 31675, 34126, 38872, 40132, 40775, 58618, 61075, 67768, 72136, 78604, 86296, 117656
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], Mod[PowerMod[7, #, #] + 7, #] == 0 &] (* Giovanni Resta, Oct 23 2018 *)

Extensions

Missing a(2)-a(3) from Giovanni Resta, Oct 23 2018

A015897 Numbers k such that k | 8^k + 8.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 24, 36, 66, 72, 76, 344, 396, 804, 946, 1548, 1986, 3336, 5526, 7596, 8196, 8646, 10116, 11916, 21846, 25156, 34056, 43352, 47972, 51426, 66788, 117522, 131076, 180246, 195084, 199606, 250284, 265826, 307876, 319404
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Extensions

a(2)-a(4) inserted by Charles R Greathouse IV, Oct 08 2015
Showing 1-10 of 21 results. Next