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!)
A076311 a(n) = floor(n/10) - 5*(n mod 10). 8
0, -5, -10, -15, -20, -25, -30, -35, -40, -45, 1, -4, -9, -14, -19, -24, -29, -34, -39, -44, 2, -3, -8, -13, -18, -23, -28, -33, -38, -43, 3, -2, -7, -12, -17, -22, -27, -32, -37, -42, 4, -1, -6, -11, -16, -21, -26, -31, -36, -41, 5, 0, -5, -10, -15, -20, -25, -30, -35 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
(n==0 modulo 17) iff (a(n)==0 modulo 17); applied recursively, this property provides a divisibility test for numbers given in base 10 notation.
REFERENCES
Karl Menninger, Rechenkniffe, Vandenhoeck & Ruprecht in Goettingen (1961), 79A.
LINKS
Eric Weisstein's World of Mathematics, Divisibility Tests.
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
a(n)= +a(n-1) +a(n-10) -a(n-11). G.f. x *(-5-5*x-5*x^2-5*x^3-5*x^4-5*x^5-5*x^6-5*x^7-5*x^8+46*x^9) / ( (1+x) *(x^4+x^3+x^2+x+1) *(x^4-x^3+x^2-x+1) *(x-1)^2 ). - R. J. Mathar, Feb 20 2011
EXAMPLE
12808 is not a multiple of 17, as 12808 -> 1280-5*8=1240 -> 124-5*0=124 -> 12-5*4=-8=17*(-1)+9, therefore the answer is NO.
Is 9248 divisible by 17? 9248 -> 924-5*8=884 -> 88-5*4=68=17*4, therefore the answer is YES.
MATHEMATICA
Table[Floor[n/10]-5Mod[n, 10], {n, 0, 60}] (* or *) LinearRecurrence[ {1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, -5, -10, -15, -20, -25, -30, -35, -40, -45, 1}, 60] (* Harvey P. Dale, Dec 21 2014 *)
PROG
(Haskell)
a076311 n = n' - 5 * m where (n', m) = divMod n 10
-- Reinhard Zumkeller, Jun 01 2013
(Magma) [Floor(n/10)-5*(n mod 10): n in [0..50]]; // Vincenzo Librandi, Jun 23 2015
(PARI) a(n)=n\10 - n%10*5 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
Sequence in context: A297305 A182340 A313733 * A336483 A063284 A257222
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Oct 06 2002
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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)