OFFSET
1,2
FORMULA
For n not in A068092 (implying that all n numbers in the concatenation have the same length L), a(n) = ((n^2+1)*n)/2 * (10^(L*n)-1)/(10^L-1), where L = ceiling(log(n^2/2)/log(10)). - Max Alekseyev, Feb 11 2005
EXAMPLE
a(2) = 23 + 32, a(4) = 78910 + 89107 + 91078 + 10789 = 269884 = sum of concatenation of numbers in each group: (7,8,9,10), (8,9,10,7), (9,10,7,8), (10,7,8,9).
PROG
(PARI) { len10(n) = ceil(log(n+1)/log(10)) } { A077688(n) = local(m, w, s); m=0; for(k=1+(n*(n-1))/2, (n*(n+1))/2, m=m*10^len10(k)+k ); w=10^len10(m); s=0; for(k=1+(n*(n-1))/2, (n*(n+1))/2, m=(m*10^len10(k)+k)%w; s+=m ); return(s); } \ for n not in A068092 { a(n) = local(l); l=len10(n^2/2); return((n^2+1)*n*(10^(l*n)-1)/(10^l-1)/2) } \\ Max Alekseyev, Feb 11 2005
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Nov 16 2002
EXTENSIONS
More terms from Max Alekseyev, Feb 11 2005
STATUS
approved