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.

A279088 Numbers k for which sigma(k) - 3k exceeds sigma(j) - 3j for all j < k.

Original entry on oeis.org

1, 120, 180, 240, 360, 720, 840, 1260, 1440, 1680, 2160, 2520, 3360, 3780, 3960, 4200, 4680, 5040, 7560, 9240, 10080, 12600, 13860, 15120, 18480, 20160, 22680, 25200, 27720, 30240, 32760, 36960, 37800, 40320, 42840, 45360, 50400, 55440, 65520, 75600, 83160
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 29 2017

Keywords

Comments

Positions of record lows in A033885. - Robert Israel, Jan 30 2017

Examples

			240 is in the sequence because sigma(240) - 3*240 = 744 - 720 = 24, and no k < 240 has a value of sigma(k) - 3k this large.
		

Crossrefs

Cf. A002093 (d=0), A034090 (d=1), and A140522 (d=2).
Cf. A033885.

Programs

  • MATLAB
    N = 10^6; % to get all terms <= N
    V = 1-3*[1:N];
    m = V(1);
    A(1) = 1;
    for n=2:N
      V(n*[1:N/n]) = V(n*[1:N/n]) + n;
      if V(n) > m
        m = V(n);
        A(end+1) = n;
      end
    end
    A % Robert Israel, Jan 30 2017
  • Maple
    m:= numtheory:-sigma(1) - 3:
    count:= 1:
    A[1]:= 1:
    for n from 2 to 10^6 do
      v:= numtheory:-sigma(n)-3*n;
      if v > m then
         count:= count+1;
         A[count]:= n;
         m:= v;
      fi;
    od:
    seq(A[i],i=1..count); # Robert Israel, Jan 30 2017
  • Mathematica
    With[{s = Array[DivisorSigma[1, #] - 3 # &, 10^5]}, FirstPosition[s, #][[1]] & /@ Union@ FoldList[Max, s]] (* Michael De Vlieger, Dec 16 2017 *)
  • PARI
    isok(k) = {my(x = sigma(k) - 3*k); for (j=1, k-1, if (sigma(j) - 3*j > x, return (0));); 1;} \\ Michel Marcus, Jan 30 2017
    

Extensions

Duplicate a(2)-a(43) removed from b-file by Andrew Howroyd, Feb 27 2018