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).

Original entry on oeis.org

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, 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, 1, 7, 3, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 17, 1
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Comments

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).

Crossrefs

Cf. A000120, A049445, A065878, A144262 (decimal analog), A385482, A385486 (indices of records), A385487 (record values).

Programs

  • Mathematica
    a[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k]; Array[a, 100]
  • PARI
    a(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
    
  • Python
    from itertools import count
    def a(n): return next(k for k in count(1) if (m:=k*n)%m.bit_count() != 0)
    print([a(n) for n in range(1, 86)]) # Michael S. Branicky, Jun 30 2025

Formula

a(n) = 1 if and only if n is in A065878.