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.

A086395 Primes found among the numerators of the continued fraction rational approximations to sqrt(2).

This page as a plain text file.
%I A086395 #25 Feb 01 2024 05:27:29
%S A086395 3,7,17,41,239,577,665857,9369319,63018038201,489133282872437279,
%T A086395 19175002942688032928599,
%U A086395 123426017006182806728593424683999798008235734137469123231828679
%N A086395 Primes found among the numerators of the continued fraction rational approximations to sqrt(2).
%C A086395 Or, starting with the fraction 1/1, the prime numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and twice bottom to get the new top. Or, A001333(n) is prime.
%C A086395 The transformation of fractions is 1/1 -> 3/2 -> 7/5 -> 17/12 -> 41/29 -> ... A001333(n)/A000129(n). - _R. J. Mathar_, Aug 18 2008
%C A086395 Is this sequence infinite?
%D A086395 Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p 16.
%H A086395 G. C. Greubel, <a href="/A086395/b086395.txt">Table of n, a(n) for n = 1..18</a>
%F A086395 a(n) = A001333(A099088(n)). - _R. J. Mathar_, Feb 01 2024
%t A086395 Select[Numerator[Convergents[Sqrt[2],250]],PrimeQ] (* _Harvey P. Dale_, Oct 19 2011 *)
%o A086395 (PARI) \Continued fraction rational approximation of numeric constants f. m=steps. cfracnumprime(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),print1(numer,",")); ) }
%o A086395 (PARI) primenum(n,k,typ) = \yp = 1 num, 2 denom. print only prime num or denom. { local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v),print1(v","); ) ); print(); print(a/b+.) }
%Y A086395 Cf. A001333, A086383, A257553.
%K A086395 nonn
%O A086395 1,1
%A A086395 _Cino Hilliard_, Sep 06 2003, Jul 30 2004, Oct 02 2005
%E A086395 Edited by _N. J. A. Sloane_, Aug 23 2008 at the suggestion of _R. J. Mathar_