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

A243861 Primes p for which p^i - 4 is prime for i = 1, 3, 5 and 7.

Original entry on oeis.org

971, 12641, 205607, 228341, 276557, 412343, 1012217, 1101323, 1902881, 2171021, 2477411, 2692121, 4116377, 4311677, 6060953, 6182993, 6388913, 6444863, 8341121, 8551451, 9507527, 10523141, 10997411, 11444093, 14101361, 14656307, 14813147, 15435587, 17337521
Offset: 1

Views

Author

Abhiram R Devesh, Jun 12 2014

Keywords

Comments

Subsequence of A243818: Primes p for which p^i - 4 is prime for i = 1, 3 and 5.

Examples

			Prime p=971 is in this sequence because p-4 = 967 (prime), p^3-4 = 915498607 (prime),  p^5-4 = 863169625893847 (prime), and p^7-4 = 813831713247384370687 (prime).
		

Crossrefs

Programs

  • Python
    import sympy.ntheory as snt
    n=2
    while n>1:
        n1=n-4
        n2=((n**3)-4)
        n3=((n**5)-4)
        n4=((n**7)-4)
        ##Check if n1 , n2, n3 and n4 are also primes.
        if snt.isprime(n1)== True and snt.isprime(n2)== True and snt.isprime(n3)== True and snt.isprime(n4)== True:
            print(n, n1, n2, n3, n4)
        n=snt.nextprime(n)

A243885 Smallest prime p_n which generates n primes of the form (p_n^i - 4) when i runs through the first n odd numbers.

Original entry on oeis.org

7, 11, 11, 971, 71394923, 959316767, 13342820302307
Offset: 1

Views

Author

Abhiram R Devesh, Jun 13 2014

Keywords

Comments

The first 4 entries of this sequence are the first entry of the following sequences:
A046132 : Larger member p+4 of cousin primes (p, p+4).
A243817 : Primes p for which p - 4 and p^3 - 4 are primes.
A243818 : Primes p for which p^i - 4 is prime for i = 1, 3 and 5.
A243861 : Primes p for which p^i - 4 is prime for i = 1, 3, 5 and 7.

Examples

			a(1) = 7 because 7-4 = 3 (prime),
a(2) = 11 because 11-4 = 7 (prime) and  11^3 - 4 = 1327 (prime).
		

Crossrefs

Programs

  • Python
    import sympy
    ## isp_list returns an array of true/false for prime number test for a
    ## list of numbers
    def isp_list(ls):
        pt=[]
        for a in ls:
            if sympy.ntheory.isprime(a)==True:
                pt.append(True)
        return(pt)
    co=1
    while co > 0:
        al=0
        n=2
        while al!=co:
            d=[]
            for i in range(0, co):
                d.append(int(n**((2*i)+1))-4)
            al=isp_list(d).count(True)
            if al==co:
                ## Prints prime number and its corresponding sequence d
                print(n, d)
            n=sympy.ntheory.nextprime(n)
        co=co+1

Extensions

a(6) from Bert Dobbelaere, Jul 16 2019
a(7) from Giovanni Resta, Jul 18 2019
Showing 1-2 of 2 results.