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!)
A106701 a(n) = next-to-most-significant binary digit of n-th composite positive integer. 2
0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 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, 1, 1, 0, 0, 0, 0, 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, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The length of each run of zeros and ones: 1,3,6,13,25,53,107,219,445,899,1821,... and 1,3,5,12,26,52,106,218,442,894,1811,2838,..., . - Robert G. Wilson v
LINKS
FORMULA
a(n) = floor((c(n) - 2^m)/2^(m-1)), where c(n) is the n-th composite and m = floor(log(c(n))/log(2)).
EXAMPLE
a(2) = 1 because 6 is the second composite and because the next-to-most-significant binary digit (which happens to be the middle binary digit) of 6 = 110 (in binary) is 1.
MATHEMATICA
f[n_] := IntegerDigits[ FixedPoint[n + PrimePi[ # ] + 1 &, n], 2][[2]]; Array[f, 105] (* Robert G. Wilson v *)
CROSSREFS
Sequence in context: A091447 A356921 A356922 * A258021 A033684 A080885
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jan 22 2006
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 April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)