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.

A146340 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 17.

This page as a plain text file.
%I A146340 #23 Jul 22 2025 13:10:50
%S A146340 521,617,709,1433,1597,2549,2909,2965,3161,3581,3821,4013,4285,4649,
%T A146340 5501,5585,5693,5813,6197,6409,7825,7853,8093,8125,8573,8917,9281,
%U A146340 9665,9677,9925,10265,10597,10973,11273,12085,12805,13061,13109,13613,13957,14677
%N A146340 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 17.
%C A146340 For primes in this sequence see A146362.
%H A146340 Amiram Eldar, <a href="/A146340/b146340.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..150 from Harvey P. Dale)
%e A146340 a(1) = 521 because continued fraction of (1+sqrt(521))/2 = 11, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21, 1, 10, 2, 5, ... has period (1, 10, 2, 5, 4, 2, 1, 1, 1, 1, 2, 4, 5, 2, 10, 1, 21) length 17.
%p A146340 A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146340 := proc(n) RETURN(A146326(n) = 17) ; end: for n from 2 do if isA146340(n) then printf("%d,\n",n) ; fi; od: # _R. J. Mathar_, Sep 06 2009
%t A146340 cf17Q[n_]:=Module[{s=(1+Sqrt[n])/2},If[IntegerQ[s], 1,Length[ ContinuedFraction[ s][[2]]]]==17]; Select[Range[5000],cf17Q] (* _Harvey P. Dale_, Dec 20 2017 *)
%Y A146340 Cf. A000290, A078370, A146326-A146345, A146348-A146360.
%K A146340 nonn
%O A146340 1,1
%A A146340 _Artur Jasinski_, Oct 30 2008
%E A146340 998 and 1006 removed, sequence extended by _R. J. Mathar_, Sep 06 2009
%E A146340 More terms from _Harvey P. Dale_, Dec 20 2017