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-10 of 19 results. Next

A031404 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 1.

Original entry on oeis.org

3, 7, 8, 15, 24, 32, 35, 48, 63, 75, 80, 88, 91, 99, 115, 120, 135, 136, 143, 168, 175, 176, 195, 208, 215, 224, 247, 255, 279, 280, 288, 304, 312, 319, 323, 360, 399, 403, 427, 432, 440, 464, 483, 528, 539, 551, 555, 560, 575, 595, 611, 624, 671, 675, 696
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 1, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)

Extensions

Names of A031404-A031423 clarified by N. J. A. Sloane, Aug 18 2021

A031405 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 2.

Original entry on oeis.org

6, 12, 14, 20, 21, 28, 30, 33, 42, 44, 45, 52, 55, 56, 60, 70, 72, 77, 90, 95, 110, 112, 117, 126, 132, 133, 138, 153, 154, 156, 161, 165, 180, 182, 184, 189, 190, 207, 209, 210, 221, 234, 240, 248, 253, 261, 272, 275, 276, 285, 286, 297, 299, 306, 310, 315
Offset: 1

Views

Author

Keywords

Examples

			The c.f. for sqrt(6) is [2; 2, 4, ...] with period 2 and 1st term of the periodic part 2.
The c.f. for sqrt(14) is [3; 1, 2, 1, 6, ...] with period 4 and 2nd term of the periodic part 2.
The c.f. for sqrt(21) is [4; 1, 1, 2, 1, 1, 8, ...] with period 6 and 3rd term of the periodic part 2.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local P,l;
      if issqr(n) then return false fi;
      P:= numtheory:-cfrac(sqrt(n),'periodic','quotients')[2];
      l:= nops(P);
      if l::odd then false
      else P[l/2] = 2
      fi
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Apr 14 2016
  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 2, AppendTo[t, n]]]]; t

A031422 Numbers k such that the continued fraction for sqrt(k) has odd period and if the last term of the periodic part is deleted then there are a pair of central terms both equal to 9.

Original entry on oeis.org

601, 1073, 1930, 2017, 2621, 2825, 3037, 3533, 3769, 4013, 4714, 5701, 6218, 6373, 6689, 7013, 7757, 8461, 8825, 9197, 9277, 12629, 13394, 13621, 14081, 14549, 15613, 15754, 18265, 18797, 20005, 20282, 20441, 21410, 22277, 22993, 23762, 24065, 24370, 25114
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A003814.

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[OddQ[len] && c[[2, (len + 1)/2]] == 9, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)

Extensions

a(1) removed by T. D. Noe, Apr 04 2014

A031406 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 3.

Original entry on oeis.org

11, 19, 23, 40, 87, 96, 152, 159, 216, 219, 235, 335, 336, 344, 392, 415, 455, 515, 535, 567, 592, 615, 688, 707, 747, 816, 848, 875, 888, 920, 927, 944, 976, 1072, 1080, 1099, 1111, 1143, 1183, 1199, 1200, 1211, 1243, 1320, 1328, 1359, 1360, 1456, 1507, 1547
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 3, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
    cf3Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1}, ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 3]; Select[Range[1600],cf3Q] (* Harvey P. Dale, Aug 15 2015 *)

A031407 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 4.

Original entry on oeis.org

18, 22, 34, 39, 57, 68, 69, 76, 78, 92, 105, 108, 116, 124, 140, 150, 155, 174, 186, 203, 205, 217, 220, 259, 264, 266, 282, 294, 301, 308, 318, 329, 333, 369, 371, 376, 378, 406, 410, 413, 423, 434, 450, 456, 477, 490, 495, 504, 517, 522, 549, 550, 558
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 4, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)

A031408 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 5.

Original entry on oeis.org

27, 31, 43, 47, 104, 128, 160, 192, 231, 303, 375, 408, 435, 472, 536, 635, 664, 715, 776, 815, 835, 912, 1115, 1135, 1215, 1239, 1267, 1464, 1488, 1575, 1603, 1616, 1631, 1712, 1744, 1752, 1840, 1883, 1967, 1968, 2000, 2043, 2051, 2096, 2135, 2224, 2259
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 5, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
    ep5Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1}, ContinuedFraction[ s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]] == 5]; Select[ Range[ 2500], ep5Q] (* Harvey P. Dale, Apr 24 2016 *)

A031409 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 6.

Original entry on oeis.org

38, 46, 54, 62, 84, 93, 111, 129, 141, 148, 164, 172, 188, 204, 212, 230, 236, 244, 245, 252, 270, 295, 305, 330, 345, 355, 395, 426, 448, 469, 474, 497, 518, 553, 570, 581, 584, 602, 609, 616, 632, 644, 648, 658, 712, 721, 738, 742, 749, 763, 765, 777, 801
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 6, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
    cf6Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1},ContinuedFraction[s][[2]]];len=Length[cf];EvenQ[len]&&cf[[len/2]]==6]; Select[Range[1000],cf6Q] (* Harvey P. Dale, Feb 04 2023 *)

A031410 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 7.

Original entry on oeis.org

51, 59, 67, 71, 79, 200, 232, 296, 320, 447, 519, 591, 723, 792, 856, 984, 1048, 1112, 1235, 1288, 1315, 1335, 1415, 1435, 1535, 1715, 1735, 1776, 1835, 1915, 2015, 2064, 2415, 2443, 2527, 2616, 2779, 2904, 3152, 3227, 3376, 3504, 3535, 3563, 3619, 3632
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 7, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
    cf7Q[n_]:=Module[{s=Sqrt[n],cf,len},cf=If[IntegerQ[s],{1},ContinuedFraction[ s][[2]]];len = Length[cf];EvenQ[len]&&cf[[len/2]] == 7]; Select[Range[3700],cf7Q] (* Harvey P. Dale, Aug 23 2021 *)

A031411 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 8.

Original entry on oeis.org

66, 86, 94, 98, 147, 177, 183, 201, 213, 222, 260, 268, 284, 292, 300, 316, 332, 340, 348, 356, 364, 388, 396, 405, 430, 470, 505, 545, 582, 605, 606, 618, 620, 750, 762, 791, 826, 847, 889, 894, 917, 938, 973, 994, 1032, 1043, 1057, 1106, 1113, 1141, 1162
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 8, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)

A031412 Numbers k such that the continued fraction for sqrt(k) has even period 2*m and the m-th term of the periodic part is 9.

Original entry on oeis.org

83, 103, 107, 119, 328, 352, 384, 416, 424, 480, 735, 795, 807, 879, 951, 1011, 1083, 1304, 1432, 1496, 1544, 1688, 1816, 1928, 2035, 2215, 2315, 2335, 2435, 2515, 2535, 2615, 2735, 2815, 2928, 2935, 3015, 3216, 3768, 3792, 3983, 4056, 4344, 4375, 4627
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    n = 1; t = {}; While[Length[t] < 50, n++; If[! IntegerQ[Sqrt[n]], c = ContinuedFraction[Sqrt[n]]; len = Length[c[[2]]]; If[EvenQ[len] && c[[2, len/2]] == 9, AppendTo[t, n]]]]; t (* T. D. Noe, Apr 04 2014 *)
Showing 1-10 of 19 results. Next