A250030 a(n) is the number of iterations of A008474 needed to reach 5, starting at n, where A008474(Product p_i^e_i) = Sum(p_i+e_i).
0, 3, 2, 1, 1, 2, 3, 2, 5, 4, 3, 4, 3, 2, 4, 3, 3, 4, 3, 2, 3, 4, 4, 3, 7, 6, 4, 3, 5, 4, 5, 2, 5, 4, 3, 4, 5, 4, 6, 5, 4, 5, 4, 3, 2, 3, 5, 3, 3, 2, 3, 6, 3, 6, 6, 5, 7, 6, 6, 2, 4, 5, 6, 5, 4, 4, 4, 3, 7, 6, 4, 3, 4, 4, 4, 3, 3, 5, 6, 5, 3, 5, 5, 4, 6, 5, 5, 4, 3, 6, 5, 4, 4, 3, 4, 4, 5, 4, 6, 5, 3, 4, 4, 3, 5, 4, 5, 5, 6, 5, 7, 5, 5
Offset: 5
Keywords
Examples
3 iterations are needed to start at 11 and finish at 5 (11 -> 12 -> 8 -> 5), therefore a(11) is 3. Conjecture 2: For n = 11, S(n) = 11 + 12 + 8 = 31, which is not divisible by 11. - _Ivan N. Ianakiev_, May 06 2015
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 5..10000
Programs
-
Haskell
a250030 n = snd $ until ((== 5) . fst) (\(x, s) -> (a008474 x, s + 1)) (a008474 n, 1) -- Reinhard Zumkeller, Nov 18 2014
-
Maple
f:= n -> convert(map(convert,ifactors(n)[2],`+`),`+`): a:= proc(n) option remember; if n = 5 then 0 else 1+procname(f(n)) fi end proc: 4, seq(a(n),n=6..200); # Robert Israel, May 11 2015
-
Mathematica
trajLen={0};Do[lst={};g[n_]:=Total[Flatten[FactorInteger[n]]];While[n>5,n=g[n];AppendTo[lst,n]];AppendTo[trajLen,Length[lst]],{n,6,105}];trajLen
-
PARI
A008474(n)=my(f=factor(n)); sum(i=1,#f~,f[i,1]+f[i,2]) a(n)=my(k); while(n!=5, n=A008474(n); k++); k \\ Charles R Greathouse IV, Jun 03 2015
Extensions
a(5) in b-file corrected by Andrew Howroyd, Feb 22 2018
Comments