%I #147 Nov 28 2022 19:17:18
%S 2,6,18,54,162,486,1458,4374,13122,39366,118098,354294,1062882,
%T 3188646,9565938,28697814,86093442,258280326,774840978,2324522934,
%U 6973568802,20920706406,62762119218,188286357654,564859072962,1694577218886,5083731656658,15251194969974
%N Pisot sequences E(2,6), L(2,6), P(2,6), T(2,6).
%C Definitions of Pisot and related sequences:
%C Pisot sequence E(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2) + 1/2) = nearest integer to a(n-1)^2/a(n-2), with 0 < x < y.
%C Pisot sequence L(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2)).
%C Pisot sequence P(x, y): a(0) = x, a(1) = y, a(n) = ceiling(a(n-1)^2/a(n-2) - 1/2).
%C Pisot sequence T(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)).
%C Pisot/Shallit sequence S(x, y): a(0) = x, a(1) = y, a(n) = floor(a(n-1)^2/a(n-2)+1).
%C A025192 is the main entry for the sequence of numbers 2*3^n.
%C Number of tilings of a 4 X (4n+4) rectangle into T tetrominoes.
%C Numbers n such that 3^n = n/2 mod n. Cf. A066601 3^n mod n. - _Zak Seidov_, Aug 26 2006, Nov 20 2008
%C For n >= 1, a(n) is equal to the number of functions f:{1,2...,n}->{1,2,3} such that for a fixed x in {1,2,...,n} and a fixed y in {1,2,3} we have f(x) != y. - Aleksandar M. Janjic and _Milan Janjic_, Mar 27 2007
%C a(n) = A048473(n) + 1 = A048473(n) + A000012(n). a(n) = A052919(n+1)-1. a(n) = A115099(n) - 2. a(n) = A100774(n) + 2. See A007395. - _Paul Curtz_, Jan 20 2009
%C a(n+1) is the number of compositions of n when there are 2 types of each natural number. - _Milan Janjic_, Aug 13 2010
%C 2*Sum_{n>=2} 1/A083667(n) = 2*Sum_{n>=2} 2^(-n)*3^(-((n*(n-1))/2)) = Sum_{n>=1} 1/Product_{k=1..n} A008776(k) = Sum_{n>=1} 1/Product_{k=1..n} 2*3^k = 0.17609845431233461692099660022134... . - _Alexander R. Povolotsky_, Aug 08 2011
%C Number of monic squarefree polynomials over F_3 of degree n+1. - _Charles R Greathouse IV_, Feb 07 2012
%C a(n) is the sum of the elements of the n-th power of the matrix {{1, 2}, {2, 1}}. - _Griffin N. Macris_, Mar 25 2016
%C Let D(m) denote the set of divisors of a number m, and consider s1(m) and s2(m) the sums of those divisors that are congruent to 1 and 2 (mod 3) respectively. This sequence lists the numbers m such that s1(m) = 1 and s2(m) = 2. - _Michel Lagneau_, Feb 09 2017
%C a(n) is the multiplicative order of k modulo 3^(n+1), where k is any number congruent to 2 or 5 modulo 9. Note that for n > 0, k is a primitive root modulo 3^(n+1) if and only if k == 2, 5 (mod 9). - _Jianing Song_, Apr 20 2021
%D S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 203).
%H Franklin T. Adams-Watters, <a href="/A008776/b008776.txt">Table of n, a(n) for n = 0..200</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=170">Encyclopedia of Combinatorial Structures 170</a>
%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H Craig Knecht, <a href="/A008776/a008776.png">Sphinx tiling of a repetitive shape.</a>
%H C. Moore, <a href="http://arXiv.org/abs/math.CO/9905012">Some Polyomino Tilings of the Plane</a>, arXiv:math/9905012 [math.CO], 1999.
%H C. Pisot, <a href="http://archive.numdam.org/article/ASNSP_1938_2_7_3-4_205_0.pdf">La répartition modulo 1 et les nombres algébriques</a>, Ann. Scu. Norm. Sup. Pisa 2 ser, vol 7. no 3-4 (1938) p 205-248.
%H <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (3).
%F a(n) = 2*3^n.
%F a(n) = 3*a(n-1).
%F G.f.: 2/(1-3*x). - _Philippe Deléham_, Oct 08 2007
%F a(n-1) = phi(3^n). - _Artur Jasinski_, Nov 19 2008
%F E.g.f.: 2*exp(3*x). - _Mohammad K. Azarian_, Jan 15 2009
%F If p[i]=2, (i >= 1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1)=det A. - _Milan Janjic_, Apr 29 2010
%F G.f.: ((1/2)/G(0)-1)/x^2 where G(k) = 1 - 2^k/(2 - 4*x/(2*x - 2^k/G(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Dec 22 2012
%F G.f.: -G(0)/x where G(k) = 1 - 1/(1-2*x)/(1-x/(x-1/G(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Jan 25 2013
%F G.f.: (1 - 1/Q(0))/x where Q(k) = 1 - x*(2*k-2)/(1 - x*(2*k+5)/Q(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Mar 19 2013
%F G.f.: W(0), where W(k) = 1 + 1/(1 - x*(2*k+3)/(x*(2*k+4) + 1/W(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Aug 28 2013
%p # E(x,y) is f(n,x,y,1/2), T(x,y) is f(n,x,y,0), and S(x,y) is f(n,x,y,1).
%p f:=proc(n,x,y,r) option remember;
%p if n=0 then x
%p elif n=1 then y
%p else floor(f(n-1,x,y,r)^2/f(n-2,x,y,r) + r); fi; end;
%p [seq(f(n,2,6,1/2),n=0..30)];
%p # _N. J. A. Sloane_, Jul 30 2016
%t Table[EulerPhi[3^n], {n, 0, 100}] (* _Artur Jasinski_, Nov 19 2008 *)
%t Table[MatrixPower[{{1,2},{1,2}},n][[1]][[2]],{n,0,44}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 20 2010 *)
%t NestList[3#&,2,50] (* _Harvey P. Dale_, Nov 28 2022 *)
%o (PARI) a(n)=3^n<<1 \\ corrected by _Michel Marcus_, Aug 03 2015
%o (Haskell)
%o a008776 = (* 2) . (3 ^)
%o a008776_list = iterate (* 3) 2 -- _Reinhard Zumkeller_, Oct 19 2015
%o (Magma) [2*3^n: n in [0..30]]; // _G. C. Greubel_, Sep 11 2019
%o (Sage) [2*3^n for n in (0..30)] # _G. C. Greubel_, Sep 11 2019
%o (GAP) List([0..30], n-> 2*3^n); # _G. C. Greubel_, Sep 11 2019
%Y Apart from initial term, same as A025192.
%Y Cf. A080643.
%Y Cf. A000244.
%K easy,nonn
%O 0,1
%A _N. J. A. Sloane_, _David W. Wilson_
%E Jasinski formula corrected by _Charles R Greathouse IV_, Feb 18 2011