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-1 of 1 results.

A213980 Let n = prime(1)^c_1 * prime(2)^c_2 * ... * prime(k)^c_k be the prime factorization of n. Set f(n) = n - 1 + c_1 + c_2 + ... + c_k and f_i, i>=0 (f_0(n) = n, f_1=f) is i-th iteration of f. a(n) is the minimal i such that f_i(n) is prime.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 2, 1, 0, 4, 0, 3, 2, 1, 0, 3, 0, 2, 2, 1, 0, 2, 3, 2, 1, 6, 0, 5, 0, 4, 6, 5, 4, 3, 0, 3, 2, 1, 0, 3, 0, 2, 1, 1, 0, 5, 6, 5, 5, 4, 0, 3, 2, 1, 2, 1, 0, 18, 0, 18, 17, 15, 16, 15, 0, 14, 14, 13, 0, 12, 0, 13, 12, 11, 11, 10, 0, 9, 9, 1, 0, 8, 9, 8, 7, 6, 0, 5, 5, 4, 4, 3, 2, 1, 0, 2, 1, 1, 0, 2, 0, 1, 1, 1, 0, 16, 0
Offset: 2

Views

Author

Vladimir Shevelev, Feb 15 2013

Keywords

Comments

Conjecture: a(n) exists for every n >= 2.

Examples

			f_1(12) = 12+2+1-1 = 14, f_1(14) = 14+1+1-1 = 15, f_1(15) = 15+1+1-1 = 16, f_1(16) = 16+4-1 = 19.
Since to get to a prime we used 4 iterations, a(12)=4.
		

Crossrefs

f_1 is A222312.

Programs

  • Mathematica
    a[n_] := Block[{x = n, c = 0}, While[! PrimeQ[x], x = x-1 + Total[Last /@ FactorInteger[x]]; c++]; c]; a/@Range[2,109] (* Giovanni Resta, Feb 16 2013 *)

Extensions

a(81) corrected by Giovanni Resta, Feb 16 2013
Showing 1-1 of 1 results.