login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276981 Irregular triangle T(n,k) read by rows of residue classes of powers of 10 modulo n. 1
0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 4, 1, 3, 2, 6, 4, 5, 1, 2, 4, 0, 1, 1, 0, 1, 10, 1, 10, 4, 1, 10, 9, 12, 3, 4, 1, 10, 2, 6, 4, 12, 8, 1, 10, 1, 10, 4, 8, 0, 1, 10, 15, 14, 4, 6, 9, 5, 16, 7, 2, 3, 13, 11, 8, 12, 1, 10, 1, 10, 5, 12, 6, 3, 11, 15, 17, 18, 9, 14, 7, 13, 16, 8, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
The length of the nonperiodic part of the residue class values is given in A051628, the length of the periodic part is given in A007732.
These residue class values are useful to check the divisibility of a number by the divisor n simply by calculating the weighted sum of digits. For example, the number 86415 is divisible by 7, because the weighted sum of digits 5*1 + 1*3 + 4*2 + 6*6 + 8*4 = 84 is divisible by 7. The used weights are the residue class values for n = 7: 1, 3, 2, 6, 4, 5, ... for ones, tens, hundreds, ...
LINKS
EXAMPLE
T(n,k), 1 <= k <= A051628(n) + A007732(n), starts with
n = 1: 0
n = 2: 1, 0
n = 3: 1
n = 4: 1, 2, 0
n = 5: 1, 0
n = 6: 1, 4
n = 7: 1, 3, 2, 6, 4, 5
n = 8: 1, 2, 4, 0
n = 9: 1
n = 10: 1, 0
n = 11: 1, 10
n = 12: 1, 10, 4
etc.
MAPLE
a:=proc(n)
local R, N, P, i;
R:=[seq(10^k mod n, k=0..n)]; # residue class
N:=[]; # nonperiodic part
P:=[]; # periodic part
for i from 1 to nops(R) do
member(R[i], R, 'm');
if m<i then
if R[i]=1 then
P:=R[1..i-1];
else
N:=R[1..m-1];
P:=R[m..i-1];
fi;
break;
fi;
od;
return(op(N), op(P));
end:
seq(a(n), n=1..19);
CROSSREFS
Sequence in context: A364955 A112517 A112519 * A230305 A357293 A357119
KEYWORD
nonn,base,tabf
AUTHOR
Martin Renner, Apr 11 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 05:44 EDT 2024. Contains 372344 sequences. (Running on oeis4.)