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.

A096492 Number of distinct terms in continued fraction period of square root of n.

This page as a plain text file.
%I A096492 #10 Nov 10 2021 07:06:59
%S A096492 1,1,2,1,1,2,2,2,1,1,2,2,2,3,2,1,1,2,4,2,3,4,3,2,1,1,2,3,3,2,4,2,3,3,
%T A096492 2,1,1,2,2,2,2,2,4,3,3,5,3,2,1,1,2,4,3,4,2,2,3,2,4,3,5,3,2,1,1,2,5,2,
%U A096492 4,3,4,2,3,2,2,5,4,3,3,2,1,1,2,2,3,4,2,3,3,2,3,4,4,6,3,3,3,3,2,1,1,2,5,2,2
%N A096492 Number of distinct terms in continued fraction period of square root of n.
%C A096492 Essentially the same as A028832. - _Amiram Eldar_, Nov 10 2021
%F A096492 a(n) = 1 if n is a square and a(n) = A028832(n) otherwise. - _Amiram Eldar_, Nov 10 2021
%e A096492 n=127: the period={3,1,2,2,7,11,7,2,2,1,3,22},distinct-terms={1,2,3,7,11,22}, so a[127]=6;
%t A096492 {tc=Table[0, {m}], u=1}; Do[s=Length[Union[Last[ContinuedFraction[n^(1/2)]]]]; tc[[u]]=s;u=u+1, {n, 1, m}], tc
%Y A096492 Cf. A003285, A013646, A028832, A096491, A096493.
%K A096492 nonn
%O A096492 1,3
%A A096492 _Labos Elemer_, Jun 29 2004