[go: up one dir, main page]

login
A083956
a(n) = sum of all cyclic permutation of concatenation of first n numbers. In each case the digits of a number are kept together for n>9.
12
1, 33, 666, 11110, 166665, 2333331, 31111108, 399999996, 4999999995, 509876543215, 52098641976336, 5331076296399558, 546238942849832881, 56038035699304276305, 5755318721445859729830, 591693488306202516193456
OFFSET
1,2
COMMENTS
Initial terms are {n(n+1)/2}*{A000042(n)}.
EXAMPLE
a(1) = 1, a(2) = 12 + 21, a(3) = 123 + 231 + 312 = 666.
a(11) = 1234567891011 + 2345678910111 + ... + 1011123456789 + 1112345678910.
MAPLE
# count digits in positive integer digs := proc(inp::integer) local resul, shiftinp : resul := 1 : shiftinp := iquo(inp, 10) : while shiftinp > 0 do resul := resul+1 : shiftinp := iquo(shiftinp, 10) : od : RETURN(resul) : end: # provide number of concatenation up to lst, permuted by cycl newnum := proc(lst::integer, cycl::integer) local resul, i, insrt : resul := 0 : for i from 1 to lst do insrt := ((i+cycl-1) mod lst) +1 : resul := resul*10^digs(insrt)+insrt : od : RETURN(resul) ; end : n := 2 : while n < 13 do su := 0 : for cycl from 0 to n-1 do # print(n, " add ", newnum(n, cycl)) ; su := su + newnum(n, cycl) : od : printf("%a, ", su) : n := n+1 : od : # R. J. Mathar, Mar 13 2006
A083956 := n -> add( convert( cat( 'modp(j+i, n)+1' $ j=1..n ), decimal, 10), i=1..n ); # M. F. Hasler, Nov 08 2006
CROSSREFS
Cf. A083957.
Sequence in context: A261486 A094760 A365645 * A164761 A028210 A028205
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, May 10 2003
EXTENSIONS
More terms from R. J. Mathar, Mar 13 2006
Further terms from M. F. Hasler, Nov 08 2006
STATUS
approved