login
A226465
Numbers n = x0 x1...x9 such that sum of digits (mod 10) - xi == i+1 mod 10.
0
21, 210, 765, 9876, 2109876, 7654321, 76543210, 4321098765
OFFSET
1,1
COMMENTS
We consider the system of linear equations using (mod 10):
x1 + x2 + x3 + ... + x9 = 1
x0 + x2 + x3 + ... + x9 = 2
x0 + x1 + x3 + ... + x9 = 3
………………………….
x0 + x1 + ... + x7 + x9 = 9
x0 + x1 + x2 + ... + x8 = 0
where xi are the decimal digits of n.
For n = 2, 3,...,10 we obtain the equation Ax = b where A is the matrix with n rows and n columns, x is the vector [x0, x1,...,xp] where p = n-1, and b is the vector [1, 2,..., n] (mod 10). For n = 2, 4, 8 and 10, the solution is unique. For n = 5, 6 and 9, the system has no solution. For n = 3 and 7, the system has two solutions.
Properties of the sequence:
a(5) is the concatenation of a(2) and a(4);
a(2) is the suffix of a(7);
a(3) is the prefix of a(6) and a(7) and also the suffix of a(8);
a(8) contains the digits of a(4) and a(2).
EXAMPLE
9876 = x0 x1 x2 x3 is in the sequence because:
x1 + x2 + x3 = 8+7+6 = 21 == 1 mod 10;
x0 + x2 + x3 = 9+7+6 = 22 == 2 mod 10;
x0 + x1 + x3 = 9+8+6 = 23 == 3 mod 10;
x0 + x1 + x2 = 9+8+7 = 24 == 4 mod 10.
MAPLE
with(numtheory):for n from 1 to 1000000 do:x:=convert(n, base, 10):n1:=nops(x): s:=sum('x[i]', 'i'=1..n1):ii:=0:for k from n1 by -1 to 1 do:if irem(n1-k+1, 10)=irem(s-x[k], 10) then ii:=ii+1:else fi:od:if ii=n1 then print(n):else fi:od:
CROSSREFS
Sequence in context: A232345 A036205 A160787 * A047646 A010937 A022616
KEYWORD
nonn,base,fini,full
AUTHOR
Michel Lagneau, Jun 08 2013
STATUS
approved