%I #39 Sep 08 2022 08:46:08
%S 1,2,3,4,9,55,1321,570673,40677571441,30641887385179424641,
%T 711307017047678652146384291462042881,
%U 886599784992546696966754646294076268713472764725575212247451289601
%N a(n) = 1 + a(n-1) * (a(n-2) - 1) * (a(n-3) - 1) with a(0) = 1, a(1) = 2, a(2) = 3, a(3) = 4.
%C Each term is relatively prime to all others except for the pairs (2,4) and (3,9).
%H G. C. Greubel, <a href="/A245366/b245366.txt">Table of n, a(n) for n = 0..15</a>
%F a(n) = A245384(n) + 1 for n>0.
%t a[ n_] := If[ n < 4, Max[1, n+1], a[n] = 1 + a[n-1] (a[n-2] - 1) (a[n-3] - 1)];
%o (PARI) {a(n) = if( n<4, max(1, n+1), 1 + a(n-1) * (a(n-2) - 1) * (a(n-3) - 1))};
%o (Magma) I:=[2,3,4]; [n le 3 select I[n] else 1 + Self(n-1)*(Self(n-2) - 1)*(Self(n-3) - 1): n in [1..30]]; // _G. C. Greubel_, Aug 05 2018
%Y Cf. A245384.
%K nonn
%O 0,2
%A _Michael Somos_, Aug 21 2014
%E Added a(0)=1 & changed offset - _N. J. A. Sloane_, Jun 16 2021
|