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.

A206585 The least number s > 1 having exactly n fives in the periodic part of the continued fraction of sqrt(s).

Original entry on oeis.org

2, 27, 67, 664, 331, 6487, 1237, 6019, 1999, 6331, 3964, 23983, 4204, 22075, 9739, 64639, 10684, 26419, 17971, 80719, 22969, 140971, 28414, 310759, 34189, 290779, 39181, 228691, 46099, 261691, 56884, 416707, 61429, 136579, 76651, 535375, 75916, 296839, 87151
Offset: 0

Views

Author

T. D. Noe, Mar 19 2012

Keywords

Crossrefs

Cf. A206578 (n ones), A206582 (n twos), A206583 (n threes), A206584 (n fours).

Programs

  • Mathematica
    nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 5]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{2}, t]
  • Python
    from sympy import continued_fraction_periodic
    def A206585(n):
        i = 2
        while True:
            s = continued_fraction_periodic(0,1,i)[-1]
            if isinstance(s, list) and s.count(5) == n:
                return i
            i += 1 # Chai Wah Wu, Jun 10 2017

Extensions

Definition clarified by Chai Wah Wu, Jun 10 2017

A206582 The least nonsquare number s having exactly n twos in the periodic part of the continued fraction of sqrt(s).

Original entry on oeis.org

5, 2, 19, 45, 71, 153, 199, 589, 301, 989, 526, 1711, 739, 1633, 631, 3886, 1324, 4897, 2524, 7021, 2374, 4189, 2311, 10033, 3571, 3901, 2326, 8869, 4789, 10873, 6301, 10921, 6451, 11929, 6841, 12709, 7996, 13561, 7351, 19177, 9949, 16969, 12286, 22969, 11341
Offset: 0

Views

Author

T. D. Noe, Mar 19 2012

Keywords

Crossrefs

Cf. A206578 (n ones), A206583 (n threes), A206584 (n fours), A206585 (n fives).

Programs

  • Maple
    V:= Array(0..50):  count:= 0:
    with(NumberTheory):
    for i from 2 while count < 51 do
      if issqr(i) then next fi;
      cf:= Term(ContinuedFraction(sqrt(i)),periodic);
      v:= numboccur(cf[2],2);
      if v <= 50 and V[v] = 0 then
        V[v]:= i; count:= count+1;
      fi;
    od:
    convert(V,list); # Robert Israel, May 13 2024
  • Mathematica
    nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 2]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{5}, t]

Extensions

Corrected by Robert Israel, May 13 2024

A206583 The least number s having exactly n threes in the continued fraction of sqrt(s).

Original entry on oeis.org

2, 11, 28, 335, 69, 1507, 268, 1963, 589, 7675, 1318, 2899, 1549, 11575, 1789, 17371, 3331, 22459, 3319, 23791, 6211, 18019, 6379, 63379, 6694, 17131, 9199, 75331, 10189, 49471, 10429, 75091, 16069, 105991, 17509, 114559, 14221, 152707, 25141, 159031, 20959
Offset: 0

Views

Author

T. D. Noe, Mar 19 2012

Keywords

Crossrefs

Cf. A206578 (n ones), A206582 (n twos), A206584 (n fours), A206585 (n fives).

Programs

  • Mathematica
    nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 3]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{2}, t]

A206584 The least number s having exactly n fours in the continued fraction of sqrt(s).

Original entry on oeis.org

2, 5, 52, 329, 379, 639, 631, 3937, 1471, 2461, 2524, 6931, 3259, 11809, 5659, 16756, 8779, 14749, 10399, 24721, 14452, 25429, 16669, 31021, 16879, 45301, 21061, 45109, 31054, 72721, 28414, 81061, 40189, 86041, 34654, 109909, 44371, 74881, 42046, 79501, 53551
Offset: 0

Views

Author

T. D. Noe, Mar 19 2012

Keywords

Crossrefs

Cf. A206578 (n ones), A206582 (n twos), A206583 (n threes), A206585 (n fives).

Programs

  • Mathematica
    nn = 50; zeros = nn; t = Table[0, {nn}]; k = 2; While[zeros > 0, If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 4]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; zeros--]]; k++]; Join[{2}, t]
    With[{tbl=Table[{n,Count[If[IntegerQ[Sqrt[n]],{1},ContinuedFraction[Sqrt[n]][[2]]],4]},{n,2,110000}]},Table[SelectFirst[tbl,#[[2]]==k&],{k,0,40}]][[All,1]] (* Harvey P. Dale, Oct 05 2022 *)

A206579 Numbers k such that the periodic part of the continued fraction of sqrt(k) has more ones than any smaller k.

Original entry on oeis.org

2, 3, 7, 13, 43, 94, 133, 211, 244, 478, 604, 886, 1279, 1516, 1726, 3004, 3271, 3436, 4111, 4846, 4999, 6484, 6694, 7606, 9739, 10399, 10774, 12919, 13126, 15031, 16699, 17599, 17614, 18379, 19231, 25516, 25939, 32839, 32971, 39526, 40639, 42046, 42571
Offset: 1

Views

Author

T. D. Noe, Feb 29 2012

Keywords

Comments

The number 1 is the most common number in continued fractions of sqrt(k) for k = 1, 2, 3, ....
Most of the terms in this sequence are the product of a prime and a power of 2. There are only three exceptions less than 10^6: 133, 253621, and 375181.

Examples

			The periodic part of the continued fraction of sqrt(7) is (1, 1, 1, 4), which has more ones than any smaller square root.
		

Crossrefs

Cf. A206578 (least number having exactly n ones in its continued fraction).
Cf. A206580 (number of ones for a(n)).

Programs

  • Mathematica
    t = {{2, 0}}; Do[If[! IntegerQ[Sqrt[k]], cnt = Count[ContinuedFraction[Sqrt[k]][[2]], 1]; If[cnt > t[[-1, 2]], AppendTo[t, {k, cnt}]]], {k, 3, 50000}]; Transpose[t][[1]]
Showing 1-5 of 5 results.