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.

Showing 1-5 of 5 results.

A374232 Indices of records in A028832.

Original entry on oeis.org

1, 2, 3, 14, 19, 46, 94, 151, 211, 379, 526, 694, 919, 1324, 1759, 2011, 2326, 3691, 4174, 5086, 6451, 7606, 8254, 10294, 10651, 13126, 17599, 18979, 19231, 21319, 30319, 31606, 32971, 34654, 42379, 46006, 48799, 58774, 76651, 78094, 82471, 85999, 90931, 101599
Offset: 1

Views

Author

Amiram Eldar, Jul 01 2024

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_] := If[IntegerQ@ Sqrt[n], 0, Length @ DeleteDuplicates[ContinuedFraction[Sqrt[n]][[2]]]];
    seq[kmax_] := Module[{smax = -1, s1, sq = {}}, Do[If[(s1 = s[k]) > smax, smax = s1; AppendTo[sq, k]], {k, 1, kmax}]; sq]; seq[10^5]

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Labos Elemer, Jun 29 2004

Keywords

Comments

Essentially the same as A028832. - Amiram Eldar, Nov 10 2021

Examples

			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;
		

Crossrefs

Programs

  • Mathematica
    {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

Formula

a(n) = 1 if n is a square and a(n) = A028832(n) otherwise. - Amiram Eldar, Nov 10 2021

A096495 Number of distinct terms in the periodic part of the continued fraction for sqrt(prime(n)).

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 1, 4, 3, 3, 4, 1, 2, 4, 3, 3, 4, 5, 5, 4, 3, 3, 2, 3, 3, 1, 5, 4, 6, 3, 6, 4, 3, 6, 5, 7, 5, 6, 3, 3, 6, 6, 6, 5, 1, 7, 8, 3, 2, 3, 3, 6, 5, 5, 1, 4, 2, 7, 7, 5, 6, 3, 6, 6, 6, 5, 8, 6, 5, 4, 4, 3, 7, 3, 9, 4, 3, 7, 1, 6, 6, 8, 7, 6, 3, 2, 5, 7, 5, 9, 4, 6, 9, 8, 4, 4, 6, 6, 8, 9, 8, 2, 4, 6, 10
Offset: 1

Views

Author

Labos Elemer, Jun 29 2004

Keywords

Examples

			n = 31: prime(31) = 127, and the periodic part is {3,1,2,2,7,11,7,2,2,1,3,22}, so a(31) = 6.
		

Crossrefs

Programs

  • Mathematica
    {te=Table[0, {m}], u=1}; Do[s=Length[Union[Last[ContinuedFraction[Prime[n]^(1/2)]]]]; te[[u]]=s;u=u+1, {n, 1, m}];te
    Table[Length[Union[ContinuedFraction[Sqrt[Prime[n]]][[2]]]],{n,110}] (* Harvey P. Dale, Jun 22 2017 *)

Formula

a(n) = A028832(A000040(n)). - Amiram Eldar, Nov 10 2021

A028833 Index of redundancy in period of continued fraction for sqrt(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 2, 0, 3, 2, 1, 0, 0, 0, 0, 1, 2, 0, 4, 2, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 6, 5, 3, 7, 1, 0, 0, 0, 0, 2, 2, 2, 2, 0, 3, 5, 2, 1, 6, 1, 0, 0, 0, 0, 5, 0, 4, 3, 4, 0, 4, 3, 2, 7, 2, 1, 1, 0, 0, 0, 0, 0, 2, 6, 0, 3, 2, 0, 5, 4, 6, 10, 1, 1, 8, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[IntegerQ[Sqrt[n]], 0, Length[p = ContinuedFraction[Sqrt[n]] // Last] - Length[p // Union]]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Dec 26 2012 *)

Formula

a(n) = A003285(n) - A028832(n).

A374234 Number k such that the periods of the continued fractions of sqrt(k) and sqrt(k+1) have the same distinct terms.

Original entry on oeis.org

7, 41, 44, 55, 74, 112, 135, 137, 207, 218, 275, 279, 314, 335, 389, 474, 611, 818, 874, 884, 986, 1007, 1009, 1129, 1313, 1325, 1462, 1465, 1824, 2330, 2831, 3201, 3502, 3575, 4927, 5520, 6204, 6623, 8150, 8945, 10989, 11627, 11834, 13033, 13727, 13775, 13888
Offset: 1

Views

Author

Amiram Eldar, Jul 01 2024

Keywords

Examples

			7 is a term since the period of the continued fraction of sqrt(7) is {1, 1, 1, 4} and the period of the continued fraction of sqrt(8) is {1, 4}. The set of distinct terms of both is {1, 4}.
44 is a term since the period of the continued fraction of sqrt(44) is {1, 1, 1, 2, 1, 1, 1, 12} and the period of the continued fraction of sqrt(45) is {1, 2, 2, 2, 1, 12}. The set of distinct terms of both is {1, 2, 12}.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = If[IntegerQ@ Sqrt[n], 0, Union[ContinuedFraction[Sqrt[n]][[2]]]]; Select[Range[14000], s[#] == s[# + 1] &]
Showing 1-5 of 5 results.