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.

A307453 a(n) is the least prime p for which the continued fraction expansion of sqrt(p) has exactly n consecutive 1's starting at position 2.

Original entry on oeis.org

2, 3, 31, 7, 13, 3797, 5273, 4987, 90371, 79873, 2081, 111301, 1258027, 5325101, 12564317, 9477889, 47370431, 709669249, 1529640443, 2196104969, 392143681, 8216809361, 30739072339, 200758317433, 370949963971, 161356959383, 1788677860531, 7049166342469, 4484287435283, 3690992602753
Offset: 0

Views

Author

Michel Marcus, Apr 09 2019

Keywords

Examples

			For p = 2,  we have [1; 2, ...]; see A040000.
For p = 3,  we have [1; 1, 2, ...]; see A040001.
For p = 31, we have [5; 1, 1, 3, ...]; see A010129.
For p = 7,  we have [2; 1, 1, 1, 4, ...]; see A010121.
		

Crossrefs

Programs

  • PARI
    isok(p, n) = {my(c=contfrac(sqrt(p)));  for (k=2, n+1, if (c[k] != 1, return (0));); return(c[n+2] !=  1);}
    a(n) = {my(p=2); while (! isok(p, n), p = nextprime(p+1)); p;}

Formula

Limit_{n->infinity} (sqrt(a(n)) - floor(sqrt(a(n)))) = A094214. - Daniel Suteu, Apr 09 2019

Extensions

a(21)-a(29) from Daniel Suteu, Apr 09 2019
a(0) added by Chai Wah Wu, Apr 09 2019