login
A124797
Sum of cyclic permutations of 123...n seen as number written in base n+1: ((n+1)^n-1)*(n+1)/2.
3
1, 12, 126, 1560, 23325, 411768, 8388604, 193710240, 4999999995, 142655835300, 4458050224122, 151437553296120, 5556003412779001, 218946945190429680, 9223372036854775800, 413620130943168382080, 19673204037648268787703
OFFSET
1,2
COMMENTS
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.
LINKS
FORMULA
a(n) = (n+1)/2*((n+1)^n-1).
EXAMPLE
a(2) = 12[3] + 21[3] = 110[3] = 12[10] where [b] indicates the basis b in which the number is written;
a(3) = 123[4] + 231[4] + 312[4] = 126[10];
a(4) = 1234[5] + 2341[5] + 3412[5] + 4123[5] = 22220[5] = 1560[10],...
MAPLE
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)
MATHEMATICA
Table[((n+1)^n-1)*(n+1)/2, {n, 22}] (* Vladimir Joseph Stephan Orlovsky, Dec 28 2010 *)
PROG
(Magma) [((n + 1)^n - 1)*(n + 1) div 2: n in [1..20]]; // Vincenzo Librandi, Jan 09 2013
CROSSREFS
Sequence in context: A264896 A062199 A199528 * A204768 A045508 A215774
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Nov 07 2006
STATUS
approved