OFFSET
2,1
COMMENTS
a(n) = n^2 + 1 if n is prime (A000040).
Denominators give the sequence: b(n) = 2, 3, 5, 5, 7, 7, 12, 10, 11, 11, 17, 13, 15, 16, 29, 17, 23, 19, 27, 22, 23, 23, 41, 26, 27, 33, 37, 29, 37, 31, 70, 34, 35, 36, 56, 37, 39, 40, 65, 41, 51, 43, 57, 53, 47, 47, 99, 50, 57, 52, 67, 53, 76, 56, ...; where b(n) = n if n is prime.
LINKS
Ilya Gutkovskiy, Extended example
Eric Weisstein's World of Mathematics, Prime Factor
EXAMPLE
5/2, 10/3, 22/5, 26/5, 45/7, 50/7, 101/12, 93/10, 115/11, 122/11, 211/17, 170/13, 217/15, 245/16, 476/29, 290/17, 424/23, 362/19, 551/27, 469/22, ...
a(20) = 551, because the prime factorization of 20 is 2*2*5 and 20 + 1/(2 + 1/(2 + 1/5)) = 551/27.
MATHEMATICA
Numerator@ Table[ FromContinuedFraction@ Flatten[ {{n}, Table[#[[1]], {#[[2]]}] & /@ FactorInteger@n}], {n, 2, 55}] (* Giovanni Resta, May 21 2016 *)
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Ilya Gutkovskiy, May 07 2016
EXTENSIONS
Missing a(28) added by Giovanni Resta, May 21 2016
STATUS
approved