login
A076310
a(n) = floor(n/10) + 4*(n mod 10).
7
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 7, 11, 15, 19, 23
OFFSET
0,2
COMMENTS
(n==0 modulo 13) iff (a(n)==0 modulo 13); 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*(-4-4*x-4*x^2-4*x^3-4*x^4-4*x^5-4*x^6-4*x^7-4*x^8+35*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
435598 is not a multiple of 13, as 435598 -> 43559+4*8=43591 -> 4359+4*1=4363 -> 436+4*3=448 -> 44+4*8=76 -> 7+4*6=29=13*2+3, therefore the answer is NO.
Is 8424 divisible by 13? 8424 -> 842+4*4=858 -> 85+4*8=117 -> 11+4*7=39=13*3, therefore the answer is YES.
MAPLE
A076310:=n->floor(n/10) + 4*(n mod 10); seq(A076310(n), n=0..100); # Wesley Ivan Hurt, Jan 30 2014
MATHEMATICA
Table[Floor[n/10] + 4*Mod[n, 10], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 30 2014 *)
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 1}, 80] (* Harvey P. Dale, Sep 30 2015 *)
PROG
(Haskell)
a076310 n = n' + 4 * m where (n', m) = divMod n 10
-- Reinhard Zumkeller, Jun 01 2013
(PARI) a(n) = n\10 + 4*(n % 10); \\ Michel Marcus, Jan 31 2014
(Magma) [Floor(n/10)+4*(n mod 10): n in [0..75]]; // Vincenzo Librandi, Feb 27 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 06 2002
STATUS
approved