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.

A171757 Even numbers whose binary expansion begins 10.

This page as a plain text file.
%I A171757 #25 Jun 24 2021 17:11:40
%S A171757 2,4,8,10,16,18,20,22,32,34,36,38,40,42,44,46,64,66,68,70,72,74,76,78,
%T A171757 80,82,84,86,88,90,92,94,128,130,132,134,136,138,140,142,144,146,148,
%U A171757 150,152,154,156,158,160,162,164,166,168,170,172,174,176,178
%N A171757 Even numbers whose binary expansion begins 10.
%H A171757 Amiram Eldar, <a href="/A171757/b171757.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1024 from R. J. Mathar)
%F A171757 a(n) = 2*A004761(n+1). - _Jon Maiga_ / _Georg Fischer_, Jun 24 2021
%p A171757 n := 1 ;
%p A171757 for k from 2 to 4000 by 2 do
%p A171757     dgs := convert(k,base,2) ;
%p A171757     if op(-1,dgs) = 1 and op(-2,dgs) = 0 then
%p A171757         printf("%d %d\n",n,k) ;
%p A171757         n := n+1 ;
%p A171757     end if;
%p A171757 end do: # _R. J. Mathar_, Jan 31 2015
%t A171757 Select[Range[2, 200, 2], IntegerDigits[#, 2][[1 ;; 2]] == {1, 0} &] (* _Amiram Eldar_, Sep 01 2020 *)
%o A171757 (Python)
%o A171757 from itertools import count, product, takewhile
%o A171757 def agen(): # generator for sequence
%o A171757     yield 2
%o A171757     for digits in count(0):
%o A171757         for mid in product("01", repeat=digits):
%o A171757             yield int("10" + "".join(mid) + "0", 2)
%o A171757 def aupto(lim): return list(takewhile(lambda x: x <= lim, agen()))
%o A171757 print(aupto(180)) # _Michael S. Branicky_, Jun 24 2021
%o A171757 (PARI) isok(m) = if (!(m%2), my(b=binary(m)); (b[1]==1) && (b[2]==0)); \\ _Michel Marcus_, Jun 24 2021
%Y A171757 Cf. A004761, A171758, A171763, A171764.
%Y A171757 A subsequence of A004754.
%K A171757 nonn,base
%O A171757 1,1
%A A171757 _N. J. A. Sloane_, Oct 12 2010