login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230305 Iterate A080670 starting at n; a(n) = number of steps to reach a prime, or -1 if no prime is ever reached. 6

%I #16 Mar 16 2020 13:03:00

%S 0,0,2,0,1,0,1,4,3,0,1,0,3,4,2,0,3,0

%N Iterate A080670 starting at n; a(n) = number of steps to reach a prime, or -1 if no prime is ever reached.

%C If n is a prime, a(n) = 0.

%C a(20) is presently unknown - see A195265 for the trajectory.

%e 9 -> 32 -> 25 -> 52 -> 2213, which is prime, taking 4 steps, so a(9) = 4.

%t fn[n_] := FromDigits[Flatten[IntegerDigits[DeleteCases[Flatten[FactorInteger[n]], 1]]]];

%t Map[Length, Table[NestWhileList[fn, n, # != 1 && ! PrimeQ[#] &], {n, 2,

%t 19}], {1}] - 1 (* _Robert Price_, Mar 16 2020 *)

%Y Cf. A080670, A195264 (the prime that is reached), A195265, A067599, A037271 (home primes).

%K nonn,base,more,hard

%O 2,3

%A _N. J. A. Sloane_, Oct 27 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 18:58 EDT 2024. Contains 371781 sequences. (Running on oeis4.)