cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A071866 Number of elements in the continued fraction for prime(n+1)/prime(n).

Original entry on oeis.org

2, 3, 3, 4, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 4, 4, 3, 3, 4, 3, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 4, 3, 4, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 6, 6, 4, 3, 3, 4, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 3, 3, 6, 3, 5, 3, 3, 4, 4, 3, 3, 4, 4, 6, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 4, 4, 4, 4, 5, 4, 4, 5, 3, 3, 3, 5, 4, 4, 3, 3
Offset: 1

Views

Author

Benoit Cloitre, Jun 09 2002

Keywords

Examples

			prime(5)/prime(4) = 11/7, 11/7 continued fraction is [1, 1, 1, 3] which contains 4 elements, hence a(4)=4.
		

Crossrefs

Programs

  • Maple
    seq(nops(convert(ithprime(n+1)/ithprime(n),confrac)),n=1..200); # Robert Israel, May 29 2018
  • Mathematica
    Table[Length[ContinuedFraction[Prime[n + 1]/Prime[n]]], {n, 105}] (* Ray Chandler, Sep 18 2005 *)
  • PARI
    a(n) = length(contfrac(prime(n+1)/prime(n)));

Extensions

More terms from Hans Havermann, Jul 06 2002

A109374 Irregular table read by rows: Row n is the terms of the continued fraction for prime(n+1)/prime(n).

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 3, 1, 5, 2, 1, 3, 4, 1, 8, 2, 1, 4, 1, 3, 1, 3, 1, 5, 1, 14, 2, 1, 5, 6, 1, 9, 4, 1, 20, 2, 1, 10, 1, 3, 1, 7, 1, 5, 1, 8, 1, 5, 1, 29, 2, 1, 10, 6, 1, 16, 1, 3, 1, 35, 2, 1, 12, 6, 1, 19, 1, 3, 1, 13, 1, 5, 1, 11, 8, 1, 24, 4, 1, 50, 2, 1, 25, 1, 3, 1, 53, 2, 1, 27, 4, 1
Offset: 1

Views

Author

Leroy Quet, Aug 24 2005

Keywords

Comments

Sequence A071866 gives the number of terms in the n-th continued fraction.
If n is in A029707, row n is [1, (prime(n)-1)/2, 2]. - Robert Israel, May 29 2018

Examples

			Prime(4)/prime(3) = 7/5 = 1+ 1/(2+1/2), so the terms associated with the 3rd continued fraction are 1, 2, 2.
		

Crossrefs

Programs

  • Maple
    seq(op(convert(ithprime(n+1)/ithprime(n), confrac)),n=1..100); # Robert Israel, May 29 2018
  • Mathematica
    Flatten[Table[ContinuedFraction[Prime[n + 1]/Prime[n]], {n, 30}]] (* Ray Chandler, Aug 25 2005 *)

Extensions

Extended by Ray Chandler and Robert G. Wilson v, Aug 25 2005
Edited by Charles R Greathouse IV, Apr 23 2010
Definition corrected by Leroy Quet, May 10 2010

A112323 a(n) = numerator of sum of reciprocals of the terms of the continued fraction for prime(n+1)/prime(n).

Original entry on oeis.org

3, 5, 2, 10, 17, 19, 13, 31, 38, 11, 41, 49, 31, 73, 82, 93, 89, 19, 115, 107, 5, 136, 148, 107, 31, 38, 178, 161, 139, 67, 220, 236, 103, 256, 56, 181, 47, 283, 302, 313, 269, 52, 287, 61, 74, 65, 69, 388, 341, 289, 423, 359, 137, 456, 467, 478, 101, 107, 349, 211
Offset: 1

Views

Author

Leroy Quet, Sep 03 2005

Keywords

Examples

			prime(6)/prime(5) = 13/11 = 1 + 1/(5 + 1/2).
So a(5) is 17, the numerator of 17/10 = 1 + 1/5 + 1/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (1/# &) /@ ContinuedFraction[Prime[n + 1]/Prime[n]]; Table[Numerator[f[n]], {n, 60}] (* Ray Chandler, Sep 07 2005 *)

Extensions

Extended by Ray Chandler, Sep 07 2005

A112768 Sum of terms of continued fraction for prime(n+1)/prime(n).

Original entry on oeis.org

3, 4, 5, 6, 8, 8, 11, 9, 10, 17, 12, 14, 23, 15, 14, 15, 32, 17, 21, 38, 19, 24, 20, 20, 29, 53, 30, 56, 32, 23, 36, 28, 71, 24, 77, 32, 33, 45, 34, 35, 92, 29, 98, 53, 101, 23, 24, 60, 116, 62, 45, 122, 35, 48, 49, 50, 137, 52, 74, 143, 35, 35, 81, 158, 83, 30, 62, 40, 176
Offset: 1

Views

Author

Ray Chandler, Sep 18 2005

Keywords

Examples

			Prime(6)/prime(5) = 13/11 = 1 + 1/(5 + 1/2), so a(5) = 1+5+2 = 8.
		

Crossrefs

Programs

  • Maple
    seq(convert(numtheory:-cfrac(ithprime(n+1)/ithprime(n), quotients),`+`),n=1..100); # Robert Israel, Jul 11 2017
  • Mathematica
    Table[Plus @@ ContinuedFraction[Prime[n + 1]/Prime[n]], {n, 70}]
  • PARI
    a(n) = vecsum(contfrac(prime(n+1)/prime(n))); \\ Michel Marcus, Jul 12 2017

A112324 a(n) = denominator of sum of reciprocals of the terms of the continued fraction for prime(n+1)/prime(n).

Original entry on oeis.org

2, 2, 1, 3, 10, 12, 8, 12, 15, 7, 30, 36, 20, 30, 35, 40, 58, 15, 48, 70, 4, 57, 65, 88, 24, 25, 75, 106, 108, 56, 93, 105, 68, 117, 37, 150, 39, 120, 135, 140, 178, 45, 190, 48, 49, 16, 17, 165, 226, 228, 190, 238, 120, 205, 210, 215, 67, 90, 276, 140, 84, 260, 228, 310
Offset: 1

Views

Author

Leroy Quet, Sep 03 2005

Keywords

Examples

			prime(6)/prime(5) = 13/11 = 1 + 1/(5 + 1/2).
So a(5) is 10, the denominator of 17/10 = 1 + 1/5 + 1/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (1/# &) /@ ContinuedFraction[Prime[n + 1]/Prime[n]]; Table[Denominator[f[n]], {n, 64}] (* Ray Chandler, Sep 07 2005 *)

Extensions

Extended by Ray Chandler, Sep 07 2005
Showing 1-5 of 5 results.