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!)
A287841 Number of iterations of number of distinct prime factors (A001221) needed to reach 1 starting at n (n is counted). 1
1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Distinct Prime Factors
FORMULA
a(n) = a(omega(n)) + 1 for n > 1, where omega() is the number of distinct prime factors.
EXAMPLE
If n = 6 the trajectory is {6, 2, 1}. Its length is 3, thus a(6) = 3.
MATHEMATICA
f[n_] := Length[NestWhileList[ PrimeNu, n, # != 1 &]]; Array[f, 105]
a[1] = 1; a[n_] := a[n] = a[PrimeNu[n]] + 1; Table[a[n], {n, 105}]
PROG
(PARI) A287841(n) = if(1==n, n, 1+A287841(omega(n))); \\ Antti Karttunen, Nov 23 2017
(Python)
from sympy import primefactors
def a(n): return 1 if n==1 else a(len(primefactors(n))) + 1 # Indranil Ghosh, Jun 03 2017
CROSSREFS
Cf. A001221, A036430, A036459, A049108, A073855, A115658 (first occurrence), A246655 (positions of 2).
Sequence in context: A236103 A278293 A163671 * A083399 A105561 A294903
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 01 2017
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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)