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!)
A155754 A variation on 10^n mod 19 0
1, -9, 5, -7, 6, 3, -8, -4, -2, -1, 9, -5, 7, -6, -3, 8, 4, 2, 1, -9, 5, -7, 6, 3, -8, -4, -2, -1, 9, -5, 7, -6, -3, 8, 4, 2, 1, -9, 5, -7, 6, 3, -8, -4, -2, -1, 9, -5, 7, -6, -3, 8, 4, 2, 1, -9, 5, -7, 6, 3, -8, -4, -2, -1, 9, -5, 7, -6, -3, 8, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This sequence can be employed in a test for divisibility by 19 and works like A033940 works for 7.
The use of negative coefficients ensures the termination of the test because the modulus of the intermediate sum at each step of the test decreases strictly.
The test is successful if the final sum is 0.
The negative coefficients have the form (10^n mod 19) - 19 when 10^n mod 19 > 9.
Example: 8284 is divisible by 19 since |4*1 + 8*(-9) + 2*5 + 8*(-7)| = 114 and 4*1 + 1*(-9) + 1*5 = 0.
LINKS
FORMULA
a(n) = -a(n-9). G.f.: (-2*x^8-4*x^7-8*x^6+3*x^5+6*x^4-7*x^3+5*x^2-9*x+1) / (x^9+1). [Colin Barker, Feb 14 2013]
CROSSREFS
Sequence in context: A334826 A021515 A011259 * A273840 A117019 A155692
KEYWORD
easy,sign
AUTHOR
Ferruccio Guidi (fguidi(AT)cs.unibo.it), Jan 26 2009
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)