%I #20 Aug 02 2017 12:02:11
%S 1,2,2,3,2,2,2,3,3,2,2,3,2,2,2,4,2,3,2,3,2,2,2,3,3,2,3,3,2,2,2,3,2,2,
%T 2,4,2,2,2,3,2,2,2,3,3,2,2,4,3,3,2,3,2,3,2,3,2,2,2,3,2,2,3,3,2,2,2,3,
%U 2,2,2,3,2,2,3,3,2,2,2,4,4,2,2,3,2,2,2,3,2,3,2,3,2,2,2,3,2,3,3,4,2,2,2,3,2,2
%N a(n) = one more than the number of iterations of A005361 needed to reach 1 from the starting value n.
%H Antti Karttunen, <a href="/A082091/b082091.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F a(1) = 1, and for n > 1, a(n) = 1 + a(A005361(n)).
%e For n = 2 = 2^1, A005361(2) = 1, so we reach 1 in one step, and thus a(2) = 1+1 = 2.
%e For n = 4 = 2^2, A005361(4) = 2; A005361(2) = 1, so we reach 1 in two steps, and thus a(4) = 2+1 = 3.
%e For n = 6 = 2^1 * 3^1, A005361(6) = 1*1 = 1, so we reach 1 in one step, and thus a(6) = 1+1 = 2.
%e For n = 64 = 2^6, A005361(64) = 6, thus a(64) = 1 + a(6) = 3.
%e For n = 10! = 3628800 = 2^8 * 3^4 * 5^2 * 7*1, A005361(3628800) = 64, thus a(3628800) = 1 + a(64) = 4.
%t ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] expr[x_] := Apply[Times, ep[x]] Table[Length[FixedPointList[expr, w]]-1, {w, 2, 128}]
%t (* Second program: *)
%t Table[Length@ NestWhileList[Apply[Times, FactorInteger[#][[All, -1]]] &, n, # != 1 &], {n, 105}] (* _Michael De Vlieger_, Jul 29 2017 *)
%o (PARI)
%o A005361(n) = factorback(factor(n)[, 2]); \\ This function from _Charles R Greathouse IV_, Nov 07 2014
%o A082091(n) = if(1==n,1,1+A082091(A005361(n))); \\ _Antti Karttunen_, Jul 28 2017
%o (PARI) first(n) = my(v = vector(n)); v[1] = 1; for(i=2, n, v[i] = v[factorback(factor(i)[, 2])] + 1); v \\ _David A. Corneth_, Jul 28 2017
%o (Scheme) (define (A082091 n) (if (= 1 n) n (+ 1 (A082091 (A005361 n))))) ;; _Antti Karttunen_, Jul 28 2017
%Y Cf. A001414, A005361, A008475, A056239, A082083-A082086, A082090.
%K nonn
%O 1,2
%A _Labos Elemer_, Apr 09 2003
%E Term a(1)=1 prepended, Name and Example sections edited by _Antti Karttunen_, Jul 28 2017
|