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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

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, 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, 12, 1, 1, 6, 4, 1, 6, 3, 4, 3, 4, 2, 5, 1, 1, 3, 4, 1, 4
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144261 (decimal analog), A363788, A385483 (indices of records), A385484 (record values), A385485.

Programs

  • Mathematica
    a[n_] := Module[{m = n, k = 1}, While[!Divisible[m, DigitSum[m, 2]], m += n; k++]; k]; Array[a, 100]
  • PARI
    a(n) = {my(m = n, k = 1); while(m % hammingweight(m), m += n; k++); 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 A049445.
a(n) = 2 if and only if 2*n is in A363788.

A385486 Where records occur in A385485.

Original entry on oeis.org

1, 2, 12, 126, 252, 504, 2040, 4080, 16380, 32760, 65520, 524286, 1048572, 4194300, 8388600, 134217720, 268435440, 7516192740, 10737418230, 21474836460, 137438953440, 274877906880, 274877906940, 549755813880, 8796093022200, 8796093022206, 17592186044412
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144376 (decimal analog), A385483, A385485, A385487 (record values).

Programs

  • Mathematica
    f[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k];
    seq[lim_] := Module[{s = {}, fm = -1, fi}, Do[fi = f[i]; If[fi > fm, fm = fi; AppendTo[s, i]], {i, 1, lim}]; s]; seq[10^4]
  • PARI
    f(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
    list(lim) = my(fm = -1, fi); for(i = 1, lim, fi = f(i); if(fi > fm, fm = fi; print1(i, ", ")));

Formula

A385485(a(n)) = A385487(n).

Extensions

a(21)-a(27) from Chai Wah Wu, Jul 02 2025

A385484 Records in A385482.

Original entry on oeis.org

1, 2, 3, 5, 10, 12, 42, 84, 88, 90, 99, 130, 165, 184, 187, 209, 221, 252, 299, 434, 450, 459, 486, 525, 555, 611, 675, 702, 726, 858, 899, 975, 984, 1034, 1036, 1104, 1107, 1197, 1275, 1357
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144363 (decimal analog), A385482, A385483 (indices of records), A385487.

Programs

  • Mathematica
    f[n_] := Module[{m = n, k = 1}, While[!Divisible[m, DigitSum[m, 2]], m += n; k++]; k];
    seq[lim_] := Module[{s = {}, fm = -1, fi}, Do[fi = f[i]; If[fi > fm, fm = fi; AppendTo[s, fi]], {i, 1, lim}]; s]; seq[10^4]
  • PARI
    f(n) = {my(m = n, k = 1); while(m % hammingweight(m), m += n; k++); k;}
    list(lim) = my(fm = -1, fi); for(i = 1, lim, fi = f(i); if(fi > fm, fm = fi; print1(fi, ", ")));

Formula

a(n) = A385482(A385483(n)).
Showing 1-3 of 3 results.