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.

A285701 a(n) = number of iterations x -> A064216(x) needed to reach a nonprime number when starting from n, a(2) = a(3) = 1.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Examples

			For n=2, A064216(2) = 2, thus there is exactly one distinct prime that can be reached when iterating A064216 starting from 2, thus a(2) = 1.
For n=19, A064216(19) = 31 (a prime), A064216(31) = 59 (a prime) and A064216(59) = 44 (not a prime), thus there are exactly three distinct primes that are encountered when iterating A064216 starting from 19 before a nonprime is reached, thus a(19) = 3 (the count includes also the starting prime 19).
		

Crossrefs

Cf. A005382 (gives positions of terms > 1 from its third term 7 onward).

Programs

Formula

If A010051(n) = 0 [when n is a nonprime], a(n) = 0, otherwise a(n) = 1 + a(A064216(n)), with a(2) = a(3) = 1.