

A196279


Let r= (7n) mod 10 and x=floor(7n/10) be the last digit and leading part of 7n. Then a(n) = (x2r)/7.


1



0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 6, 7, 8, 6, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 10, 8, 9, 10, 8, 9, 10, 8, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

Apparently a(9+n) = A194519(n).


LINKS

Table of n, a(n) for n=0..108.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,1,1).


FORMULA

Conjecture: a(n)= +a(n1) +a(n10) a(n11) with G.f. x*(2 +x 2*x^3 +x^4 2*x^6 +x^7 +x^9 +x^2 +x^5 +x^8) / ( (1+x) *(x^4+x^3+x^2+x+1) *(x^4x^3+x^2x+1) *(x1)^2 ).  R. J. Mathar, Oct 04 2011
The conjecture above is correct.  Charles R Greathouse IV, Jan 04 2013


EXAMPLE

Check to see if 273 is divisible by 7 : double the last digit 3*2=6 ; subtract that from the rest of the number 276=21 ; check to see if the difference is divisible by 7: 21/7 is divisible by 7, therefore 273 is also divisible by 7. 273=7*39 and 21=7*3 so a(39)=3.


MAPLE

A196279 := proc(n)
r := (7*n) mod 10 ;
x := floor(7*n/10) ;
(x2*r)/7 ;
end proc: # R. J. Mathar, Oct 04 2011


PROG

(PARI) a(n)=(7*n\107*n%10*2)/7 \\ Charles R Greathouse IV, Jan 04 2013


CROSSREFS

Sequence in context: A137269 A112201 A112203 * A132798 A080425 A048141
Adjacent sequences: A196276 A196277 A196278 * A196280 A196281 A196282


KEYWORD

sign,easy


AUTHOR

Philippe Deléham, Sep 30 2011


STATUS

approved



