%I #26 Mar 28 2020 05:04:34
%S 1,4,9,64,961,921600,10070323201,8364641212206750916,
%T 1474140440485343846897708136232408225,
%U 18289713383512490535096723656013877275576612770471865834506112296448576
%N a(1) = 1; a(n) is the smallest square of the form k*a(n-1) + 1, k > 0, i.e., a(n) == 1 (mod a(n-1)), n > 2.
%C If k is allowed to be 0, the sequence would be 1,1,1... - _Chai Wah Wu_, Mar 27 2020
%H Robert Israel, <a href="/A062926/b062926.txt">Table of n, a(n) for n = 1..12</a>
%e a(5) = 961 = 15*64 + 1 where a(4) = 64.
%t a[1] = 1; a[2] = 4; a[n_] := a[n] = (r = Reduce[k > Sqrt[a[n - 1]] && Mod[k^2, a[n - 1]] == 1, k, Integers] /. C[_] -> c; sel = Select[Table[r, {c, -1, 1}], #1 =!= False & ]; Min[k^2 /. ToRules /@ sel]); Table[a[n], {n, 1, 9}] (* _Jean-François Alcover_, Jan 12 2012 *)
%K nonn,nice
%O 1,2
%A _Amarnath Murthy_, Jul 03 2001
%E More terms from Larry Reeves (larryr(AT)acm.org), Jul 10 2001
%E a(7) from _Vladeta Jovovic_, Jan 17 2004
%E a(9) from _Jean-François Alcover_, Jan 12 2012
%E a(10) from _Robert Israel_, Sep 18 2016
|