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.

A351599 a(n) is the smallest integer m > 0 such that m*n is a digitally balanced number (A031443).

This page as a plain text file.
%I A351599 #19 Jul 11 2022 16:05:28
%S A351599 2,1,3,3,2,2,5,7,1,1,4,1,4,3,9,15,9,10,2,9,2,2,8,9,2,2,5,2,8,5,17,31,
%T A351599 5,5,1,5,1,1,4,6,1,1,4,1,3,4,3,5,1,1,3,1,4,4,3,1,4,4,3,3,13,9,33,63,3,
%U A351599 3,3,3,10,3,2,3,11,9,2,3,2,2,8,3,10,9,2
%N A351599 a(n) is the smallest integer m > 0 such that m*n is a digitally balanced number (A031443).
%F A351599 a(n) = A143146(n) / n. - _Rémy Sigrist_, Jul 11 2022
%t A351599 balQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; a[n_] := Module[{k = 1}, While[!balQ[k*n], k++]; k]; Array[a, 100] (* _Amiram Eldar_, May 02 2022 *)
%o A351599 (PARI) is(n) = hammingweight(n)==hammingweight(bitneg(n, #binary(n))); \\ A031443
%o A351599 a(n) = my(m=1); while (!is(m*n), m++); m; \\ _Michel Marcus_, May 02 2022
%Y A351599 Cf. A031443, A143146.
%K A351599 nonn,base
%O A351599 1,1
%A A351599 _Alex Ratushnyak_, May 02 2022