login
a(n) is the number of distinct n-th powers of functions {1, 2} -> {1, 2}.
4

%I #23 Sep 04 2024 14:12:32

%S 1,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,

%T 3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,

%U 3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3

%N a(n) is the number of distinct n-th powers of functions {1, 2} -> {1, 2}.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,1).

%F For n > 2, a(n) = a(n-2).

%F G.f.: (1+4*x+2*x^2)/(1-x^2). - _Jaume Oliver Lafont_, Mar 20 2009

%F a(n) = (n mod 2)+(2 mod (n+2))+1. - _Aaron J Grech_, Sep 02 2024

%F E.g.f.: 3*cosh(x) + 4*sinh(x) - 2. - _Stefano Spezia_, Sep 04 2024

%e a(4) = 3: the four functions {1, 2} -> {1, 2} are f(x) = 1, g(x) = 2, h(x) = x and j(x) = 3 - x. f^4(x) = f(f(f(f(x)))) = 1; so f^4 = f. Similarly, g^4 = g, h^4 = h and j^4 = h, so there are 3 distinct 4th powers.

%t Join[{1},LinearRecurrence[{0, 1},{4, 3},104]] (* _Ray Chandler_, Sep 08 2015 *)

%Y Cf. A102687, A102709, A103948, A103949, A103950.

%Y Cf. A158515.

%Y Row n=2 of A247026.

%K easy,nonn

%O 0,2

%A _David Wasserman_, Feb 21 2005