

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



LINKS

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


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

r := (7*n) mod 10 ;
x := floor(7*n/10) ;
(x2*r)/7 ;


PROG



CROSSREFS



KEYWORD

sign,base,easy


AUTHOR



STATUS

approved



