login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247138 Least k >= 0 such that 2n+1 - 2^k is a prime power, or -1 if no such k exists. 0
-1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 2, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 0, 3, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 3, 1, 2, 4, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 3, 1, 2, 1, 0, 2, 1, 2, 4, 1, 1, 2, 3, 3, -1, 1, 1, 2, 3, 1, 2, 5, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 2, 3, 3, 6, 1, 1, 2, 1, 1, 2, 3, 3, 4, 5, 1, 2, 7, 3, 6, 5, 1, 2, 1, 1, 2, 1, 2, 4, 1, 1, 1, 2, 3, 3, 1, 2, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,12
COMMENTS
It seems to make no difference whether one requires a prime power > 1 or a prime power including 1.
While such k >= 0 exists for most odd numbers 2n+1, there are only very few even numbers of this form.
LINKS
PROG
(PARI) a(n)=for(k=0, log(n=n*2+1)\log(2)+1, (/*n-2^k==1 ||*/ isprimepower(n-2^k))&&return(k)); -1
CROSSREFS
Sequence in context: A059883 A086967 A098490 * A212627 A029419 A165105
KEYWORD
sign
AUTHOR
M. F. Hasler, Nov 20 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)