A146364 a(n) = smallest primes whose continued fraction have different period.
2, 5, 7, 17, 19, 31, 41, 43, 73, 89, 103, 139, 151, 179, 191, 193, 211, 241, 271, 331, 337, 379, 409, 421, 433, 463, 487, 491, 521, 541, 571, 601, 619, 631, 673, 739, 751, 769, 823, 919, 929, 937, 1033, 1039, 1051, 1201, 1249, 1291, 1321, 1399, 1439, 1471, 1531, 1579, 1609, 1699, 1747, 1753, 1759
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..1500
Programs
-
Maple
g:= proc(n) local c; c:= NumberTheory:-ContinuedFraction((1+sqrt(n))/2); nops(Term(c,periodic)[2]); end proc: R:= NULL: S:= {}: count:= 0: p:= 1: while count < 100 do p:= nextprime(p); v:= g(p); if not member(v,S) then R:= R,p; count:= count+1; S:= S union {v}; if count mod 20 = 0 then printf("%d %d\n",count,p) fi fi od: R; # Robert Israel, Jun 14 2024
-
Mathematica
$MaxExtraPrecision = 300; s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 1200}]; Print[aa]; bb = {}; Do[k = 1; yes = 0&&PeimeQ[k]; Do[If[aa[[k]] == n && yes == 0, AppendTo[bb, k]; yes = 1], {k, 1, Length[aa]}], {n, 1, 22}]; Sort[bb] (*Artur Jasinski*)
Extensions
More terms from Robert Israel, Jun 14 2024
Comments