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

This page as a plain text file.
%I A356019 #28 Aug 26 2022 07:37:32
%S A356019 1,3,6,12,18,45,30,135,72,60,90,765,120,1575,270,180,600,3465,480,
%T A356019 13545,360,540,1530,10395,1260,720,3150,1980,1080,49725,1440,45045,
%U A356019 2520,3060,6930,2160,3780,58905,27090,6300,5040,184275,4320,135135,6120,7920,20790,329175,7560,8640
%N A356019 a(n) is the smallest number that has exactly n evil divisors (A001969).
%C A356019 Differs from A327328 since a(7) = 135 while A327328(7) = 105.
%H A356019 David A. Corneth, <a href="/A356019/b356019.txt">Table of n, a(n) for n = 0..396</a>
%H A356019 David A. Corneth, <a href="/A356019/a356019_1.gp.txt">Upperbounds on a(n), terms <= 8*10^9 are certain</a>
%F A356019 a(n) <= A356040(n). - _David A. Corneth_, Jul 26 2022
%e A356019 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.
%p A356019 # output in unsorted b-file style
%p A356019 A356019_list := [seq(0,i=1..1000)] ;
%p A356019 for n from 1 do
%p A356019     evd := A356018(n) ;
%p A356019     if evd < nops(A356019_list) then
%p A356019         if op(evd+1,A356019_list) <= 0 then
%p A356019             printf("%d %d\n",evd,n) ;
%p A356019             A356019_list := subsop(evd+1=n,A356019_list) ;
%p A356019         end if;
%p A356019     end if;
%p A356019 end do:  # _R. J. Mathar_, Aug 07 2022
%t A356019 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 *)
%o A356019 (Python)
%o A356019 from sympy import divisors
%o A356019 from itertools import count, islice
%o A356019 def c(n): return bin(n).count("1")&1 == 0
%o A356019 def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
%o A356019 def agen():
%o A356019     n, adict = 0, dict()
%o A356019     for k in count(1):
%o A356019         fk = f(k)
%o A356019         if fk not in adict: adict[fk] = k
%o A356019         while n in adict: yield adict[n]; n += 1
%o A356019 print(list(islice(agen(), 50))) # _Michael S. Branicky_, Jul 23 2022
%Y A356019 Cf. A001969, A093688, A227872, A327328, A356018, A356020, A356040.
%Y A356019 Similar sequences: A087997, A333456, A355303, A355699, A355968.
%K A356019 nonn,base
%O A356019 0,2
%A A356019 _Bernard Schott_, Jul 23 2022
%E A356019 More terms from _Amiram Eldar_, Jul 23 2022