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.

A185283 Least k such that sigma(1) + sigma(2) + sigma(3) +...+ sigma(k) >= n.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 0

Views

Author

Michel Lagneau, Jan 21 2012

Keywords

Examples

			a(3) = 2 because sigma(1) + sigma(2) + sigma(3) = 1+3+4 > 3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 0,
           numtheory[sigma](n)+b(n-1))
        end:
    a:= proc(n) option remember; local k; for k from
          `if`(n=0, 0, a(n-1)) do if b(k)>=n then return k fi od
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Sep 12 2019
  • Mathematica
    a[n_] := (k = 1; While[ Total[ DivisorSigma[1, Range[k]]] < n, k++]; k); Table[ a[n], {n, 1, 90}]
    Module[{nn=10,ad,th},ad={#[[1]],#[[2]]}&/@Partition[Accumulate[ DivisorSigma[ 1,Range[nn]]],2,1];th=Thread[{Range[2,nn],ad}];Join[ {0,1},Flatten[Table[#[[1]],#[[2,2]]-#[[2,1]]]&/@th]]] (* Harvey P. Dale, Aug 29 2020 *)

Formula

a(n) ~ c * sqrt(n), where c = 2*sqrt(3)/Pi. - Amiram Eldar, Dec 27 2024

Extensions

a(0)=0 prepended by Alois P. Heinz, Sep 12 2019