login
a(1) = 1 and, for n >= 2, a(n) is the least integer such that both p(n) and q(n) are squarefree where p(n)/q(n) is the n-th convergent of the continued fraction [a(1),a(2),...,a(n)].
1

%I #20 Mar 04 2013 08:47:43

%S 1,1,1,1,4,2,4,2,3,1,4,3,4,1,1,4,2,1,3,1,4,2,1,2,1,4,4,2,1,2,4,1,1,3,

%T 1,1,3,1,1,3,1,1,3,1,1,4,2,4,2,3,4,1,2,4,1,1,3,1,1,3,1,1,4,3,1,3,1,1,

%U 4,2,1,2,1,3,1,3,2,3,1,3,1,2,4,2,3,1,3,1,2,1,6,4,1,1,3,1,1,3,1,1,3,1,1,4,2,1,4,3,5

%N a(1) = 1 and, for n >= 2, a(n) is the least integer such that both p(n) and q(n) are squarefree where p(n)/q(n) is the n-th convergent of the continued fraction [a(1),a(2),...,a(n)].

%C Conjecture 1: sequence is unbounded.

%C Conjecture 2: (a(1)a(2)...a(n))^(1/n) seems to converge to 1.(7)... a limit different from Khintchine's constant (see A002210).

%t Clear[a]; a[1] = 1; a[n_] := a[n] = Catch[ For[k = 1, True, k++, cv = Convergents[ Append[ Table[a[j], {j, 1, n - 1}], k], n] // Last; If[ SquareFreeQ[cv // Numerator] && SquareFreeQ[cv // Denominator], Throw[k]]]]; Table[a[n], {n, 1, 109}] (* _Jean-François Alcover_, Mar 04 2013 *)

%o (PARI) v=[1];for(k=1,100,m=1;while(issquarefree(contfracpnqn(concat(v,[m]))[1,1])+issquarefree(contfracpnqn(concat(v,[m]))[2,1])<2,m++);v=concat(v,[m]));a(n)=v[n];

%K nonn

%O 1,5

%A _Benoit Cloitre_, Jan 15 2013

%E More terms from _Jean-François Alcover_, Mar 04 2013