This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A255980 Number of iterations of A067565 required to reach a perfect square. 1
 0, 1, 1, 0, 1, 2, 1, 2, 0, 2, 1, 3, 1, 2, 3, 0, 1, 3, 1, 4, 3, 2, 1, 4, 0, 2, 4, 4, 1, 5, 1, 5, 3, 2, 5, 0, 1, 2, 3, 5, 1, 6, 1, 4, 6, 2, 1, 6, 0, 6, 3, 4, 1, 7, 5, 7, 3, 2, 1, 7, 1, 2, 7, 0, 5, 6, 1, 4, 3, 8, 1, 8, 1, 2, 8, 4, 8, 6, 1, 7, 0, 2, 1, 9, 5, 2, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 COMMENTS Iterating A067565 will always result in a perfect square, because all fixed points are squares, and A067565(n) <= n all n. a(n) = 0 if and only if n is a perfect square. a(n) = 1 if and only if n is prime. LINKS Peter Kagey, Table of n, a(n) for n = 1..5000 EXAMPLE Let g(n) = A067565(n) a(12) = 3 because g(g(g(12))) = g(g(6)) = g(3) = 0, which is a perfect square. PROG (Ruby) def a(n)   c = 0   n = a067565(n) while n.is_nonsquare? && c += 1   c end CROSSREFS Cf. A067565. Sequence in context: A115862 A296030 A270144 * A029357 A118054 A322019 Adjacent sequences:  A255977 A255978 A255979 * A255981 A255982 A255983 KEYWORD nonn AUTHOR Peter Kagey, Mar 12 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 23 23:51 EDT 2019. Contains 328379 sequences. (Running on oeis4.)