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.

A338779 a(n) is the smallest number k such that period of continued fraction for sqrt(prime(j)) equal for all prime(k) <= prime(j) < prime(k + n).

This page as a plain text file.
%I A338779 #9 Nov 12 2020 22:17:18
%S A338779 1,97,141043
%N A338779 a(n) is the smallest number k such that period of continued fraction for sqrt(prime(j)) equal for all prime(k) <= prime(j) < prime(k + n).
%C A338779 The corresponding primes are 2, 509, 1885717, ...
%e A338779 sqrt(prime(97)) = sqrt(509) has continued fraction [22; 1, 1, 3, 1, 1, 2, 10, 1, 8, 8, 1, 10, 2, 1, 1, 3, 1, 1, 44, ...], period 19.
%e A338779 sqrt(prime(98)) = sqrt(521) has continued fraction [22; 1, 4, 1, 2, 1, 2, 8, 1, 3, 3, 1, 8, 2, 1, 2, 1, 4, 1, 44, ...], period 19.
%e A338779 These are the first 2 consecutive primes with the same period of continued fraction for square root, so a(2) = 97.
%t A338779 A054269[n_] := Module[{s = Sqrt[Prime[n]]}, If[IntegerQ[s], 0, Length[ContinuedFraction[s][[2]]]]]; Do[find = 0; k = 0; While[find == 0, k++; If[Length[Union[Table[A054269[j], {j, k, k + n - 1}]]] == 1, find = 1; Print[k]]], {n, 1, 3}]
%Y A338779 Cf. A003285, A031400, A054269.
%K A338779 nonn,bref,more
%O A338779 1,2
%A A338779 _Ilya Gutkovskiy_, Nov 08 2020