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.

Original entry on oeis.org

1, 2, 2, 6, 6, 6, 12, 30, 30, 60, 120, 210, 420, 420, 840, 2520, 9240, 9240, 27720, 55440, 120120, 360360, 720720, 2162160, 6126120, 12252240, 36756720, 116396280, 232792560, 698377680, 2677114440, 5354228880, 26771144400, 155272637520, 465817912560
Offset: 1

Views

Author

Jaroslav Krizek, Aug 19 2017

Keywords

Comments

a(n) = the smallest number k such that A000203(k) / A000010(k) = A289336(k) / A289412(k) >= n.

Examples

			For n = 4; a(4) = 6 because 6 is the smallest number with sigma(6) / phi(6) = 12 / 2 = 6 >= 2.
		

Crossrefs

Programs

  • 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;
  • Maple
    b:= 0:
    for n from 1 to 3*10^6 do
    r:= floor(numtheory:-sigma(n)/numtheory:-phi(n));
    if r > b then
        for i from b+1 to r do A[i]:= n od:
        b:= r;
    fi
    od:
    seq(A[i],i=1..b); # Robert Israel, Aug 21 2017
  • Mathematica
    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 *)
    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 *)

Extensions

a(25)-a(35) from Giovanni Resta, Aug 21 2017