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.
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
Keywords
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}
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]
Comments