OFFSET
0,3
COMMENTS
Every run of increasing terms ends with a positive multiple of 81, and except for the first run, it starts with a term of A017173 which is a fixed point for this sequence (see 4th formula).
LINKS
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
G.f.: x*(1 + 4*x + 9*x^2 + 16*x^3 + 25*x^4 + 36*x^5 + 49*x^6 + 64*x^7 + 81*x^8 + 8*x^9 + 14*x^10 + 18*x^11 + 20*x^12 + 20*x^13 + 18*x^14 + 14*x^15 + 8*x^16)/((1 - x)^2*(1 + x + x^2)^2*(1 + x^3 + x^6)^2).
a(n) = 2*a(n-9) - a(n-18) for n > 17.
a(n) = n*(n - 9*floor((n-1)/9)) for n > 0.
MATHEMATICA
a[n_]:=n(n - 9*Floor[(n-1)/9]); Join[{0}, Array[a, 58]]
PROG
(Python)
def A361203(n): return n*(1 + (n - 1) % 9) # Chai Wah Wu, Apr 23 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Apr 20 2023
STATUS
approved