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!)
A045049 Numbers whose base-4 representation contains exactly two 0's and two 2's. 1

%I #22 May 28 2023 02:01:04

%S 130,136,160,266,290,296,386,392,416,518,521,523,526,530,536,545,547,

%T 548,556,562,568,578,584,608,641,643,644,652,656,688,706,712,736,778,

%U 802,808,898,904,928,1050,1062,1065,1067,1070

%N Numbers whose base-4 representation contains exactly two 0's and two 2's.

%H Enrique Pérez Herrero, <a href="/A045049/b045049.txt">Table of n, a(n) for n = 1..100000</a>

%t fQ[n_] := Block[{idn = IntegerDigits[n, 4]}, Count[idn, 0] == Count[idn, 2] == 2]; Select[Range@1100, fQ] (* _Robert G. Wilson v_, Dec 11 2017 *)

%o (Python)

%o import numpy as np

%o for a in range(10000):

%o x = np.base_repr(a, base=4)

%o if(x.count("0") == 2 and x.count("2") == 2):

%o print(a)

%o # _Enrique Pérez Herrero_, Dec 06 2017

%Y Cf. A007090.

%K nonn,base

%O 1,1

%A _Clark Kimberling_

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 24 18:05 EDT 2024. Contains 371962 sequences. (Running on oeis4.)