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!)
A164089 For n >=4, a(n) = the numerical value of the substring of binary n containing all digits but the first and last. a(1) = a(2) = a(3) = 0. 2
0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,12
COMMENTS
a(2n) = a(2n+1) for all n.
For m >=2, terms a(2^m) through a(2^(m+1)-1) are 0,0,1,1,2,2,3,3,..., 2^(m-1)-1, 2^(m-1)-1.
LINKS
FORMULA
a(n) = A053645(floor(n/2)) for n > 1. - Georg Fischer, Nov 29 2022
EXAMPLE
26 in binary is 11010. Take the middle digits 1(101)0 - > 101, which is 5 in decimal. Therefore a(26) = 5.
MAPLE
0, seq(seq(seq(k, j=0..1), k=0..2^(d-2)-1), d=2..7); # Robert Israel, Jun 19 2019
PROG
(PARI) a(n) = my(b = binary(n)); if (#b < 2, 0, fromdigits(vector(#b-2, k, b[k+1]), 2)); \\ Michel Marcus, May 29 2019
CROSSREFS
Cf. A007088 (the binary numbers), A053645.
Sequence in context: A127009 A181313 A334515 * A300290 A068460 A308120
KEYWORD
base,easy,nonn
AUTHOR
Leroy Quet, Aug 09 2009
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 16 05:35 EDT 2024. Contains 371697 sequences. (Running on oeis4.)