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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181929 Numbers n such that n is the substring identical to the most significant bits of its base 2 representation. 5
0, 1, 10, 110, 10011, 110101, 10011000, 110100011, 10010101001, 101111000101, 110011001110, 10010001101010, 101101111110011, 110010000001101, 1111110010100011, 10001110000111111, 101100111001011100, 110000110110011001, 1111011010110001101 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Scott R. Shannon, Table of n, a(n) for n = 1..500

EXAMPLE

The number 110 is represented in the binary system by the string "1101110". 110 is a three-digit number, so we consider the 3 most significant bits, which are "110", identical to the string of digits used to represent the number 110. Thus 110 is in the sequence.

MATHEMATICA

fQ[n_] := Module[{d = IntegerDigits[n], len}, len = Length[d]; d == Take[IntegerDigits[n, 2], len]]; Select[Range[0, 1000000], fQ] (* T. D. Noe, Apr 03 2012 *)

PROG

(PARI) {for(vv=0, 2000000, bvv=binary(vv);

ll=length(bvv); texp=0; btod=0;

forstep(i=ll, 1, -1, btod=btod+bvv[i]*10^texp; texp++);

bigb=binary(btod); swsq=1;

for(j=1, ll, if(bvv[j]!=bigb[j], swsq=0));

if(swsq==1, print(btod)))}

CROSSREFS

This is a subsequence of A038102.  Sequence A181891 has a similar definition.

Sequence in context: A146753 A297500 A305213 * A020767 A036603 A092500

Adjacent sequences:  A181926 A181927 A181928 * A181930 A181931 A181932

KEYWORD

nonn,base

AUTHOR

Douglas Latimer, Apr 02 2012

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 17 22:17 EDT 2019. Contains 324200 sequences. (Running on oeis4.)