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.

A360642 a(n) is the least number k such that A093653(k)/A000120(k) = n.

Original entry on oeis.org

1, 2, 4, 8, 16, 24, 64, 66, 84, 72, 210, 132, 450, 792, 288, 264, 1044, 672, 5328, 528, 1344, 840, 1026, 1056, 4116, 1800, 4128, 2112, 5124, 3780, 6480, 2184, 3360, 8352, 11088, 8448, 4680, 50700, 4200, 4368, 20880, 8280, 13320, 13440, 12420, 4104, 46200, 8736
Offset: 1

Views

Author

Amiram Eldar, Feb 15 2023

Keywords

Comments

a(n) exists for all n >= 1 since A093653(2^(k-1))/A000120(2^(k-1)) = k for all k >= 1.
Analogous to A007539 as A175522 is analogous to perfect numbers (A000396).

Examples

			a(1) = 1 since A093653(1)/A000120(1) = 1/1 = 1.
a(2) = 2 since A093653(2)/A000120(2) = 2/1 = 2, and 2 is the least number with this property.
a(3) = 4 since A093653(4)/A000120(4) = 3/1 = 3, and 4 is the least number with this property.
		

Crossrefs

Programs

  • Mathematica
    seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n <= nmax, i = DivisorSum[n, DigitCount[#, 2, 1] &]/DigitCount[n, 2, 1]; If[IntegerQ[i] && i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; TakeWhile[s, # > 0 &]]; seq[50, 10^5]
  • PARI
    lista(len, nmax) = {my(s = vector(len), c = 0, n = 1, i); while(c < len && n <= nmax, i = sumdiv(n, d, hammingweight(d))/hammingweight(n); if(denominator(i) == 1 && i <= len && s[i] == 0, c++; s[i] = n); n++); s }
    
  • Python
    # uses imports and definitions in A093653, A000120
    from itertools import count, islice
    def f(n): q, r = divmod(A093653(n), A000120(n)); return q if r == 0 else 0
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            v = f(k)
            if v not in adict: adict[v] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 48))) # Michael S. Branicky, Feb 15 2023

Formula

a(n) <= 2^(n-1).