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.

A035015 Period of continued fraction for square root of n-th squarefree integer.

Original entry on oeis.org

1, 2, 1, 2, 4, 1, 2, 5, 4, 2, 1, 6, 6, 6, 4, 1, 5, 2, 8, 4, 4, 2, 1, 2, 2, 3, 2, 10, 12, 4, 2, 5, 4, 6, 7, 6, 11, 4, 1, 2, 10, 8, 6, 8, 7, 5, 6, 4, 4, 1, 2, 5, 10, 2, 5, 8, 10, 16, 4, 11, 1, 2, 12, 2, 9, 6, 15, 2, 6, 9, 6, 10, 10, 4, 1, 2, 12, 10, 3, 6, 16, 14, 9, 4, 18, 4, 4, 2, 1, 2, 9, 20, 10, 4
Offset: 2

Views

Author

David L. Treumann (alewifepurswest(AT)yahoo.com)

Keywords

Comments

Friesen proved that each value appears infinitely often. - Michel Marcus, Apr 12 2019

Examples

			a(2)=1 because 2 is the 2nd smallest squarefree integer and sqrt 2 = [ 1,2,2,2,2,... ] thus has an eventual period of 1.
		

Crossrefs

Cf. A003285, A005117 (squarefree numbers), A013943.

Programs

  • Maple
    sqf:= select(numtheory:-issqrfree,[$2..1000]):
    map(n->nops(numtheory:-cfrac(sqrt(n),'periodic','quotients')[2]),sqf); # Robert Israel, Dec 21 2014
  • Mathematica
    Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Select[ Range[ 2,200], SquareFreeQ] (* Harvey P. Dale, Jul 17 2011 *)

Formula

a(n) = A003285(A005117(n)). - Michel Marcus, Dec 29 2014

Extensions

Corrected and extended by James Sellers