login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243269 Smallest prime p such that p^k - 2 is prime for all odd exponents k from 1 up to 2*n-1 (inclusive). 0
5, 19, 31, 201829, 131681731, 954667531 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The first 4 entries of this sequence are the first entry of the following sequences:

A006512 : Primes p such that p - 2 is also prime.

A240126 : Primes p such that p - 2 and p^3 - 2 are also prime.

A242517 : Primes p such that p - 2, p^3 - 2 and p^5 - 2 are primes.

A242518 : Primes p such that p - 2, p^3 - 2, p^5 - 2 and p^7 - 2 are primes.

LINKS

Table of n, a(n) for n=1..6.

EXAMPLE

For n = 1, p = 5, p - 2 = 3 is prime.

For n = 2, p = 19, p - 2 = 17 and p^3 - 2 = 6857 are primes.

For n = 3, p = 31, p - 2 = 29, p^3 - 2 = 29789, and p^5 - 2 = 28629149 are primes.

PROG

(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 < 7:

....al=0

....n=2

....while al!=co:

........d=[]

........for i in range(0, co):

............d.append(int(n**((2*i)+1))-2)

........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

CROSSREFS

Cf. A006512, A240126, A242517 and A242518.

Sequence in context: A163076 A122729 A262700 * A252930 A031019 A255413

Adjacent sequences:  A243266 A243267 A243268 * A243270 A243271 A243272

KEYWORD

nonn,hard,more

AUTHOR

Abhiram R Devesh, Jun 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified July 22 10:43 EDT 2018. Contains 312891 sequences. (Running on oeis4.)