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.

A357362 Primes q such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where p = A151799(q).

Original entry on oeis.org

7, 53, 59, 151057, 240733, 911135857
Offset: 1

Views

Author

Felix Fröhlich, Sep 25 2022

Keywords

Crossrefs

Programs

  • PARI
    is(n) = my(b=precprime(n-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
    forprime(p=3, , if(is(p), print1(p, ", ")))
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen():
        p, q = 2, 3
        while True:
            if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q
            p, q = q, nextprime(q)
    print(list(islice(agen(), 5))) # Michael S. Branicky, Sep 30 2022

Extensions

a(6) from Michael S. Branicky, Sep 26 2022

A357364 Primes p such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where q = A151800(A151800(A151800(p))).

Original entry on oeis.org

11, 23, 41, 107, 389, 1987673, 35603983
Offset: 1

Views

Author

Felix Fröhlich, Sep 25 2022

Keywords

Crossrefs

Programs

  • PARI
    is(n) = my(b=precprime(precprime(precprime(n-1)-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
    forprime(p=7, , if(is(p), print1(p, ", ")))

A357365 Primes q such that either p^(q-1) == 1 (mod q^2) or q^(p-1) == 1 (mod p^2), where p = A151799(A151799(A151799(A151799(q)))).

Original entry on oeis.org

19, 67, 349, 2011, 22307, 13699249, 2018905087, 9809844767
Offset: 1

Views

Author

Felix Fröhlich, Sep 25 2022

Keywords

Crossrefs

Programs

  • PARI
    is(n) = my(b=precprime(precprime(precprime(precprime(n-1)-1)-1)-1)); Mod(b, n^2)^(n-1)==1 || Mod(n, b^2)^(b-1)==1
    forprime(p=11, , if(is(p), print1(p, ", ")))
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen():
        p, m1, m2, m3, q = 2, 3, 5, 7, 11
        while True:
            if pow(p, q-1, q*q) == 1 or pow(q, p-1, p*p) == 1: yield q
            p, m1, m2, m3, q = m1, m2, m3, q, nextprime(q)
    print(list(islice(agen(), 5))) # Michael S. Branicky, Sep 30 2022

Extensions

a(7)-a(8) from Michael S. Branicky, Sep 26 2022
Showing 1-3 of 3 results.