%I #27 Nov 07 2019 13:34:17
%S 1,2,3,3,5,5,8,4,4,8,13,7,21,13,7,5,34,7,55,11,11,21,89,9,7,34,5,18,
%T 144,12,233,6,18,55,12,10,377,89,29,14,610,19,987,29,9,144,1597,11,11,
%U 11,47,47,2584,9,19,23,76,233,4181,17,6765,377,14,7,31,31,10946,76,123,19
%N Numerator of cfenc[n] (see definition in comments).
%C a[n] := numerator of cfenc[n]. cfenc[n] := number given by interpreting as a continued fraction expansion (indexed from 1) the sequence whose i-th entry is one plus the exponent on the i-th prime factor of n (fix cfenc[1]=1). a[2^k] = cfenc[2^k] = k+1.
%H Hans Havermann, <a href="/A120249/b120249.txt">Table of n, a(n) for n = 1..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Continued_fraction">Continued fraction</a>
%F a(2^k) = k+1.
%F a(A000040(n)) = A000045(n+2).
%F From _Antti Karttunen_, Oct 29 2019: (Start)
%F The following formula employs Gauss's notation for continued fractions (see the section "Notations" in the Wikipedia-article), for example, K_{i=1..3} u(i) stands for 1/(u(1) + 1/(u(2) + 1/u(3))):
%F Let c(n) = A001511(n) + K_{i=2..A061395(n)} 1/(1+A286561(n,A000040(i))). Then a(n) is the numerator of c(n), and A120250(n) is the denominator of c(n).
%F For all n >= 2, a(2n) = a(A003961(n)), thus a(n) = f(A323080(n)) for some function f.
%F (End)
%e a(2646) = numerator[cfenc[2646]]= numerator[cfenc[2^1 * 3^3 * 7^2]] = numerator[FromContinuedFraction[{2; 4, 1, 3}]] = numerator[2 + 1/(4 + 1/(1 + 1/3))] = numerator[42/19] = 42.
%e From _Antti Karttunen_, Oct 29 2019: (Start)
%e a(6) = 3 because 6 = 2^1 * 3^1, and the numerator of the continued fraction 1+1 + 1/(1+1) = 5/2 is 5.
%e a(12) = 7 because 12 = 2^2 * 3^1, and the numerator of the continued fraction 2+1 + 1/(1+1) = 7/2 is 7.
%e a(15) = 7 because 15 = 2^0 * 3^1 * 5^1, and the numerator of the continued fraction 0+1 + 1/(1+1 + 1/(1+1)) = 1 + 1/(2 + 1/2) = 1 + 2/5 = 7/5 is 7.
%e (End)
%t Table[If[n == 1, 1, (fl = FactorInteger[n]; pq = Table[1, {i, 1, PrimePi[Last[fl][[1]]]}]; While[Length[fl] > 0, pp = First[fl]; fl = Drop[fl, 1]; pq[[PrimePi[pp[[1]]]]] = pp[[2]] + 1;]; Numerator[FromContinuedFraction[pq]])],{n,1,80}]
%o (PARI) A120249(n) = if(1==n,n, my(pi=primepi(vecmax(factor(n)[, 1])), cf=1+valuation(n,prime(pi))); pi--; while(pi, cf = (1+valuation(n,prime(pi)))+(1/cf); pi--); numerator(cf)); \\ _Antti Karttunen_, Oct 26 2019
%Y Corresponding denominators in A120250. Numerators modulo respective denominators in A120251.
%Y Cf. A000040, A000045, A001511, A003961, A061395, A286561, A323080.
%Y Cf. also A007305, A075158, A273671, A273672.
%K frac,nonn
%O 1,2
%A Joseph Biberstine (jrbibers(AT)indiana.edu), Jun 12 2006, Jun 25 2006