login
An infinite coprime sequence defined by recursion.
(Formerly M2488 N0986)
2

%I M2488 N0986 #36 Oct 20 2023 09:23:04

%S 3,5,13,17,241,257,65281,65537,4294901761,4294967297,

%T 18446744069414584321,18446744073709551617,

%U 340282366920938463444927863358058659841

%N An infinite coprime sequence defined by recursion.

%C Every term is relatively prime to all others. - _Michael Somos_, Feb 01 2004

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H A. W. F. Edwards, <a href="https://www.jstor.org/stable/3611702">Infinite coprime sequences</a>, Math. Gaz., 48 (1964), 416-422.

%H A. W. F. Edwards, <a href="/A002715/a002715.pdf">Infinite coprime sequences</a>, Math. Gaz., 48 (1964), 416-422. [Annotated scanned copy]

%H R. Mestrovic, <a href="http://arxiv.org/abs/1202.3670">Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof</a>, arXiv preprint arXiv:1202.3670 [math.HO], 2012-2018.

%F a(2*n + 1) = a(2*n) + a(2*n - 1) - 1, a(2*n) = a(2*n - 1)^2 - 3 * a(2*n - 1) + 3, a(0) = 3, a(1) = 5. - _Michael Somos_, Feb 01 2004

%F Conjecture: a(2n+1)=A001146(n+1)+1. - _R. J. Mathar_, May 15 2007

%F a(2*n) = A220294(n). a(2*n + 1) = A000215(n+1). - _Michael Somos_, Dec 10 2012

%t a[0] = 3; a[1] = 5;

%t a[n_] := a[n] = If[OddQ[n], a[n-1] + a[n-2] - 1, a[n-1]^2 - 3*a[n-1] + 3];

%t Table[a[n], {n, 0, 12}] (* _Jean-François Alcover_, Aug 16 2018, after _Michel Somos_ *)

%o (PARI) {a(n) = if( n<2, 3 * (n>=0) + 2 * (n>0), if( n%2, a(n-1) + a(n-2) - 1, a(n-1)^2 - 3 * a(n-1) + 3))} /* _Michael Somos_, Feb 01 2004 */

%Y Cf. A000215, A001685, A002715, A003686, A064526, A220294.

%K nonn

%O 0,1

%A _N. J. A. Sloane_

%E More terms from _Jeffrey Shallit_

%E Edited by _Michael Somos_, Feb 01 2004