%I #46 May 17 2023 08:42:14
%S 1,5,49,4801,46099201,4250272665676801,
%T 36129635465198759610694779187201,
%U 2610701117696295981568349760414651575095962187244375364404428801
%N a(n) = 2*a(n-1)^2 - 1, a(0)=1, a(1)=5.
%C Product_{k>=1} (1 + 1/a(k)) = sqrt(3/2) (see A010527).
%C A subsequence of A001079 (cf. formula), which must contain any prime occurring in A001079. The initial term a(0)=1 seems rather unnatural; using the recurrence relation it would yield the constant sequence 1,1,1,... Note that this sequence corresponds to sequence b(n) in Shallit's paper, which starts only at offset n=1. - _M. F. Hasler_, Sep 27 2009
%C Since if x is even (x^2-2)/2 = 2*y^2-1 and 10 is even from a(1) onward this is a reduced version of the LL sequence starting with 10 (A135927) as it is reduced by dividing by 2 it is also the difference between two possible LL sequences. - _Roderick MacPhee_, May 31 2015
%C For n >= 3, a(n) == 201 (mod 1000) if n is even, a(n) == 801 (mod 1000) if n is odd. - _Robert Israel_, Jun 01 2015
%C The next term -- a(8) -- has 128 digits. - _Harvey P. Dale_, Mar 28 2020
%H G. C. Greubel, <a href="/A084765/b084765.txt">Table of n, a(n) for n = 0..10</a>
%H Jeffrey Shallit, <a href="http://www.fq.math.ca/Scanned/31-1/shallit.pdf">Rational numbers with non-terminating, non-periodic modified Engel-type expansions</a>, Fib. Quart., 31 (1993), 37-40.
%H H. S. Wilf, <a href="http://www.jstor.org/stable/2307914">Limit of a sequence, Elementary Problem E 1093</a>, Amer. Math. Monthly 61 (1954), 424-425.
%F a(n+1) = (x^(2^n) + y^(2^n))/2, with x = 5 + 2*sqrt(6), y = 5 - 2*sqrt(6).
%F a(n) = A001079(2^(n-1)) with a(0) = 1. - _M. F. Hasler_, Sep 27 2009
%F 4*sqrt(6)/11 = Product_{n >= 1} (1 - 1/(2*a(n))). See A002812 for some general properties of the recurrence a(n+1) = 2*a(n)^2 - 1. - _Peter Bala_, Nov 11 2012
%F a(n) = cos(2^(n-1)*arccos(5)) for n >= 1. - _Peter Luschny_, Oct 12 2022
%p 1,seq(expand((5+2*sqrt(6))^(2^n)+(5-2*sqrt(6))^(2^n))/2, n=0..10); # _Robert Israel_, Jun 01 2015
%t a[n_]:= a[n]= If[n<2, 5^n, 2 a[n-1]^2 -1]; Table[a[n], {n,0,10}]
%t Join[{1}, NestList[2 #^2 - 1 &, 5, 10]] (* _Harvey P. Dale_, Mar 28 2020 *)
%o (Magma) [n le 2 select 5^(n-1) else 2*Self(n-1)^2-1: n in [1..10]]; // _Vincenzo Librandi_, Jun 02 2015
%o (PARI) first(m)={my(v=[1,5]);for(i=3,m,v=concat(v, 2*v[i-1]^2 - 1));v;} \\ _Anders Hellström_, Aug 22 2015
%o (SageMath)
%o def A084765(n): return 1 if n==0 else chebyshev_T(2^(n-1), 5)
%o [A084765(n) for n in range(11)] # _G. C. Greubel_, May 17 2023
%Y Cf. A001079, A002812, A010527, A084764, A135927.
%K easy,nonn
%O 0,2
%A Mario Catalani (mario.catalani(AT)unito.it), Jun 04 2003