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

A079366 Costé prime expansion of Pi - 3.

Original entry on oeis.org

11, 2, 11, 5, 5, 2, 5, 3, 17, 11, 3, 3, 11, 3, 3, 11, 5, 3, 23, 7, 5, 97, 29, 37, 107, 127, 29, 17, 409, 127, 11, 29, 5, 67, 19, 43, 31, 19, 103, 59, 29, 7, 3, 11, 11, 5, 47, 29, 11, 3, 5, 5, 3, 17, 5, 29, 11, 3, 3, 3, 3, 5, 5, 61, 151, 58889, 1877, 983, 757, 163
Offset: 0

Views

Author

N. J. A. Sloane, Feb 15 2003

Keywords

Comments

For x in (0,1], define P(x) = min{p: p prime, 1/x < p}, Phi(x) = P(x)x - 1. Costé prime expansion of x(0) is sequence a(0), a(1), ... given by x(n) = Phi(x(n-1)) (n>0), a(n) = P(x(n)) (n >= 0).
Costé prime expansion = Engel expansion where all terms must be primes (cf. A006784).

Crossrefs

Programs

  • Maple
    Digits := 200: P := proc(x) local y; y := ceil(evalf(1/x)); if isprime(y) then y else nextprime(y); fi; end; F := proc(x) local y,i,t1; y := x; t1 := []; for i from 1 to 50 do p := P(y); t1 := [op(t1),p]; y := p*y-1; od; t1; end; F(Pi-3);
  • Mathematica
    $MaxExtraPrecision = 40; P[x_] := Module[{y}, y = Ceiling[1/x]; If[PrimeQ[y], y, NextPrime[y]]]; F[x_] := Module[{y, i, t1}, y = x; t1 = {}; For[i = 1, i <= 70, i++, AppendTo[t1, p = P[y]]; y = p*y-1]; t1]; F[Pi-3] (* Jean-François Alcover, Dec 16 2013, translated from Maple *)

A079387 Costé prime expansion of sqrt(3) - 1.

Original entry on oeis.org

2, 3, 3, 7, 5, 7, 3, 37, 7, 3, 149, 19, 41, 17, 7, 3, 11, 2, 11, 17, 23, 19, 11, 5, 3, 5, 3, 3, 5, 2, 5, 2, 23, 7, 13, 13, 19, 37, 7, 41, 29, 11, 2, 11, 3, 3, 7, 7, 3, 23, 7, 19, 11, 11, 17, 11, 7, 5, 7, 5, 5, 3, 5, 2, 5, 7, 19, 31, 19, 17, 7, 5, 11, 3, 3, 3, 103, 853, 211, 23, 19, 17, 11, 7, 5
Offset: 0

Views

Author

N. J. A. Sloane, Feb 16 2003

Keywords

Comments

For x in (0,1], define P(x) = min{p: p prime, 1/x < p}, Phi(x) = P(x)x - 1. Costé prime expansion of x(0) is sequence a(0), a(1), ... given by x(n) = Phi(x(n-1)) (n>0), a(n) = P(x(n)) (n >= 0).

Crossrefs

Programs

  • Maple
    Digits := 200: P := proc(x) local y; y := ceil(evalf(1/x)); if isprime(y) then y else nextprime(y); fi; end; F := proc(x) local y,i,t1; y := x; t1 := []; for i from 1 to 100 do p := P(y); t1 := [op(t1),p]; y := p*y-1; od; t1; end; F(sqrt(3)-1);
  • Mathematica
    $MaxExtraPrecision = 500; P[x_] := Module[{y}, y = Ceiling[1/x]; If[PrimeQ[y], y, NextPrime[y]]]; F[x_] := Module[{y, i, t1}, y = x; t1 = {}; For[i = 1, i <= 100, i++, AppendTo[t1, p = P[y]]; y = p*y - 1]; t1]; F[Sqrt[3] - 1] (* G. C. Greubel, Jan 20 2019 *)

Extensions

More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Feb 17 2003

A079388 Records in A079387.

Original entry on oeis.org

2, 3, 7, 37, 149, 853, 1361, 1597, 1861, 4391, 4919, 10487, 12037, 15991, 27581, 334421
Offset: 1

Views

Author

N. J. A. Sloane, Feb 16 2003

Keywords

Comments

RECORDS transform of A079387.

Crossrefs

Programs

  • Mathematica
    A079387 = Cases[Import["https://oeis.org/A079387/b079387.txt", "Table"], {, }][[All, 2]];
    a = {}; l = 0;
    For[i = 1, i <= Length[A079387], i++,
      If[A079387[[i]] > l, l = A079387[[i]]; AppendTo[a, l]]];
    a (* Robert Price, Mar 15 2020 *)
  • PARI
    \p20000 P(x)=local(y); y=ceil(1/x);if(isprime(y),y,nextprime(y)); F(x)=local(y,i,t1);y=x; t1=vector(10000);for(i=1,10000,p=P(y);t1[i]=p;y=p*y-1);t1 v=F(sqrt(3)-1); m=0;for(i=1,length(v),if(v[i]>m,print1(v[i],",");m=v[i])) (Herrgesell)

Extensions

More terms from Lambert Herrgesell (zero815(AT)googlemail.com), Dec 06 2005
Corrected by T. D. Noe, Nov 15 2006
Showing 1-3 of 3 results.