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.

A338850 Continued fraction expansion of the smallest constant 'c' such that the numbers 1+floor(c^(n^1.5)) are distinct primes for all n >= 0.

Original entry on oeis.org

2, 3, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 2, 13, 6, 1, 3, 5, 1, 5, 1, 7, 17, 1, 3, 1, 11, 18, 3, 1, 2, 1, 2, 1, 2, 17, 15, 1, 69, 3, 1, 2, 1, 1, 1, 1, 33, 1, 3, 2, 4, 17, 1, 3, 2, 2, 1, 2, 6, 1, 11, 3, 2, 1, 1, 1, 17, 1, 7, 5, 2, 2, 2, 84, 1, 8, 3, 1, 1, 22, 3698, 2, 2, 1, 1, 2, 1, 7, 2, 1, 1, 1, 1, 3, 1, 5, 15, 1, 3, 1, 2, 1, 1, 1, 1, 2, 1, 16, 1, 7, 2, 2, 3, 1, 9
Offset: 1

Views

Author

Bernard Montaron, Nov 12 2020

Keywords

Examples

			2+1/(3+1/(1+1/(2+1/(1+1/(2+1/(1+1/(1+1/(1+1/(1+1/(3+1/(1+1/(2+1/(13+1/(6]= 590652/260429 = 2.26799626769... The constant 'c' is equal to 2.267996267706724247328553280725371774527042254400818772275…
		

Crossrefs

Programs

  • PARI
    c(n=40, prec=100)={
      my(curprec=default(realprecision));
      default(realprecision, max(prec, curprec));
      my(a=List([2]), d=1.5, c=2.0, b, p, ok, smpr(b)=my(p=b); while(!isprime(p), p=nextprime(p+1)); return(p); );
      for(j=1, n-1,
        b=1+floor(c^(j^d));
        until(ok,
          ok=1;
          p=smpr(b);
          listput(a,p,j+1);
          if(p!=b,
             c=(p-1)^(j^(-d));
             for(k=1,j-2,
                 b=1+floor(c^(k^d));
                 if(b!=a[k+1],
                    ok=0;
                    j=k;
                    break;
                   );
                );
            );
        );
      );
      default(realprecision, curprec);
      return(c);
    };
    contfrac(c(50,200),115)
    \\ François Marques, Nov 17 2020