cp's OEIS Frontend

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.

A004748 Binary expansion contains 101.

This page as a plain text file.
%I A004748 #40 Apr 11 2021 04:52:31
%S A004748 5,10,11,13,20,21,22,23,26,27,29,37,40,41,42,43,44,45,46,47,52,53,54,
%T A004748 55,58,59,61,69,74,75,77,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,
%U A004748 95,101,104,105,106,107,108,109,110,111,116,117,118,119,122
%N A004748 Binary expansion contains 101.
%H A004748 Indranil Ghosh, <a href="/A004748/b004748.txt">Table of n, a(n) for n = 1..50000</a>
%H A004748 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%F A004748 a(n) ~ n. - _Charles R Greathouse IV_, Oct 23 2015
%e A004748 20 is in the sequence because 20 = 10100_2. '10100' has '101' as one of its substrings. - _Indranil Ghosh_, Feb 11 2017
%t A004748 Select[Range[200], MemberQ[Partition[IntegerDigits[#, 2], 3, 1], {1, 0, 1}] &] (* _Vincenzo Librandi_, Feb 17 2018 *)
%t A004748 Select[Range[200],SequenceCount[IntegerDigits[#,2],{1,0,1}]>0&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 01 2020 *)
%o A004748 (Python)
%o A004748 i=j=0
%o A004748 while j<=100:
%o A004748     if "101" in bin(i)[2:]:
%o A004748         print(str(j)+" "+str(i))
%o A004748         j+=1
%o A004748     i+=1 # _Indranil Ghosh_, Feb 11 2017
%o A004748 (PARI) is(n)=while(n>4,if(bitand(n,7)==5, return(1)); n>>=1); 0 \\ _Charles R Greathouse IV_, Feb 11 2017
%Y A004748 Cf. A004749, A004750, A004751, A004752, A004753.
%K A004748 nonn,base,easy
%O A004748 1,1
%A A004748 _N. J. A. Sloane_
%E A004748 Offset corrected by _Charles R Greathouse IV_, Feb 11 2017