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.

This page as a plain text file.
%I A360642 #11 Feb 16 2023 12:25:49
%S A360642 1,2,4,8,16,24,64,66,84,72,210,132,450,792,288,264,1044,672,5328,528,
%T A360642 1344,840,1026,1056,4116,1800,4128,2112,5124,3780,6480,2184,3360,8352,
%U A360642 11088,8448,4680,50700,4200,4368,20880,8280,13320,13440,12420,4104,46200,8736
%N A360642 a(n) is the least number k such that A093653(k)/A000120(k) = n.
%C A360642 a(n) exists for all n >= 1 since A093653(2^(k-1))/A000120(2^(k-1)) = k for all k >= 1.
%C A360642 Analogous to A007539 as A175522 is analogous to perfect numbers (A000396).
%H A360642 Amiram Eldar, <a href="/A360642/b360642.txt">Table of n, a(n) for n = 1..1000</a>
%F A360642 a(n) <= 2^(n-1).
%e A360642 a(1) = 1 since A093653(1)/A000120(1) = 1/1 = 1.
%e A360642 a(2) = 2 since A093653(2)/A000120(2) = 2/1 = 2, and 2 is the least number with this property.
%e A360642 a(3) = 4 since A093653(4)/A000120(4) = 3/1 = 3, and 4 is the least number with this property.
%t A360642 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]
%o A360642 (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 }
%o A360642 (Python) # uses imports and definitions in A093653, A000120
%o A360642 from itertools import count, islice
%o A360642 def f(n): q, r = divmod(A093653(n), A000120(n)); return q if r == 0 else 0
%o A360642 def agen():
%o A360642     n, adict = 1, dict()
%o A360642     for k in count(1):
%o A360642         v = f(k)
%o A360642         if v not in adict: adict[v] = k
%o A360642         while n in adict: yield adict[n]; n += 1
%o A360642 print(list(islice(agen(), 48))) # _Michael S. Branicky_, Feb 15 2023
%Y A360642 Cf. A000120, A000396, A007539, A093653, A093687, A175522, A175526, A360641.
%K A360642 nonn,base
%O A360642 1,2
%A A360642 _Amiram Eldar_, Feb 15 2023