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.

Showing 1-3 of 3 results.

A039655 Number of iterations of f(x) = sigma(x)-1 applied to n required to reach a prime, or -1 if no prime is ever reached.

Original entry on oeis.org

0, 0, 2, 0, 1, 0, 2, 5, 1, 0, 4, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 1, 2, 1, 3, 2, 0, 1, 0, 5, 1, 1, 1, 2, 0, 1, 2, 1, 0, 4, 0, 1, 5, 1, 0, 2, 4, 2, 1, 1, 0, 3, 1, 3, 1, 1, 0, 1, 0, 4, 1, 2, 1, 2, 0, 3, 4, 2, 0, 2, 0, 1, 2, 1, 4, 1, 0, 2, 2, 3, 0, 1, 1, 1, 3, 1, 0, 1, 2, 1, 1, 2, 3, 1, 0, 3, 2, 2, 0, 2, 0, 2, 1, 2
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Divisors@n - 1; g[n_] := Length@ NestWhileList[ f@# &, n, !PrimeQ@# &] - 1; Table[ g@n, {n, 2, 106}] (* Robert G. Wilson v, May 07 2010 *)
  • PARI
    a(n)=my(t);while(!isprime(n),n=sigma(n)-1;t++);t \\ Charles R Greathouse IV, Sep 16 2014

Extensions

Escape clause added by N. J. A. Sloane, Aug 31 2017

A039656 Becomes prime after n iterations of f(x) = sigma(x)-1 (least inverse of A039655).

Original entry on oeis.org

2, 6, 4, 27, 12, 9, 121, 301, 930, 484, 578, 441, 1273, 468, 4863, 3171, 9216, 8373, 19692, 19416, 25442, 13440, 19230, 16641, 16804, 83161, 100652, 226181, 203400, 133200, 419248, 380979, 744796, 553296, 634710, 539476, 505584, 674416, 634206
Offset: 0

Views

Author

Keywords

Comments

Records: 2, 6, 27, 121, 301, 930, 1273, 4863, 9216, 19692, 25442, 83161, 100652, 226181, 419248, 744796, 3739690, 4238314, etc. - Robert G. Wilson v, Sep 23 2017
Indices of records: 0, 1, 3, 6, 7, 8, 12, 14, 16, 18, 20, 25, 26, 27, 30, 32, 46, 47, 48, 49, 50, 56, 57, 58, 59, 61, 63, 65, 67, 76, 77, 78, 82, 83, 84, 85, etc. - Robert G. Wilson v, Sep 23 2017
Checked through a(138)=60780636903. - Hugo Pfoertner, Nov 15 2017

Crossrefs

Programs

A292114 List of numbers n such that A039655(n) reaches a new record high.

Original entry on oeis.org

2, 4, 9, 121, 301, 441, 468, 3171, 8373, 13440, 16641, 16804, 83161, 100652, 133200, 367428, 395640, 459680, 701823, 3739690, 4238314, 6698616, 9014248, 12301860, 16956850, 22230514, 54889200, 60676144, 84983056, 116648892, 128942664
Offset: 1

Views

Author

N. J. A. Sloane, Sep 22 2017

Keywords

Comments

Naively, one might have expected these numbers to have some other distinguishing property (primorials, perhaps), but that seems not to be the case.
Increasingly many of the values are of the form m*p with a (large) prime p and a smooth m, often m = 2^k (for a(n), n = 12, 14, 21, 23, 26, 28, 29, ...) or m = 2^k*3^k' (n = 7, 9, 19, 22, 30, ...) or m = 2^k*5^k' (n = 20, 25, ...). I conjecture that almost all terms are even. Also, for most terms (n = 1, 2, 3, 4, 5, 7, 10, 12, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 26, 29, 30, 31, ...), either a(n)-1 or a(n)+1 has at most 2 prime divisors. - M. F. Hasler, Sep 25 2017

Crossrefs

Programs

Extensions

More terms from Hugo Pfoertner, Sep 22 2017
Showing 1-3 of 3 results.