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.

A356019 a(n) is the smallest number that has exactly n evil divisors (A001969).

Original entry on oeis.org

1, 3, 6, 12, 18, 45, 30, 135, 72, 60, 90, 765, 120, 1575, 270, 180, 600, 3465, 480, 13545, 360, 540, 1530, 10395, 1260, 720, 3150, 1980, 1080, 49725, 1440, 45045, 2520, 3060, 6930, 2160, 3780, 58905, 27090, 6300, 5040, 184275, 4320, 135135, 6120, 7920, 20790, 329175, 7560, 8640
Offset: 0

Views

Author

Bernard Schott, Jul 23 2022

Keywords

Comments

Differs from A327328 since a(7) = 135 while A327328(7) = 105.

Examples

			a(4) = 18 since 18 has six divisors: {1, 2, 3, 6, 9, 18} of which four {3, 6, 9, 18} have an even number of 1's in their binary expansion: 11, 110, 1001 and 10010 respectively; also, no positive integer smaller than 18 has exactly four divisors that are evil.
		

Crossrefs

Programs

  • Maple
    # output in unsorted b-file style
    A356019_list := [seq(0,i=1..1000)] ;
    for n from 1 do
        evd := A356018(n) ;
        if evd < nops(A356019_list) then
            if op(evd+1,A356019_list) <= 0 then
                printf("%d %d\n",evd,n) ;
                A356019_list := subsop(evd+1=n,A356019_list) ;
            end if;
        end if;
    end do:  # R. J. Mathar, Aug 07 2022
  • Mathematica
    f[n_] := DivisorSum[n, 1 &, EvenQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n] + 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[50, 10^6] (* Amiram Eldar, Jul 23 2022 *)
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): return bin(n).count("1")&1 == 0
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 0, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 23 2022

Formula

a(n) <= A356040(n). - David A. Corneth, Jul 26 2022

Extensions

More terms from Amiram Eldar, Jul 23 2022