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”).

A031630
Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted the two central terms are both 42.
0
11261, 21953, 22549, 36181, 36562, 37330, 53945, 54877, 55817, 132058, 165197, 166825, 199357, 235754, 238673, 240629, 242593, 243578, 277301, 283649, 284714, 285781, 287921, 337129, 372941, 377837, 426065, 427370, 428677, 431297
OFFSET
1,1
MATHEMATICA
cf42Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1, 2}, ContinuedFraction[s][[2]]]; len= Length[ cf]; OddQ[len]&&cf[[Floor[len/2]]]==cf[[Ceiling[len/2]]]==42]; Select[Range[ 450000], cf42Q] (* Harvey P. Dale, Aug 10 2023 *)
CROSSREFS
Sequence in context: A104316 A237171 A246248 * A064870 A051520 A051346
KEYWORD
nonn
EXTENSIONS
First term 1765 removed by Georg Fischer, Jun 16 2019
STATUS
approved