login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107901 Length of continued fraction for prime(n)/n. 6
1, 2, 3, 3, 2, 2, 3, 4, 4, 3, 4, 2, 3, 2, 3, 3, 3, 5, 4, 5, 3, 5, 6, 5, 4, 5, 5, 6, 4, 5, 3, 4, 5, 3, 4, 3, 3, 4, 5, 3, 6, 4, 5, 6, 6, 3, 3, 7, 8, 8, 5, 5, 6, 6, 4, 6, 7, 4, 7, 5, 7, 7, 5, 4, 6, 4, 5, 5, 3, 3, 4, 3, 3, 4, 4, 3, 3, 3, 3, 4, 6, 4, 4, 4, 3, 7, 5, 5, 6, 4, 6, 5, 5, 4, 4, 5, 3, 4, 6, 7, 5, 5, 5, 4, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Continued Fraction.
FORMULA
a(n) = A107898(n) - 1.
EXAMPLE
From David A. Corneth, Jan 09 2024: (Start)
a(10) = 3 as prime(10)/10 = 29/10 whose continued fraction is [2; 1, 9] having length 3
a(18) = 5 as prime(18)/18 = 61/18 whose continued fraction is [3; 2, 1, 1, 3] having length 5. (End)
MATHEMATICA
A107901[n_]=Length[ContinuedFraction[Prime[n]/n]
PROG
(PARI) a(n) = #contfrac(prime(n)/n) \\ David A. Corneth, Jan 09 2024
(PARI) first(n) = my(res = primes(n)); for(i = 1, n, res[i] = #contfrac(res[i]/i)); res \\ David A. Corneth, Jan 09 2024
CROSSREFS
Sequence in context: A030620 A348241 A110764 * A334236 A030423 A130631
KEYWORD
nonn
AUTHOR
Zak Seidov, May 26 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)