login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A076587
First occurrence of n as a term in the continued fraction for Pi/2.
0
1, 10, 4, 9, 20, 13, 26, 11, 142, 102, 70, 93, 179, 69, 127, 283, 52, 1166, 141, 605, 100, 83, 280, 414, 451, 61, 30, 234, 848, 448, 5, 372, 1389, 2445, 2082, 498, 603, 2565, 517, 3715, 22, 1155, 419, 856, 4125, 1573, 441, 207, 42, 1536, 5359, 576, 6654, 1002
OFFSET
1,2
MATHEMATICA
Module[{nn=6700, p2}, p2=ContinuedFraction[Pi/2, nn]; Table[Position[p2, n, 1, 1], {n, 60}]]//Flatten (* Harvey P. Dale, Jul 14 2023 *)
PROG
(PARI) (15000 precision digits) v=contfrac(Pi/2); a(n)=if(n<0, 0, s=1; while(abs(n-component(v, s))>0, s++); s)
CROSSREFS
Cf. A032523.
Sequence in context: A309707 A376972 A100844 * A266999 A166204 A364190
KEYWORD
base,nonn
AUTHOR
Benoit Cloitre, Oct 20 2002
STATUS
approved