%I #41 Sep 08 2022 08:46:03
%S 7,1,19,13,111,121,763,1093,5575,9697,42099,84173,324591,717081,
%T 2538331,6023173,20049671,50079553,159514963,413387789,1275778031,
%U 3394968121,10242581819,27780675397,82461727687,226743641121,665232392883,1847286687181,5374409263215
%N a(n) = (u+1)^n + (-s-1)^n + (t+1)^n + (-1)^n + (-t+1)^n + (s-1)^n + (-u+1)^n where s = sqrt(2), t = sqrt(2-s), u = sqrt(2+s).
%H G. C. Greubel, <a href="/A215503/b215503.txt">Table of n, a(n) for n = 0..1000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Nested_radical">Nested radical</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,9,-5,-17,1,5,-1).
%F a(n) = (sqrt(2 + sqrt(2)) + 1)^n + (-sqrt(2) - 1)^n + (sqrt(2 - sqrt(2)) + 1)^n + (-1)^n + (-sqrt(2 - sqrt(2)) + 1)^n + (sqrt(2) - 1)^n + (-sqrt(2 + sqrt(2)) + 1)^n. (Initial name of sequence).
%F a(n) = a(n-1) + 9*a(n-2) - 5*a(n-3) - 17*a(n-4) + a(n-5) + 5*a(n-6) - a(n-7).
%F G.f.: (7-6*x-45*x^2+20*x^3+51*x^4-2*x^5-5*x^6)/((1+x)*(1+2*x-x^2)*(1 -4*x +2*x^2+4*x^3-x^4)). - _Colin Barker_, Aug 20 2012
%p A215503 := n -> (sqrt(2+sqrt(2))+1)^n+(-sqrt(2)-1)^n+(sqrt(2-sqrt(2))+1)^n+(-1)^n+(-sqrt(2-sqrt(2))+1)^n+(sqrt(2)-1)^n+(-sqrt(2+sqrt(2))+1)^n;
%p seq(simplify(A215503(i)),i=0..28);
%t LinearRecurrence[{1,9,-5,-17,1,5,-1}, {7,1,19,13,111,121,763}, 50] (* _G. C. Greubel_, Apr 23 2018 *)
%o (Sage)
%o def A215503(n) :
%o return (sqrt(2+sqrt(2))+1)^n+(-sqrt(2)-1)^n+(sqrt(2-sqrt(2))+1)^n+(-1)^n+(-sqrt(2-sqrt(2))+1)^n+(sqrt(2)-1)^n+(-sqrt(2+sqrt(2))+1)^n
%o [A215503(i).round() for i in (0..28)]
%o (PARI) x='x+O('x^30); Vec((7-6*x-45*x^2+20*x^3+51*x^4 -2*x^5-5*x^6)/( (1+x)*(1+2*x-x^2)*(1 -4*x +2*x^2 +4*x^3-x^4))) \\ _G. C. Greubel_, Apr 23 2018
%o (PARI) polsym(polrecip(((1+x)*(1+2*x-x^2)*(1-4*x+2*x^2+4*x^3-x^4))),33) \\ _Joerg Arndt_, Apr 29 2018
%o (Magma) I:=[7,1,19,13,111,121,763]; [n le 7 select I[n] else Self(n-1) + 9*Self(n-2) -5*Self(n-3) -17*Self(n-4) + Self(n-5) + 5*Self(n-6) - Self(n-7): n in [1..30]]; // _G. C. Greubel_, Apr 23 2018
%Y Cf. A051927, A215500, A215502.
%K nonn,easy
%O 0,1
%A _Peter Luschny_, Aug 13 2012
%E New name from _Altug Alkan_, Apr 27 2018
|