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.

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

This page as a plain text file.
%I A385485 #13 Jul 01 2025 10:14:05
%S A385485 3,7,1,7,1,5,1,7,1,3,1,29,1,1,1,7,1,3,1,5,3,1,1,29,1,1,1,1,1,1,1,7,1,
%T A385485 3,1,13,1,1,1,5,1,5,1,1,1,1,1,29,1,1,1,1,1,1,3,1,1,1,1,17,1,1,1,7,1,3,
%U A385485 1,7,3,1,1,13,1,1,1,1,1,1,1,5,3,1,1,17,1
%N A385485 a(n) is the least number k such that k*n is not a binary Niven number (A049445).
%C A385485 All the terms are odd numbers because if k is even and k*n is not a binary Niven number then so is k*n/2, since A000120(k*n) = A000120(k*n/2).
%H A385485 Amiram Eldar, <a href="/A385485/b385485.txt">Table of n, a(n) for n = 1..10000</a>
%F A385485 a(n) = 1 if and only if n is in A065878.
%t A385485 a[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k]; Array[a, 100]
%o A385485 (PARI) a(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
%o A385485 (Python)
%o A385485 from itertools import count
%o A385485 def a(n): return next(k for k in count(1) if (m:=k*n)%m.bit_count() != 0)
%o A385485 print([a(n) for n in range(1, 86)]) # _Michael S. Branicky_, Jun 30 2025
%Y A385485 Cf. A000120, A049445, A065878, A144262 (decimal analog), A385482, A385486 (indices of records), A385487 (record values).
%K A385485 nonn,easy,base
%O A385485 1,1
%A A385485 _Amiram Eldar_, Jun 30 2025