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.

User: Philip A. Hoskins

Philip A. Hoskins's wiki page.

Philip A. Hoskins has authored 2 sequences.

A211203 Prime numbers p such that p-1 divides (2^(p-1)+1)*(2^p-2).

Original entry on oeis.org

2, 3, 7, 11, 19, 31, 43, 79, 127, 151, 163, 211, 251, 271, 311, 331, 379, 487, 547, 631, 751, 811, 883, 991, 1051, 1171, 1231, 1459, 1471, 1831, 1951, 1999, 2251, 2311, 2531, 2647, 2731, 2791, 2971, 3079, 3331, 3511, 3631, 3691, 3823, 3943, 4051, 4447, 4651
Offset: 1

Author

Philip A. Hoskins, Feb 06 2013

Keywords

Comments

This is also the set of primes such that n^(4^(p-1)) is congruent to n or -n modulo p.
Prime p>2 is in this sequence iff (p-1)/2 belongs to A014957. - Max Alekseyev, Dec 26 2017

Crossrefs

Cf. A069051 (primes p such that p - 1 divides 2^p - 2)
Cf. A211349 (primes p such that p - 1 divides 2^p + 2)

Programs

  • Maple
    A211203:=proc(q)
    local n;
    for n from 1 to q do
      if type((2^(2*ithprime(n)-1)-2)/(ithprime(n)-1),integer) then print(ithprime(n));
    fi; od; end:
    A211203(10000000); # Paolo P. Lava, Feb 18 2013
  • Mathematica
    Select[Prime[Range[1000]], Mod[1/2*(2^# + 2)*(2^# - 2), # - 1] == 0 &]
  • PARI
    is(p) = lift((Mod(2,p-1)^(p-1)+1)*(Mod(2,p-1)^p-2))==0 \\ David A. Corneth, Mar 25 2021
  • Python
    from sympy import primerange
    A211203_list = [p for p in primerange(1,10**6) if p == 2 or p == 3 or pow(2,2*p-1,p-1) == 2] # Chai Wah Wu, Mar 25 2021
    

A211349 Primes p such that p-1 divides 2^p + 2.

Original entry on oeis.org

2, 3, 11, 251, 5051, 16811, 2025251, 8751251, 16607051, 28257611, 69005051, 78906251, 176775251, 210381251, 372175451, 550427051, 707025251, 854704451, 1866788051, 2441406251, 2605806251, 4249701251, 5469531251, 9304386251, 10315761251, 10915095251
Offset: 1

Author

Philip A. Hoskins, Feb 06 2013

Keywords

Comments

Prime p>2 is in this sequence iff (p-1)/2 is in A015950. - Max Alekseyev, Dec 26 2017

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1000]], Mod[2^# + 2, # - 1] == 0 &]
  • PARI
    N=10^9;
    default(primelimit,N);
    forprime(p=2,N, if (-2==Mod(2,p-1)^p, print1(p,", ")));
    /* Joerg Arndt, Feb 06 2013 */
    
  • Python
    from sympy import primerange
    A211349_list = [p for p in primerange(1,10**6) if p == 2 or pow(2,p,p-1) == p-3] # Chai Wah Wu, Mar 25 2021

Extensions

a(19)-a(47) from Giovanni Resta, Feb 10 2013
a(48)-a(177) from Max Alekseyev, Jan 06 2018