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!)
A274718 Set x = n. Then a(n) is the number of iterations of successive applications of the map x = A001414(x) that leave x composite, or a(n) = -1 if x always remains composite. 1
-1, 0, 0, -1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, 2, 2, 0, 2, 0, 2, 1, 0, 0, 2, 1, 3, 2, 0, 0, 1, 0, 1, 3, 0, 1, 1, 0, 2, 3, 0, 0, 1, 0, 3, 0, 2, 0, 0, 3, 1, 3, 0, 0, 0, 3, 0, 1, 0, 0, 1, 0, 4, 0, 1, 3, 3, 0, 2, 4, 3, 0, 1, 0, 4, 0, 0, 3, 3, 0, 0, 1, 0, 0, 3, 1, 1, 2, 0, 0, 0, 3, 3, 1, 4, 3, 0, 0, 3, 0, 3, 0, 1, 0, 0, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,14
COMMENTS
a(1) and a(4) are the only terms with a value of -1.
a(n) = 0 iff n is a term of A100118.
LINKS
EXAMPLE
For n = 26: A001414(26) = 15, A001414(15) = 8, A001414(8) = 6 and A001414(6) = 5. 5 is prime and so 26 remains composite through 3 iterations of the map given in the definition, therefore a(26) = 3.
MATHEMATICA
lim = 10^4; Table[Length@ NestWhileList[If[# == 1, 0, Total@ Flatten[Table[#1, {#2}] & @@@ FactorInteger@ #]] &, n, ! PrimeQ@ # &, 1, lim] - 2 /. {-1 -> 0, lim - 1 -> -1}, {n, 86}] (* Michael De Vlieger, Jul 03 2016 *)
PROG
(PARI) sopfr(n) = my(f=factor(n)); sum(i=1, #f[, 1], f[i, 1]*f[i, 2]) /* after Charles R Greathouse IV in A050703 */
a(n) = my(i=0, s=sopfr(n)); while(1, if(ispseudoprime(s), return(i)); if(s==sopfr(s), return(-1)); s=sopfr(s); i++)
CROSSREFS
Sequence in context: A301735 A133625 A176154 * A028930 A112792 A138319
KEYWORD
sign
AUTHOR
Felix Fröhlich, Jul 03 2016
EXTENSIONS
More terms from Antti Karttunen, Mar 07 2018
STATUS
approved

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 24 14:54 EDT 2024. Contains 371960 sequences. (Running on oeis4.)