This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A181929 #36 Feb 27 2021 20:58:41 %S A181929 0,1,10,110,10011,110101,10011000,110100011,10010101001,101111000101, %T A181929 110011001110,10010001101010,101101111110011,110010000001101, %U A181929 1111110010100011,10001110000111111,101100111001011100,110000110110011001,1111011010110001101 %N A181929 Numbers n such that n is the substring identical to the most significant bits of its base 2 representation. %C A181929 The main idea behind my program is that if we say start searching from 10000, which is 10011... binary, then as the binary string for the first 5 places is larger than our decimal value, then the decimal value can be immediately jumped to 10011 for the next search number. Repeating this process (while also doing slight jumps if the decimal value is larger than the binary), allows ones to do very large jumps in the checked decimal values, sometimes eliminating an entire string of length n in just a few checks. I got the idea from similar people were using when searching for the next term in A258107. - _Scott R. Shannon_, Feb 25 2021 %H A181929 Scott R. Shannon, <a href="/A181929/b181929.txt">Table of n, a(n) for n = 1..1000</a> %e A181929 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. %t A181929 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 *) %o A181929 (PARI) {for(vv=0,2000000,bvv=binary(vv); %o A181929 ll=length(bvv);texp=0;btod=0; %o A181929 forstep(i=ll,1,-1,btod=btod+bvv[i]*10^texp;texp++); %o A181929 bigb=binary(btod);swsq=1; %o A181929 for(j=1,ll,if(bvv[j]!=bigb[j],swsq=0)); %o A181929 if(swsq==1,print(btod)))} %o A181929 (PARI) lista(nn) = {for (n=0, nn, if (n==0, print1(n, ", "), my(b = binary(n), db = fromdigits(b), bb = binary(db)); if (vector(#b, k, bb[k]) == b, print1(db, ", "));););} \\ _Michel Marcus_, Feb 10 2021 %Y A181929 This is a subsequence of A038102. Sequence A181891 has a similar definition. %Y A181929 Subsequence of A007088. %K A181929 nonn,base %O A181929 1,3 %A A181929 _Douglas Latimer_, Apr 02 2012