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

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

Original entry on oeis.org

3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1

Views

Author

Cino Hilliard, Sep 06 2003, Jul 30 2004, Oct 02 2005

Keywords

Comments

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.
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
Is this sequence infinite?

References

  • Prime Obsession, John Derbyshire, Joseph Henry Press, April 2004, p 16.

Crossrefs

Programs

  • Mathematica
    Select[Numerator[Convergents[Sqrt[2],250]],PrimeQ] (* Harvey P. Dale, Oct 19 2011 *)
  • 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,",")); ) }
    
  • 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+.) }

Formula

a(n) = A001333(A099088(n)). - R. J. Mathar, Feb 01 2024

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A292082 Primes p such that (p^2 - 1) / 2 is a square (A000290).

Original entry on oeis.org

3, 17, 577, 665857
Offset: 1

Views

Author

Jaroslav Krizek, Sep 12 2017

Keywords

Comments

Corresponding values of squares: 4, 144, 166464, 221682772224.
Subsequence of A257553.
Conjecture: sequence is finite.
Numbers k such that (k^2 - 1) / 2 is a square are given by A001541, of which the only prime terms are 3, 17, 577, and 665857 (see Alexander Adamchuk's Nov 24 2006 Comments entry there), so a(4) = 665857 is the last term of this sequence. - Jon E. Schoenfield, Nov 20 2017

Examples

			Number 3 is in the sequence because (3^2 - 1) / 2 = 4 (square).
		

Crossrefs

Cf. A088165 (primes p such that (p^2 + 1) / 2 is a square).

Programs

  • Magma
    [n: n in [3..1000000] | IsPrime(n) and IsSquare((n^2-1) / 2)];
  • Mathematica
    Select[Prime[Range[55000]],IntegerQ[Sqrt[(#^2-1)/2]]&] (* Harvey P. Dale, Mar 10 2019 *)
Showing 1-2 of 2 results.