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!)
A255326 a(n) gives the number of steps needed to reach zero, when we start from x = n and repeatedly subtract x's squarefree kernel (A007947(x)) from it. 2
0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 4, 3, 1, 5, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 4, 1, 3, 2, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
In other words, number of iterations needed to reach zero with map x <- A066503(x), when starting from n.
Also, for n >= 1, a(n) = one more than the number of steps to reach a squarefree number (A005117) when we repeatedly subtract the largest squarefree number dividing x, starting from x <- n.
LINKS
FORMULA
a(0) = 0; a(n) = 1 + a(A066503(n)).
Other identities:
a(k) = 1 iff k = A005117(n).
EXAMPLE
Largest squarefree number dividing 27 is 3, and 27 - 3 = 24.
Largest squarefree number dividing 24 is 6, and 24 - 6 = 18.
Largest squarefree number dividing 18 is 6, and 18 - 6 = 12.
Largest squarefree number dividing 12 is 6, and 12 - 6 = 6.
Largest squarefree number dividing 6 is 6, and 6 - 6 = 0.
Thus a(6) = 1, a(12) = 2, a(18) = 3, a(24) = 4 and a(27) = 5.
MATHEMATICA
a[n_] := -1 + Length@ NestWhileList[# - Times @@ FactorInteger[#][[;; , 1]] &, n, # > 0 &]; Array[a, 100, 0] (* Amiram Eldar, Mar 04 2024 *)
PROG
(Scheme, with memoization-macro definec from Antti Karttunen's IntSeq-library)
(definec (A255326 n) (if (zero? n) n (+ 1 (A255326 (A066503 n)))))
CROSSREFS
Cf. A255409 (gives the positions of records, also the first positions where a(n) = n).
Sequence in context: A307848 A358260 A368978 * A085424 A088737 A318434
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 23 2015
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 16 19:48 EDT 2024. Contains 371754 sequences. (Running on oeis4.)