The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A112416 Next-to-most-significant binary digit of the n-th prime. 2
0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The length of the run of zeros pi(2^n+2^(n-1))-pi(2^n) (A095765): 1, 1, 1, 3, 4, 6, 12, 22, 38, 70, 130, 237, 441, ... and the length of the run of ones pi(2^n-1)-pi(2^n-2^(n-2)-1) (A095766): 1, 1, 1, 2, 3, 7, 11, 21, 37, 67, 125, 227, 431, ..., . - Robert G. Wilson v
LINKS
FORMULA
a(n) = floor((p(n) - 2^m)/2^(m-1)), where p(n) is the n-th prime and m = floor(log(p(n))/log(2)).
EXAMPLE
The 9th prime is 23 (in decimal), which is 10111 in binary. So a(9) = 0, the next-to-most significant binary digit of 23.
MATHEMATICA
f[n_] := IntegerDigits[Prime@n, 2][[2]]; Array[f, 105] (* Robert G. Wilson v *)
CROSSREFS
Sequence in context: A268384 A358670 A288524 * A061265 A288466 A285073
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Dec 09 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jan 24 2006
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 May 17 08:10 EDT 2024. Contains 372579 sequences. (Running on oeis4.)