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-3 of 3 results.

A015950 Numbers k such that k | 4^k + 1.

Original entry on oeis.org

1, 5, 25, 125, 205, 625, 1025, 2525, 3125, 5125, 8405, 12625, 15625, 25625, 42025, 63125, 78125, 103525, 128125, 168305, 202525, 210125, 255025, 315625, 344605, 390625, 517625, 640625, 841525, 875125, 1012625, 1050625, 1275125
Offset: 1

Views

Author

Keywords

Comments

From Robert Israel, Sep 14 2017: (Start)
All terms except 1 are congruent to 5 mod 20.
If k is a term and prime p | k, then k*p is a term.
All prime factors of terms == 1 (mod 4).
If p is a prime == 1 (mod 4) and the order of 4 (mod p) is 2*m where m is in the sequence, then m*p is in the sequence. (End)

Examples

			4^5 + 1 = 1025 and 1025 is divisible by 5, so 5 is a term.
		

Crossrefs

Column k=4 of A333429.

Programs

  • Magma
    [n: n in [1..10^6] | Modexp(4, n, n)+1 eq n]; // Jinyuan Wang, Dec 29 2018
    
  • Maple
    select(n -> 4 &^ n + 1 mod n = 0, [1, seq(i,i=5..10^7,20)]); # Robert Israel, Sep 14 2017
  • Mathematica
    Select[Prepend[20 Range[0, 10^5] + 5, 1], Mod[4^# + 1, #] == 0 &] (* Michael De Vlieger, Dec 31 2018 *)
  • PARI
    is_A015950(n) = Mod(4,n)^n == -1; \\ Michel Marcus, Sep 15 2017
    
  • Python
    A015950_list = [n for n in range(1,10**6) if pow(4,n,n) == n-1] # Chai Wah Wu, Mar 25 2021

A069051 Primes p such that p-1 divides 2^p-2.

Original entry on oeis.org

2, 3, 7, 19, 43, 127, 163, 379, 487, 883, 1459, 2647, 3079, 3943, 5419, 9199, 11827, 14407, 16759, 18523, 24967, 26407, 37339, 39367, 42463, 71443, 77659, 95923, 99079, 113779, 117307, 143263, 174763, 175447, 184843, 265483, 304039, 308827
Offset: 1

Views

Author

Benoit Cloitre, Apr 03 2002

Keywords

Comments

These are the prime values of n such that 2^n == 2 (mod n*(n-1)). - V. Raman, Sep 17 2012
These are the prime values p such that n^(2^(p-1)) is congruent to n or -n (mod p) for all n in Z/pZ, the commutative ring associated with each term. This results follows from Fermat's little theorem. - Philip A. Hoskins, Feb 08 2013
A prime p is in this sequence iff p-1 belongs to A014741. For p>2, this is equivalent to (p-1)/2 belonging to A014945. - Max Alekseyev, Aug 31 2016
From Thomas Ordowski, Nov 20 2018: (Start)
Conjecture: if n-1 divides 2^n-2, then (2^n-2)/(n-1) is squarefree.
Numbers n such that b^n == b (mod (n-1)*n) for every integer b are 2, 3, 7, and 43; i.e., only prime numbers of the form A014117(k) + 1. (End)
These are primes p such that p^2 divides b^(2^p-2) - 1 for every b coprime to p. - Thomas Ordowski, Jul 01 2024

Crossrefs

a(n)-1 form subsequence of A014741; (a(n)-1)/2 for n>1 forms a subsequence of A014945.

Programs

  • GAP
    Filtered([1..350000],p->IsPrime(p) and (2^p-2) mod (p-1)=0); # Muniru A Asiru, Dec 03 2018
    
  • Magma
    [p : p in PrimesUpTo(310000) | IsZero((2^p-2) mod (p-1))]; // Vincenzo Librandi, Dec 03 2018
    
  • Mathematica
    Select[Prime[Range[10000]], Mod[2^# - 2, # - 1] == 0 &] (* T. D. Noe, Sep 19 2012 *)
    Join[{2,3},Select[Prime[Range[30000]],PowerMod[2,#,#-1]==2&]] (* Harvey P. Dale, Apr 17 2022 *)
  • PARI
    isA069051(p)=Mod(2,p-1)^p==2 && isprime(p); \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    from sympy import prime
    for n in range(1,350000):
        if (2**prime(n)-2) % (prime(n)-1)==0:
            print(prime(n)) # Stefano Spezia, Dec 07 2018

Extensions

a(1) added by Charles R Greathouse IV, Sep 19 2012

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

Views

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
    
Showing 1-3 of 3 results.