login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A353299
a(n) is the length of the continued fraction for the sum of the reciprocals of the first n primes.
2
2, 3, 2, 5, 9, 10, 11, 16, 13, 20, 27, 27, 31, 43, 37, 41, 43, 47, 50, 58, 53, 57, 65, 83, 69, 62, 80, 84, 88, 93, 88, 110, 119, 117, 104, 111, 116, 126, 114, 140, 130, 164, 166, 132, 158, 154, 166, 168, 178, 178, 146, 176, 192, 188, 190, 203, 213, 191, 224, 236, 234, 238, 236, 236, 251
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Continued Fraction
Eric Weisstein's World of Mathematics, Harmonic Series of Primes
EXAMPLE
Sum_{k=1..2} 1/prime(k) = 1/2 + 1/3 = 5/6 = 0 + 1/(1 + 1/5), so a(2) = 3.
Sum_{k=1..4} 1/prime(k) = 1/2 + 1/3 + 1/5 + 1/7 = 247/210 = 1 + 1/(5 + 1/(1 + 1/(2 + 1/12))), so a(4) = 5.
MATHEMATICA
Table[Length[ContinuedFraction[Sum[1/Prime[k], {k, 1, n}]]], {n, 1, 65}]
PROG
(PARI) a(n) = #contfrac(sum(k=1, n, 1/prime(k))); \\ Michel Marcus, Apr 10 2022
CROSSREFS
Row lengths of A260615.
Sequence in context: A050159 A147294 A296662 * A349790 A335362 A371395
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 09 2022
STATUS
approved