A002715 An infinite coprime sequence defined by recursion.
3, 7, 23, 47, 1103, 2207, 2435423, 4870847, 11862575248703, 23725150497407, 281441383062305809756861823, 562882766124611619513723647, 158418504200047111075388369241884118003210485743490303
Offset: 0
Keywords
References
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..21
- A. W. F. Edwards, Infinite coprime sequences, Math. Gaz., 48 (1964), 416-422.
- A. W. F. Edwards, Infinite coprime sequences, Math. Gaz., 48 (1964), 416-422. [Annotated scanned copy]
- R. Mestrovic, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv preprint arXiv:1202.3670 [math.HO], 2012-2018.
Programs
-
Mathematica
a[n_?OddQ] := a[n] = 2*a[n-1] + 1; a[n_?EvenQ] := a[n] = (a[n-1]^2 - 3)/2; a[0] = 3; Table[a[n], {n, 0, 12}] (* Jean-François Alcover, Jan 25 2013 *)
-
PARI
a(n)=if(n<1,3*(n==0),if(n%2,2*a(n-1)+1,(a(n-1)^2-3)/2))
Formula
a(2n+1) = 2*a(2n)+1, a(2n) = (a(2n-1)^2-3)/2, with a(0)=3.
Extensions
More terms from Jeffrey Shallit
Edited by Michael Somos, Feb 01 2004
Comments