%I #35 Jun 20 2024 16:25:31
%S 0,0,4,24,100,360,1204,3864,12100,37320,114004,346104,1046500,3155880,
%T 9500404,28566744,85831300,257756040,773792404,2322425784,6969374500,
%U 20912317800,62745342004,188252803224,564791964100,1694443001160,5083463221204,15250658099064
%N Number of base-3 n-digit pandigital numbers.
%C From _Manfred Boergens_, Aug 02 2023: (Start)
%C a(n+1) is the number of pairs (A,B) where A and B are nonempty subsets of {1,2,...,n} and one of these subsets is a proper subset of the other.
%C If "proper" is omitted, see A091344.
%C If empty subsets are included, see A027649 (all subsets) and A056182 (proper subsets). (End)
%H Svenja Huntemann, <a href="https://www.birs.ca/workshops/2023/23w2008/files/Svenja%20Huntemann/HuntemannAMCAD2023.pdf">Values, Temperatures, and Enumeration of Placement Games</a>, Slides, Alberta-Montana Combinatorics and Algorithms Day, Banff, Canada, 23-25 June 2023. See p. 105/109.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-11,6).
%F a(n) = 2*A028243(n) = 2*3^(n-1) - 2^(n+1) + 2.
%F a(n) = 4*A000392(n).
%F G.f.: 4*x^3/((1-x)*(1-2*x)*(1-3*x)).
%F E.g.f.: 2/3*((exp(x)-1)^3).
%e a(3)=4 because, in base 3, there are four 3-digit pandigital numbers (11=102_3, 15=120_3, 19=201_3, and 21=210_3).
%e a(4)=24 because, in base 3, there are 24 4-digit pandigital numbers (1002_3, 1012_3, 1020_3, 1021_3, 1022_3, 1102_3, 1120_3, 1200_3, 1201_3, 1202_3, 1210_3, 1220_3, 2001_3, 2010_3, 2011_3, 2012_3, 2021_3, 2100_3, 2101_3, 2102_3, 2110_3, 2120_3, 2201_3, and 2210_3).
%t Table[2 3^(n - 1) - 2^(n + 1) + 2, {n, 30}] (* _Vincenzo Librandi_, Jul 20 2015 *)
%o (Magma) [2*3^(n-1) - 2^(n+1) + 2: n in [1..30]]; // _Vincenzo Librandi_, Jul 20 2015
%Y Cf. A000392, A027649, A028243, A056182, A091344, A171102.
%K nonn,base
%O 1,3
%A _Jon E. Schoenfield_, Jul 19 2015