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.

A380759 Number of coincident digits occurring in expression of integers in both base 2 and base 10.

This page as a plain text file.
%I A380759 #21 Feb 28 2025 15:14:42
%S A380759 1,0,0,0,0,0,0,0,0,2,2,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,
%T A380759 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,
%U A380759 0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,3
%N A380759 Number of coincident digits occurring in expression of integers in both base 2 and base 10.
%C A380759 Multiple occurrences (e.g., two ones) count as two occurrences.
%C A380759 The first term having n occurrences is a(10^(n-1)).
%e A380759 a(10) = 2, because 10 in base 10 is 1010 in base 2 (coincident digits 1 and 0).
%e A380759 For n=1002, the following a(1002) = 3 digits coincide,
%e A380759    n = decimal    1002
%e A380759    n = binary     1111101010
%e A380759                          ^^^ same digits
%t A380759 a[n_] := Total[Min /@ Transpose[(DigitCount[n, #, {0, 1}] & /@ {2, 10})]]; Array[a, 100] (* _Amiram Eldar_, Feb 04 2025 *)
%o A380759 (PARI) a(n) = my(b=binary(n), d=digits(n)); min(#select(x->(x==1), b), #select(x->(x==1), d)) + min(#select(x->(x==0), b), #select(x->(x==0), d)); \\ _Michel Marcus_, Feb 04 2025
%Y A380759 Cf. A000027, A007088.
%K A380759 nonn,easy,base
%O A380759 1,10
%A A380759 _Paul Duckett_, Feb 01 2025
%E A380759 More terms from _Michel Marcus_, Feb 28 2025