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.

A028832 Number of distinct integers in period of continued fraction for sqrt(n), or 0 if n is a square.

This page as a plain text file.
%I A028832 #11 Nov 10 2021 07:06:36
%S A028832 0,1,2,0,1,2,2,2,0,1,2,2,2,3,2,0,1,2,4,2,3,4,3,2,0,1,2,3,3,2,4,2,3,3,
%T A028832 2,0,1,2,2,2,2,2,4,3,3,5,3,2,0,1,2,4,3,4,2,2,3,2,4,3,5,3,2,0,1,2,5,2,
%U A028832 4,3,4,2,3,2,2,5,4,3,3,2,0,1,2,2,3,4,2,3,3,2,3,4,4,6,3,3,3,3,2,0,1,2
%N A028832 Number of distinct integers in period of continued fraction for sqrt(n), or 0 if n is a square.
%H A028832 Amiram Eldar, <a href="/A028832/b028832.txt">Table of n, a(n) for n = 1..10000</a>
%t A028832 a[n_] := If[IntegerQ @ Sqrt[n], 0, Length @ DeleteDuplicates @ ContinuedFraction[Sqrt[n]][[2]]]; Array[a, 100] (* _Amiram Eldar_, Nov 10 2021 *)
%Y A028832 Cf. A054269.
%K A028832 nonn
%O A028832 1,3
%A A028832 _Olivier Gérard_