A124797 Sum of cyclic permutations of 123...n seen as number written in base n+1: ((n+1)^n-1)*(n+1)/2.
1, 12, 126, 1560, 23325, 411768, 8388604, 193710240, 4999999995, 142655835300, 4458050224122, 151437553296120, 5556003412779001, 218946945190429680, 9223372036854775800, 413620130943168382080, 19673204037648268787703
Offset: 1
Examples
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],...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..200
Programs
-
Magma
[((n + 1)^n - 1)*(n + 1) div 2: n in [1..20]]; // Vincenzo Librandi, Jan 09 2013
-
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 *)
Formula
a(n) = (n+1)/2*((n+1)^n-1).
Comments