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-3 of 3 results.

A349637 a(1) = 2 and a(n) is the smallest nonsquare positive integer not occurring earlier such that the intersection of the periodic parts of continued fractions for square roots of a(n) and a(n-1) is the empty set.

Original entry on oeis.org

2, 5, 3, 10, 6, 11, 7, 12, 8, 17, 13, 18, 14, 26, 15, 20, 27, 19, 37, 21, 38, 22, 40, 24, 28, 39, 23, 30, 43, 50, 29, 51, 31, 41, 32, 42, 34, 55, 35, 56, 47, 65, 33, 66, 44, 68, 45, 82, 46, 83, 48, 72, 53, 84, 52, 87, 54, 101, 57, 89, 58, 90, 62, 102, 59, 104
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Nov 23 2021

Keywords

Comments

Conjecture: This is a permutation of the nonsquares (A000037).

Examples

			   n  a(n)  Periodic part of continued fraction for square root of a(n)
  --  ----  -----------------------------------------------------------
   1    2   {2}
   2    5   {4}
   3    3   {1, 2}
   4   10   {6}
   5    6   {2, 4}
   6   11   {3, 6}
   7    7   {1, 1, 1, 4}
   8   12   {2, 6}
   9    8   {1, 4}
  10   17   {8}
  11   13   {1, 1, 1, 1, 6}
		

Crossrefs

Programs

  • Mathematica
    pcf=Last@*ContinuedFraction@*Sqrt; a[1]=2; a[n_]:=a[n]=(k=2; While[MemberQ[Array[a,n-1],k]||IntegerQ@Sqrt@k||Intersection[pcf@a[n-1],pcf@k]!={},k++];k); Array[a,100]

A345475 Nonsquares k whose continued fraction for the square root of k has a periodic part that is a nondecreasing sequence.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 17, 18, 20, 24, 26, 27, 30, 32, 35, 37, 38, 39, 40, 41, 42, 48, 50, 51, 55, 56, 58, 63, 65, 66, 68, 72, 74, 75, 80, 82, 83, 84, 87, 90, 99, 101, 102, 104, 105, 110, 120, 122, 123, 130, 132, 135, 136, 143, 145, 146, 147
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Sep 16 2021

Keywords

Comments

All k = m^2 + 1 (A002522) belong in the sequence because the periodic part of the continued fraction of sqrt(k) has a single element.

Examples

			a(5)=7 because the periodic part of the continued fraction of sqrt(7) is (1,1,1,4) which is a nondecreasing sequence.
19 is not a term because the periodic part of the continued fraction of sqrt(19) is (2, 1, 3, 1, 2, 8) which is not a nondecreasing sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@147,!IntegerQ@Sqrt@#&&OrderedQ@Last@ContinuedFraction[Sqrt@#]&]

A351652 a(1) = 1; for n > 1, a(n) is the smallest positive integer not occurring earlier such that the intersection of the periodic parts of the continued fractions for square roots of a(n) and a(n-1) is the empty set.

Original entry on oeis.org

1, 2, 4, 3, 5, 9, 6, 10, 7, 11, 8, 12, 16, 13, 17, 14, 18, 15, 20, 25, 19, 26, 21, 27, 22, 36, 23, 30, 24, 28, 37, 29, 38, 31, 39, 32, 40, 33, 49, 34, 41, 35, 42, 50, 43, 51, 44, 64, 45, 65, 46, 66, 47, 55, 48, 56, 68, 53, 72, 57, 81, 52, 82, 54, 83, 58, 84, 59
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Feb 16 2022

Keywords

Comments

Conjecture: This is a permutation of the positive integers.
The conjecture is true: we can always extend the sequence with a square, so eventuality every square will appear; also, after a square, we can always extend the sequence with the least number not yet in the sequence. - Rémy Sigrist, Mar 12 2022
The periodic part of the continued fraction for the square root of a square is the empty set.

Examples

			   n  a(n)  Periodic part of continued fraction for square root of a(n)
  --  ----  -----------------------------------------------------------
   1    1   {}
   2    2   {2}
   3    4   {}
   4    3   {1,2}
   5    5   {4}
   6    9   {}
   7    6   {2, 4}
   8   10   {6}
   9    7   {1, 1, 1, 4}
  10   11   {3, 6}
  11    8   {1, 4}
		

Crossrefs

Programs

  • Mathematica
    pcf[m_]:=If[IntegerQ[Sqrt@m],{},Last@ContinuedFraction@Sqrt@m];
    a[1]=1;a[n_]:=a[n]=(k=2;While[MemberQ[Array[a,n-1],k]||Intersection[pcf@a[n-1],pcf@k]!={},k++];k);Array[a,100]
Showing 1-3 of 3 results.