%I #15 Sep 08 2022 08:45:28
%S 1,12,126,1560,23325,411768,8388604,193710240,4999999995,142655835300,
%T 4458050224122,151437553296120,5556003412779001,218946945190429680,
%U 9223372036854775800,413620130943168382080,19673204037648268787703
%N Sum of cyclic permutations of 123...n seen as number written in base n+1: ((n+1)^n-1)*(n+1)/2.
%C Sequence A083956 becomes "unnatural" for n>9. The present sequence is more universal since 10 is not singled out as a particular value. See A124798 for the sequence of digits of a(n) in base n+1 and for more results.
%H Vincenzo Librandi, <a href="/A124797/b124797.txt">Table of n, a(n) for n = 1..200</a>
%F a(n) = (n+1)/2*((n+1)^n-1).
%e a(2) = 12[3] + 21[3] = 110[3] = 12[10] where [b] indicates the basis b in which the number is written;
%e a(3) = 123[4] + 231[4] + 312[4] = 126[10];
%e a(4) = 1234[5] + 2341[5] + 3412[5] + 4123[5] = 22220[5] = 1560[10],...
%p a:=proc(n) local b,m,i,s; b:=n+1: m:=add(i*b^(n-i),i=1..n): s:=m: for i to n-1 do m:=b^(n-1)*modp(m,b)+iquo(m,b): s:=s+m: od: s end; # or simply # a := n -> (n+1)/2*((n+1)^n-1)
%t Table[((n+1)^n-1)*(n+1)/2, {n,22}] (* _Vladimir Joseph Stephan Orlovsky_, Dec 28 2010 *)
%o (Magma) [((n + 1)^n - 1)*(n + 1) div 2: n in [1..20]]; // _Vincenzo Librandi_, Jan 09 2013
%Y Cf. A083956, A124798.
%K easy,nonn
%O 1,2
%A _M. F. Hasler_, Nov 07 2006