|
|
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.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(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; }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|