A308194 Number of steps to reach 5 when iterating x -> A063655(x) starting at x=n.
0, 1, 3, 2, 2, 4, 5, 4, 4, 3, 3, 3, 4, 3, 4, 3, 5, 5, 6, 5, 5, 4, 5, 6, 7, 6, 6, 5, 4, 5, 5, 5, 7, 6, 4, 5, 6, 5, 5, 4, 4, 6, 5, 4, 4, 4, 4, 5, 5, 4, 4, 4, 6, 7, 5, 4, 6, 5, 4, 4, 4, 5, 7, 6, 5, 5, 6, 5, 6, 5, 4, 7, 4, 5, 5, 4, 4, 6, 6, 5, 6, 5, 6, 5, 6, 5, 4, 6, 6, 5, 6, 4, 7, 6, 4, 4, 8, 7, 7, 6, 6, 5
Offset: 5
Keywords
References
- Ali Sada, Email to N. J. A. Sloane, Jun 13 2019.
Links
- Rémy Sigrist, Table of n, a(n) for n = 5..10000
Programs
-
PARI
b(n) = { my(c=1); fordiv(n, d, if((d*d)>=n, if((d*d)==n, return(2*d), return(c+d))); c=d); (0); } \\ after A063655 a(n) = for (k=0, oo, if (n==5, return (k), n=b(n))) \\ Rémy Sigrist, Jun 14 2019
-
Python
from sympy import divisors def A308194(n): c, x = 0, n while x != 5: d = divisors(x) l = len(d) x = d[(l-1)//2] + d[l//2] c += 1 return c # Chai Wah Wu, Jun 14 2019
Comments