login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257845
a(n) = floor(n/5) * (n mod 5).
2
0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 5, 10, 15, 20, 0, 6, 12, 18, 24, 0, 7, 14, 21, 28, 0, 8, 16, 24, 32, 0, 9, 18, 27, 36, 0, 10, 20, 30, 40, 0, 11, 22, 33, 44, 0, 12, 24, 36, 48, 0, 13, 26, 39, 52, 0, 14, 28, 42, 56
OFFSET
0,8
COMMENTS
Equivalently, write n in base 5, multiply the last digit by the number with its last digit removed.
FORMULA
a(n) = 2*a(n-5)-a(n-10). - Colin Barker, May 11 2015
G.f.: x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2). - Colin Barker, May 11 2015
MATHEMATICA
LinearRecurrence[{0, 0, 0, 0, 2, 0, 0, 0, 0, -1}, {0, 0, 0, 0, 0, 0, 1, 2, 3, 4}, 80] (* Harvey P. Dale, Aug 15 2021 *)
PROG
(PARI) a(n, b=5)=(n=divrem(n, b))[1]*n[2]
(PARI) concat([0, 0, 0, 0, 0, 0], Vec(x^6*(4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^4+x^3+x^2+x+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
CROSSREFS
Cf. A142150 (the base 2 analog), A115273, A257844 - A257850.
Sequence in context: A082853 A230431 A190886 * A162593 A279125 A011025
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, May 10 2015
STATUS
approved