The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A356568 a(n) = (4^n - 1)*n^(2*n). 1

%I #53 Jan 05 2023 18:45:02

%S 0,3,240,45927,16711680,9990234375,8913923665920,11111328602485167,

%T 18446462598732840960,39346257980661240576303,

%U 104857500000000000000000000,341427795961470170556885610263,1333735697353436921058237339402240,6156119488473827117528057630000587767

%N a(n) = (4^n - 1)*n^(2*n).

%C If S = {1,2,3,...,2n}, a(n) is the number of functions from S to S such that at least one even number is mapped to an odd number or at least one odd number is mapped to an even number.

%C Note the result can be obtained as (2*n)^(2*n) - n^(2*n), which is the number of functions from S to S minus the number of functions from S to S that map each even number to an even number and each odd number to an odd number. Hence in particular a(0) = 1-1 = 0.

%H Sidney Cadot, <a href="/A356568/b356568.txt">Table of n, a(n) for n = 0..30</a>

%F a(n) = A085534(n) - A062206(n).

%e For n=1, the functions are f1: (1,1),(2,1); f2: (1,2),(2,2); f3: (1,2),(2,1).

%t a[n_] := If[n == 0, 0, (4^n - 1)*n^(2*n)] (* _Sidney Cadot_, Jan 05 2023 *)

%o (PARI) a(n) = (4^n - 1)*n^(2*n) \\ _Charles R Greathouse IV_, Oct 03 2022

%o (Python)

%o def A356568(n): return ((1<<(m:=n<<1))-1)*n**m # _Chai Wah Wu_, Nov 18 2022

%Y Cf. A062206, A085534.

%K nonn,easy

%O 0,2

%A _Enrique Navarrete_, Sep 30 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 21:13 EDT 2024. Contains 372920 sequences. (Running on oeis4.)