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.

A291185 a(n) = the smallest number k such that sigma(k) / phi(k) >= n.

This page as a plain text file.
%I A291185 #17 Sep 08 2022 08:46:19
%S A291185 1,2,2,6,6,6,12,30,30,60,120,210,420,420,840,2520,9240,9240,27720,
%T A291185 55440,120120,360360,720720,2162160,6126120,12252240,36756720,
%U A291185 116396280,232792560,698377680,2677114440,5354228880,26771144400,155272637520,465817912560
%N A291185 a(n) = the smallest number k such that sigma(k) / phi(k) >= n.
%C A291185 a(n) = the smallest number k such that A000203(k) / A000010(k) = A289336(k) / A289412(k) >= n.
%e A291185 For n = 4; a(4) = 6 because 6 is the smallest number with sigma(6) / phi(6) = 12 / 2 = 6 >= 2.
%p A291185 b:= 0:
%p A291185 for n from 1 to 3*10^6 do
%p A291185 r:= floor(numtheory:-sigma(n)/numtheory:-phi(n));
%p A291185 if r > b then
%p A291185     for i from b+1 to r do A[i]:= n od:
%p A291185     b:= r;
%p A291185 fi
%p A291185 od:
%p A291185 seq(A[i],i=1..b); # _Robert Israel_, Aug 21 2017
%t A291185 With[{s = KeySort@ PositionIndex@ Array[Floor[DivisorSigma[1, #]/EulerPhi@ #] &, 10^6]}, Function[t, Reverse@ FoldList[Min, #] &@ Reverse@ TakeWhile[#, # > 0 &] &@ ReplacePart[t, Map[# -> Lookup[s, #][[1]] &, Keys@ s]]]@ ConstantArray[0, Max@ Keys@ s]] (* _Michael De Vlieger_, Aug 19 2017 *) (* or *)
%t A291185 r = 1; Reap[ Do[z = DivisorSigma[1, n]/EulerPhi@ n; While[z >= r, r++; Sow@ n], {n, 10^6}]][[2, 1]] (* _Giovanni Resta_, Aug 21 2017 *)
%o A291185 (Magma) a:=1; S:=[a]; for n in [2..24] do k:=0; flag:= true; while flag do k+:=1; if &+[d: d in Divisors(k)] / EulerPhi(k) ge n then Append(~S, k); a:=k; flag:=false; end if; end while; end for; S;
%Y A291185 Cf. A000010, A000203, A055234, A289336, A289412.
%K A291185 nonn
%O A291185 1,2
%A A291185 _Jaroslav Krizek_, Aug 19 2017
%E A291185 a(25)-a(35) from _Giovanni Resta_, Aug 21 2017