login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A146364 a(n) = smallest primes whose continued fraction have different period. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
This sequence is sorted A146363.
LINKS
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*)
CROSSREFS
Sequence in context: A019334 A045356 A158526 * A105895 A238699 A068360
KEYWORD
nonn
AUTHOR
Artur Jasinski, Oct 30 2008
EXTENSIONS
More terms from Robert Israel, Jun 14 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 25 21:54 EDT 2024. Contains 375454 sequences. (Running on oeis4.)