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-4 of 4 results.

A036247 Numerator of fraction equal to the continued fraction [ 2, 3, 5, ...prime(n) ].

Original entry on oeis.org

2, 7, 37, 266, 2963, 38785, 662308, 12622637, 290982959, 8451128448, 262275964847, 9712661827787, 398481410904114, 17144413330704689, 806185907954024497, 42744997534894003030, 2522761040466700203267
Offset: 1

Views

Author

Keywords

Examples

			a(2)=7 because 2+1/3 = 7/3.
a(3)=37 because 2+1/(3+1/5) = 37/16.
a(4)=266 because 2+1/(3+1/(5+1/7)) = 266/115.
		

Crossrefs

Cf. A036248 (denominator), A083659.

Programs

  • Mathematica
    a[1]=2;a[2]=7;a[n_]:=Prime[n]*a[n-1]+a[n-2];Table[a[n],{n,20}] (* Zak Seidov, Nov 07 2008 *)
    With[{prs=Prime[Range[20]]},Numerator[Table[FromContinuedFraction[ Take[ prs,n]],{n,20}]]] (* Harvey P. Dale, Dec 02 2011 *)
  • PARI
    a(n)=if(n<0,0,contfracpnqn(vector(n,i, prime(i)))[1,1])

Formula

a(1)=2; a(2)=7; for n>2, a(n)=prime(n)*a(n-1)+a(n-2). - Zak Seidov, Nov 07 2008

Extensions

More terms from Benoit Cloitre, May 25 2003

A083659 Denominator of fraction equal to the continued fraction [p(n); p(n-1),...,5,3,2].

Original entry on oeis.org

1, 2, 7, 37, 266, 2963, 38785, 662308, 12622637, 290982959, 8451128448, 262275964847, 9712661827787, 398481410904114, 17144413330704689, 806185907954024497, 42744997534894003030, 2522761040466700203267, 153931168466003606402317, 10315911048262708329158506
Offset: 1

Views

Author

Hollie L. Buchanan II, Jun 14 2003

Keywords

Examples

			The 5th term is 266 because 11+1/(7+1/(5+1/(3+1/2))) = 2963/266.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember;
          `if`(n=1, 0, 1/b(n-1)) + ithprime(n)
        end:
    a:= n-> denom(b(n)):
    seq(a(n), n=1..20);  # Alois P. Heinz, Nov 03 2018
  • Mathematica
    Table[Denominator[FromContinuedFraction[Prime[Range[n, 1, -1]]]], {n, 1, 20}]

Extensions

One term corrected and extended by Alois P. Heinz, Nov 03 2018

A121661 Duplicate of A118836.

Original entry on oeis.org

1, 6, 55, 556, 7839, 118141, 2488800, 54871741, 1374282325, 35786212191, 1182319284628, 40234641889543, 1409394785418633, 53597236487797597, 2091701617809524916, 96271871655725943733, 4719413412748380767833
Offset: 1

Views

Author

Jonathan Vos Post, Aug 14 2006

Keywords

Comments

Previous name was: Denominator of fraction equal to the continued fraction [4, 6, 9, ..., semiprime(n)].
Numerator of fraction equal to the continued fraction [4, 6, 9, ..., semiprime(n)] is A121660. Hence A121660/A121661 is semiprime analog of A036247/A036248.

Examples

			a(1) = denominator of 4 = 1.
a(2) = denominator of 4 + 1/6 = denominator of 25/6 = 6.
a(3) = denominator of 4 + 1/(6+1/9) = denominator of 229/55 = 55.
a(10) = denominator of 4+1/(6+1/(9+1/(10+ 1/(14+1/(15+ 1/(21+1/(22+1/(25+1/(26))))))))) = denominator of 149001936472/35786212191 = 35786212191.
		

Programs

Formula

a(n) = A118836(n). - Georg Fischer, Nov 02 2018

A292433 a(0) = 0, a(1) = 1; a(n) = prime(a(n-1))*a(n-1) + a(n-2).

Original entry on oeis.org

0, 1, 2, 7, 121, 79988, 81600798165, 182421074243967704954243
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 08 2017

Keywords

Examples

			+---+-------------+--------------------+-------------------+
| n | a(n)/a(n+1) | Continued fraction |      Comment      |
+---+-------------+--------------------+-------------------+
| 1 |    1/2      | [0; 2]             |   2 = prime(a(1)) |
+---+-------------+--------------------+-------------------+
| 2 |    2/7      | [0; 3, 2]          |   3 = prime(a(2)) |
+---+-------------+--------------------+-------------------+
| 3 |    7/121    | [0; 17, 3, 2]      |  17 = prime(a(3)) |
+---+-------------+--------------------+-------------------+
| 4 |  121/79988  | [0; 661, 17, 3, 2] | 661 = prime(a(4)) |
+---+-------------+--------------------+-------------------+
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[n] == Prime[a[n - 1]] a[n - 1] + a[n - 2]}, a[n], {n, 7}]
Showing 1-4 of 4 results.