login
a(n) = Mod[n,10+Sum[Mod[Floor[n/10^m],10],{m,1,10}]]
0

%I #4 Mar 30 2012 17:34:14

%S 1,2,3,4,5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,8,9,10,11,0,1,2,3,4,5,4,5,6,7,

%T 8,9,10,11,12,0,12,13,0,1,2,3,4,5,6,7,5,6,7,8,9,10,11,12,13,14,12,13,

%U 14,15,0,1,2,3,4,5,2,3,4,5,6,7,8,9,10,11,8,9,10,11,12,13,14,15,16,17,14,15

%N a(n) = Mod[n,10+Sum[Mod[Floor[n/10^m],10],{m,1,10}]]

%C A variable cycle function based on powers of ten.

%t digits=200 f[n_]=10+Sum[Mod[Floor[n/10^m], 10], {m, 1, 10}] a=Table[Mod[n, f[n]], {n, 1, digits}]

%K nonn

%O 1,2

%A _Roger L. Bagula_, Jan 19 2004