OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..230
EXAMPLE
a(4) = 252 since we need to sum the base 4 numbers 123, 132, 213, 231, 312 and 321, i.e. the decimal sum 27+30+39+45+54+57 = 252.
MATHEMATICA
Table[If[n==1, 0, n!*(n^(n-1) -1)/(2*(n-1))], {n, 30}] (* G. C. Greubel, Aug 16 2022 *)
PROG
(Magma) [n eq 1 select 0 else Factorial(n)*(n^(n-1)-1)/(2*(n-1)): n in [1..30]]; // G. C. Greubel, Aug 16 2022
(SageMath) [0]+[factorial(n)*(n^(n-1)-1)/(2*(n-1)) for n in (2..30)] # G. C. Greubel, Aug 16 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Nov 28 2001
EXTENSIONS
More terms from Benoit Cloitre, Jan 31 2002
More terms from G. C. Greubel, Aug 16 2022
STATUS
approved