OFFSET
0,12
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,-1).
FORMULA
a(n) = 2*a(n-9)-a(n-18). - Colin Barker, May 11 2015
G.f.: x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2). - Colin Barker, May 11 2015
MATHEMATICA
Table[Floor[n/9] Mod[n, 9], {n, 100}] (* Vincenzo Librandi, May 11 2015 *)
PROG
(PARI) A257849(n)=n\9*(n%9)
(Magma) [Floor(n/9)*(n mod 9): n in [0..100]]; // Vincenzo Librandi, May 11 2015
(Sage) [floor(n/9)*(n % 9) for n in (0..80)]; # Bruno Berselli, May 11 2015
(PARI) concat([0, 0, 0, 0, 0, 0, 0, 0, 0, 0], Vec(x^10*(8*x^7+7*x^6+6*x^5+5*x^4+4*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2*(x^6+x^3+1)^2) + O(x^100))) \\ Colin Barker, May 11 2015
(Python)
from math import prod
def A257849(n): return prod(divmod(n, 9)) # Chai Wah Wu, Jan 19 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, May 10 2015
STATUS
approved