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.

A385482 a(n) is the least number k such that k*n is a binary Niven number (A049445).

This page as a plain text file.
%I A385482 #12 Jul 01 2025 10:14:08
%S A385482 1,1,2,1,2,1,3,1,2,1,5,1,10,3,4,1,2,1,12,1,1,3,3,1,12,5,3,3,4,2,5,1,2,
%T A385482 1,12,1,5,6,4,1,5,1,4,3,4,2,12,1,12,6,4,3,4,2,1,3,4,2,5,1,6,5,2,1,2,1,
%U A385482 12,1,1,6,4,1,6,3,4,3,4,2,5,1,1,3,4,1,4
%N A385482 a(n) is the least number k such that k*n is a binary Niven number (A049445).
%H A385482 Amiram Eldar, <a href="/A385482/b385482.txt">Table of n, a(n) for n = 1..10000</a>
%F A385482 a(n) = 1 if and only if n is in A049445.
%F A385482 a(n) = 2 if and only if 2*n is in A363788.
%t A385482 a[n_] := Module[{m = n, k = 1}, While[!Divisible[m, DigitSum[m, 2]], m += n; k++]; k]; Array[a, 100]
%o A385482 (PARI) a(n) = {my(m = n, k = 1); while(m % hammingweight(m), m += n; k++); k;}
%o A385482 (Python)
%o A385482 from itertools import count
%o A385482 def a(n): return next(k for k in count(1) if (m:=k*n)%m.bit_count() == 0)
%o A385482 print([a(n) for n in range(1, 86)]) # _Michael S. Branicky_, Jun 30 2025
%Y A385482 Cf. A049445, A144261 (decimal analog), A363788, A385483 (indices of records), A385484 (record values), A385485.
%K A385482 nonn,easy,base
%O A385482 1,3
%A A385482 _Amiram Eldar_, Jun 30 2025