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.

A086397 Numerators of the rational convergents to sqrt(2) if both numerators and denominators are primes.

Original entry on oeis.org

3, 7, 41, 63018038201, 19175002942688032928599
Offset: 1

Views

Author

Cino Hilliard, Sep 06 2003

Keywords

Comments

Next term, if it exists, is bigger than 489 digits (the 1279th convergent to sqrt(2)). - Joshua Zucker, May 08 2006
Are the terms >= 7 the primes in A183064? Is this a subsequence of A088165? - R. J. Mathar, Aug 16 2019
Yes, the terms >= 7 are the primes in A183064 and are a subsequence of A088165. a(1)=3 is from the numerator of 3/2, but no other convergents > sqrt(2) can appear in this sequence because they all have even denominator. All terms >= 7 are lower principal convergents from A002315/A088165/A183064 - Martin Fuller, Apr 08 2023

Crossrefs

Denominators are A118612.

Programs

  • Mathematica
    For[n = 2, n < 1500, n++, a := Join[{1}, Table[2, {i, 2, n}]]; If[PrimeQ[Denominator[FromContinuedFraction[a]]], If[PrimeQ[Numerator[FromContinuedFraction[a]]], Print[Numerator[FromContinuedFraction[a]]]]]] (* Stefan Steinerberger, May 09 2006 *)
  • PARI
    cfracnumdenomprime(m,f) = { default(realprecision,3000); cf = vector(m+10); x=f; for(n=0,m, i=floor(x); x=1/(x-i); cf[n+1] = i; ); for(m1=0,m, r=cf[m1+1]; forstep(n=m1,1,-1, r = 1/r; r+=cf[n]; ); numer=numerator(r); denom=denominator(r); if(ispseudoprime(numer)&&ispseudoprime(denom), print1(numer",");numer2=numer;denom2=denom); ) default(realprecision,28); }

Extensions

More terms from Cino Hilliard, Jan 15 2005
Edited by N. J. A. Sloane, Aug 06 2009 at the suggestion of R. J. Mathar