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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A152073 a(n) = largest prime < p(n) such that p(n) - a(n) is a power of 2, where p(n) is the n-th prime; a(n) = 0 if no such prime exists. 2
2, 3, 5, 7, 11, 13, 17, 19, 13, 29, 29, 37, 41, 43, 37, 43, 59, 59, 67, 71, 71, 79, 73, 89, 97, 101, 103, 107, 109, 0, 127, 73, 137, 0, 149, 149, 131, 163, 157, 163, 179, 127, 191, 193, 197, 179, 191, 223, 227, 229, 223, 239, 0, 241, 199, 13, 269, 269, 277, 281, 277, 179 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

a(n) = 0 for odd primes p(n) appearing in A065381.

Primes p(n) for which there is no such prime a(n) (in which case a(n)=0) are listed in A065381 = (2,127,149,251,331,337,373,...). - M. F. Hasler, Nov 23 2008

LINKS

Table of n, a(n) for n=2..63.

EXAMPLE

Looking at the primes less than the 10th prime = 29: 29 - 23 = 6, not a power of 2. 29-19 = 10, not a power of 2. 29-17 = 12, not a power of 2. But 29-13 = 16, a power of 2. Since p = 13 is the largest prime p such that 29 - p = a power of 2, then a(10) = 13.

PROG

(PARI) A152073(n)=local( q=n=prime(n)); while( q=precprime(q-1), n-q==1<<valuation(n-q, 2) && return(q)) \\ M. F. Hasler, Nov 23 2008

CROSSREFS

Cf. A065381, A139758, A152075, A152076, A156695.

Sequence in context: A242121 A242120 A259277 * A230606 A117289 A106317

Adjacent sequences:  A152070 A152071 A152072 * A152074 A152075 A152076

KEYWORD

nonn

AUTHOR

Leroy Quet, Nov 23 2008

EXTENSIONS

Edited and extended by M. F. Hasler and Ray Chandler, Nov 23 2008

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 November 24 00:27 EST 2017. Contains 295164 sequences.