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.

A055020 Number of iterations of sigma() required until 2n (or greater) is reached.

Original entry on oeis.org

2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 1, 3, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 2, 1, 4, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2, 1, 2, 1, 2, 1
Offset: 2

Views

Author

Jud McCranie, May 31 2000

Keywords

Examples

			sigma(sigma(sigma(9))) = 24 >= 2*9, so a(9) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := -1 + Length@ NestWhileList[DivisorSigma[1, #] &, n, # < 2*n &]; Array[a, 100, 2] (* Amiram Eldar, Mar 18 2024 *)
  • PARI
    a(n) = {my(m = n, nn = 2*n, c = 0); while(m < nn, m = sigma(m); c++); c;} \\ Amiram Eldar, Mar 18 2024