OFFSET
1,2
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.
EXAMPLE
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}
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]
CROSSREFS
KEYWORD
nonn
AUTHOR
Giorgos Kalogeropoulos, Feb 16 2022
STATUS
approved