login
A127611
a(n) = numerator of the continued fraction which has the positive divisors of n as its terms.
3
1, 3, 4, 13, 6, 63, 8, 107, 37, 163, 12, 3259, 14, 311, 319, 1725, 18, 10449, 20, 13928, 613, 751, 24, 638475, 151, 1043, 1003, 37306, 30, 1513023, 32, 55307, 1489, 1771, 1511, 19381852, 38, 2207, 2071, 4538318, 42, 5649833, 44, 142046, 131413, 3223, 48
OFFSET
1,2
COMMENTS
The divisors can be written either from largest to smallest or from smallest to largest and the numerator of the continued fraction would remain unchanged.
LINKS
FORMULA
If p is prime, a(p^k) = p^k * a(p^(k-1)) + a(p^(k-2)), with a(p^0) = a(1) = 1 and a(p^1) = p+1. - Robert Israel, Jan 17 2023
EXAMPLE
The divisors of 6 are 1,2,3,6. So a(6) is the numerator of 1 +1/(2 +1/(3 +1/6)) = 63/44. a(6) is also the numerator of 6 +1/(3 +1/(2+1/1)) = 63/10.
MAPLE
f:= n -> numer(numtheory:-cfrac(sort(convert(numtheory:-divisors(n), list)))):
map(f, [$1..100]); # Robert Israel, Jan 17 2023
MATHEMATICA
f[n_] := Numerator[FromContinuedFraction[Divisors[n]]]; Table[f[n], {n, 47}] (* Ray Chandler, Jan 22 2007 *)
PROG
(PARI) a(n) = contfracpnqn(divisors(n))[1, 1]; \\ Kevin Ryde, Jan 19 2023
CROSSREFS
Cf. A127612 (denominators), A127613 (denominators).
Sequence in context: A327583 A324159 A220847 * A308688 A324501 A359112
KEYWORD
frac,nonn,look
AUTHOR
Leroy Quet, Jan 19 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved