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

A006517 Numbers k such that k divides 2^k + 2.

Original entry on oeis.org

1, 2, 6, 66, 946, 8646, 180246, 199606, 265826, 383846, 1234806, 3757426, 9880278, 14304466, 23612226, 27052806, 43091686, 63265474, 66154726, 69410706, 81517766, 106047766, 129773526, 130520566, 149497986, 184416166, 279383126
Offset: 1

Views

Author

Keywords

Comments

All terms greater than 1 are even. If an odd term n>1 exists then n = m*2^k + 1 for some k>=1 and odd m. Then n divides 2^(m*2^k) + 1 and so does every prime factor p of n, implying that 2^(k+1) divides the multiplicative order of 2 modulo p and thus p-1. Therefore n = m*2^k + 1 is the product of prime factors of the form t*2^(k+1) + 1, implying that n-1 is divisible by 2^(k+1), a contradiction. - Max Alekseyev, Mar 16 2009
The sequence is infinite. In fact, its intersection with A055685 (given by A219037) is infinite (see Li et al. link). - Max Alekseyev, Oct 11 2012
All terms greater than 6 have at least three distinct prime factors. - Robert Israel, Aug 21 2014

References

  • 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 #18
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Do[ If[ PowerMod[ 2, n, n ] + 2 == n, Print[n]], {n, 2, 1500000000, 4} ]
    Join[{1},Select[Range[28*10^7],PowerMod[2,#,#]==#-2&]] (* Harvey P. Dale, Aug 13 2018 *)
  • PARI
    is_A006517(n)=!(Mod(2,n)^n+2)  \\ M. F. Hasler, Oct 08 2012

Extensions

Corrected and extended by Joe K. Crump (joecr(AT)carolina.rr.com), Sep 12 2000 and Robert G. Wilson v, Sep 13 2000

A187787 Numbers k such that 2^(k+1) == 1 (mod k).

Original entry on oeis.org

1, 3, 15, 35, 119, 255, 455, 1295, 2555, 2703, 3815, 3855, 4355, 5543, 6479, 8007, 9215, 10439, 10619, 11951, 16211, 22895, 23435, 26319, 26795, 27839, 28679, 35207, 43055, 44099, 47519, 47879, 49679, 51119, 57239, 61919, 62567, 63167, 63935, 65535, 74447, 79055
Offset: 1

Views

Author

Franz Vrabec, Jan 06 2013

Keywords

Comments

Prime factorizations of the first ten terms: 3, 3*5, 5*7, 7*17, 3*5*17, 5*7*13, 5*7*37, 5*7*73, 3*17*53, 5*7*109.

Examples

			3 is in the sequence because 2^(3+1) mod 3 = 16 mod 3 = 1.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100000 do if 2&^(n+1) mod n = 1 then print(n) fi od;
  • Mathematica
    m = 1; Join[Select[Range[1, m], Divisible[2^(# + 1), #] &],
    Select[Range[m + 1, 10^5], PowerMod[2, # + 1, #] == m &]] (* Robert Price, Oct 11 2018 *)
    Join[{1},Select[Range[80000],PowerMod[2,#+1,#]==1&]] (* Harvey P. Dale, Aug 19 2019 *)
  • PARI
    for (n=1,10^7, if (Mod(2,n)^(n+1)==1,print1(n,", "))); /* Joerg Arndt, Jan 06 2013 */

Extensions

Term a(1)=1 prepended by Max Alekseyev, Nov 29 2014

A296369 Numbers m such that 2^m == -1/2 (mod m).

Original entry on oeis.org

1, 5, 65, 377, 1189, 1469, 25805, 58589, 134945, 137345, 170585, 272609, 285389, 420209, 538733, 592409, 618449, 680705, 778805, 1163065, 1520441, 1700945, 2099201, 2831009, 4020029, 4174169, 4516109, 5059889, 5215769
Offset: 1

Views

Author

Max Alekseyev, Dec 10 2017

Keywords

Comments

Equivalently, 2^(m+1) == -1 (mod m), or m divides 2^(m+1) + 1.
The sequence is infinite, see A055685.

Crossrefs

Solutions to 2^m == k (mod m): A296370 (k=3/2), A187787 (k=1/2), this sequence (k=-1/2), A000079 (k=0), A006521 (k=-1), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), A128122 (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
    Select[Range[10^5], Divisible[2^(# + 1) + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • Python
    A296369_list = [n for n in range(1,10**6) if pow(2,n+1,n) == n-1] # Chai Wah Wu, Nov 04 2019

Formula

a(n) = A055685(n) - 1.

Extensions

Incorrect term 4285389 removed by Chai Wah Wu, Nov 04 2019

A055686 Numbers k such that 3^k == -1 (mod k-1).

Original entry on oeis.org

2, 3, 5, 6, 15, 245, 366, 435, 855, 2295, 3795, 5967, 7875, 10878, 26475, 33915, 117615, 188775, 231435, 284355, 487635, 501039, 589155, 593775, 621675, 755595, 1255815, 1306935, 1642095, 1911195, 2193125, 2434755, 2484675, 2507835
Offset: 1

Views

Author

Robert G. Wilson v, Jun 09 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PowerMod[3, n, n-1]==n-2, Print[n]], {n, 2, 10^7}]

A328230 Numbers m that divide 3^(m + 1) + 1.

Original entry on oeis.org

1, 2, 4, 5, 14, 244, 365, 434, 854, 2294, 3794, 5966, 7874, 10877, 26474, 33914, 117614, 188774, 231434, 284354, 487634, 501038, 589154, 593774, 621674, 755594, 1255814, 1306934, 1642094, 1911194, 2193124, 2434754, 2484674, 2507834, 2621654, 2643494, 3512114, 3759854, 3997574, 4082246
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 08 2019

Keywords

Comments

Conjecture: For k > 2, k^(m + 1) == -1 (mod m) has an infinite number of positive solutions.

Crossrefs

Programs

  • Magma
    [n+1: n in [0..5000000] | Modexp(3,n+2,n+1) eq n];
    
  • Maple
    filter:= m -> 3 &^ (m+1) + 1 mod m = 0:
    select(filter, [$1..10^7]); # Robert Israel, Oct 30 2019
  • PARI
    isok(m) = Mod(3, m)^(m+1) == -1; \\ Michel Marcus, Oct 10 2019

A055688 Numbers k such that 5^k == -1 (mod k-1).

Original entry on oeis.org

2, 3, 7, 14, 15, 175, 855, 2695, 78127, 103974, 106695, 121975, 420210, 487375, 1299375, 2174655, 3895095, 4151455, 5842215, 5951130, 6508335, 10637055, 20117895, 24482958, 31999695, 32282054, 32620203, 32872455, 34258455
Offset: 1

Views

Author

Robert G. Wilson v, Jun 09 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PowerMod[5, n, n-1]==n-2, Print[n]], {n, 2, 10^8}]
    Select[Range[2,35*10^6],PowerMod[5,#,#-1]==#-2&] (* Harvey P. Dale, Aug 13 2024 *)

Extensions

a(22) corrected by Amiram Eldar, Jul 23 2021

A055690 Numbers k such that 7^k == -1 (mod k-1).

Original entry on oeis.org

2, 3, 5, 6, 9, 26, 45, 66, 87, 345, 765, 906, 3926, 8405, 11766, 23805, 35145, 42966, 59685, 95289, 317250, 413325, 416757, 722745, 770066, 890825, 938457, 1325826, 1921986, 3315378, 3675555, 5299250, 6791445, 6899685, 9371826, 10892313
Offset: 1

Views

Author

Robert G. Wilson v, Jun 09 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Do[If[PowerMod[7, n, n-1]==n-2, Print[n]], {n, 2, 2*10^7}]

A064935 Numbers k such that (k+3)^(k+2) mod (k+1) = k.

Original entry on oeis.org

4, 64, 376, 1188, 1468, 25804, 58588, 134944, 137344, 170584, 272608, 285388, 420208, 538732, 592408, 618448, 680704, 778804, 1163064, 1520440, 1700944, 2099200, 2831008, 4020028, 4174168, 4516108, 5059888, 5215768, 5447272
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 26 2001

Keywords

Comments

From Robert Israel, Feb 13 2025: (Start)
Numbers k such that 2^(k+2) == -1 (mod k+1).
All terms are divisible by 4.
The only term k where k+1 is prime is 4.
(End)

Examples

			(4+3)^(4+2) mod (4+1) = 7^6 mod 5 = 117649 mod 5 = 4, so 4 is a term.
		

Crossrefs

Equals A055685(n+1) - 2.

Programs

  • Maple
    filter:= proc(k) 2 &^(k+2) mod (k+1) = k end proc:
    select(filter, [seq(i,i=4..10^7,4)]); # Robert Israel, Feb 13 2025
  • PARI
    isok(k) = Mod(k+3, k+1)^(k+2) == k; \\ Michel Marcus, Jul 12 2021

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

Original entry on oeis.org

2, 6, 66, 73786976294838206466
Offset: 1

Views

Author

Max Alekseyev, Nov 10 2012

Keywords

Comments

Also, numbers k such that 2^k == k-2 (mod k*(k-1)).
The sequence is infinite: if m is in this sequence, then so is 2^m + 2.
No other terms below 10^20.

References

  • W. Sierpinski, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #18.

Crossrefs

Intersection of A006517 and A055685.

Formula

Conjecture: a(n+1) = 2^a(n) + 2 for all n.

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

Original entry on oeis.org

2, 111482, 465794, 79036178, 1781269903308, 250369632905748, 708229497085910, 15673900819204068
Offset: 1

Views

Author

Krzysztof Ziemak and Max Alekseyev, Dec 04 2017

Keywords

Comments

Also, numbers k such that 2^k - 2 is a Fermat pseudoprime, i.e., 2^k - 2 belongs to A015919 and A006935.
a(3) was found by McDaniel (1989).
Some larger terms (maybe not in order): 2338990834231272653582, 341569682872976768698011746141903924998969680638.
Discovered huge even PSP(2) numbers of the form 2*M(n), where n=p*q and M(n)=2^n-1, ensure that the following numbers are also even pseudoprimes of the form 2*M(p)*M(q): 2*M(37)*M(12589), 2*M(131)*M(17854891864360859951), 2*M(179)*M(1398713032993), 2*M(2111)*M(335494787819), 2*M(35267)*M(50508121). - Krzysztof Ziemak, Jan 01 2018

Crossrefs

Programs

  • Mathematica
    k = 2; lst = {2}; While[k < 1000000001, If[ PowerMod[2, k, k -1] == 3, AppendTo[lst, k]]; k += 10; If[ PowerMod[2, k, k -1] == 3, AppendTo[lst, k]]; k += 2]; lst (* Robert G. Wilson v, Jan 01 2018 *)
  • PARI
    is_A296104(n) = Mod(2, n-1)^n == 3; \\ Iain Fox, Dec 07 2017
  • Python
    A296104_list = [n for n in range(2,10**6) if pow(2,n,n-1) == 3 % (n-1)] # Chai Wah Wu, Dec 06 2017
    

Formula

a(n) = A296370(n) + 1.
Showing 1-10 of 14 results. Next