login
If n mod 2 == 0 then 3^n else 2^n.
0

%I #14 Jul 06 2022 06:57:22

%S 1,2,9,8,81,32,729,128,6561,512,59049,2048,531441,8192,4782969,32768,

%T 43046721,131072,387420489,524288,3486784401,2097152,31381059609,

%U 8388608,282429536481,33554432,2541865828329,134217728,22876792454961,536870912,205891132094649

%N If n mod 2 == 0 then 3^n else 2^n.

%C The convergent series 1/2 + 1/9 + 1/8 + 1/81 + 1/32 + ... fails the ratio test.

%D B. R. Gelbaum and J. M. H. Olmsted, Counterexamples in Analysis, Holden-Day, San Francisco, 1964; see p. 60.

%F From _R. J. Mathar_, Apr 28 2008: (Start)

%F O.g.f.: -(-1+4x^2-2x+18x^3)/((3x-1)(3x+1)(2x-1)(2x+1)).

%F a(n) = 13a(n-2) - 36a(n-4). (End)

%F From _Amiram Eldar_, Jul 06 2022: (Start)

%F Sum_{n>=0} 1/a(n) = 43/24.

%F Sum_{n>=0} (-1)^n/a(n) = 11/24. (End)

%t Table[ If[ EvenQ[n], 3^n, 2^n], {n, 0, 30}] (* _Robert G. Wilson v_, Feb 18 2004 *)

%o (PARI) a(n) = if (n%2, 2^n, 3^n); \\ _Michel Marcus_, Jul 06 2022

%Y Cf. A000079, A000244.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, Feb 16 2004