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.

A064918 a(n) is the number of iterations of k -> A064916(k) to reach a prime, starting at n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 14 2001

Keywords

Comments

a(p) = 0 for all primes p.

Examples

			a(6) = 2 as A064916(A064916(6)) = A064916(4) = 3 = A064917(6).
		

Crossrefs

Programs

  • PARI
    lpf(n)= { local(f); f=factor(n); return(f[1, 1]) } { for (n=2, 1000, m=n; a=0; while (!isprime(m), L=lpf(m); m=m / L + L - 1; a++); write("b064918.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 29 2009