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.

This page as a plain text file.
%I A307453 #18 Apr 10 2019 05:21:47
%S A307453 2,3,31,7,13,3797,5273,4987,90371,79873,2081,111301,1258027,5325101,
%T A307453 12564317,9477889,47370431,709669249,1529640443,2196104969,392143681,
%U A307453 8216809361,30739072339,200758317433,370949963971,161356959383,1788677860531,7049166342469,4484287435283,3690992602753
%N 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.
%H A307453 Piotr Miska, Maciej Ulas, <a href="https://arxiv.org/abs/1904.03404">On consecutive 1's in continued fractions expansions of square roots of prime numbers</a>, arXiv:1904.03404 [math.NT], 2019. See Table 1 p. 15.
%H A307453 <a href="/index/Con#confC">Index entries for continued fractions for constants</a>
%F A307453 Limit_{n->infinity} (sqrt(a(n)) - floor(sqrt(a(n)))) = A094214. - _Daniel Suteu_, Apr 09 2019
%e A307453 For p = 2,  we have [1; 2, ...]; see A040000.
%e A307453 For p = 3,  we have [1; 1, 2, ...]; see A040001.
%e A307453 For p = 31, we have [5; 1, 1, 3, ...]; see A010129.
%e A307453 For p = 7,  we have [2; 1, 1, 1, 4, ...]; see A010121.
%o A307453 (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);}
%o A307453 a(n) = {my(p=2); while (! isok(p, n), p = nextprime(p+1)); p;}
%Y A307453 Cf. A040000, A040001, A010121, A010129.
%K A307453 nonn
%O A307453 0,1
%A A307453 _Michel Marcus_, Apr 09 2019
%E A307453 a(21)-a(29) from _Daniel Suteu_, Apr 09 2019
%E A307453 a(0) added by _Chai Wah Wu_, Apr 09 2019