OFFSET
0,3
COMMENTS
The terms are the possible digit sums of a triangular number. - Amarnath Murthy, Jan 09 2002
REFERENCES
Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 190.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = a(n-4) + 9 = 9*floor(n/4) + (n mod 4)*(1 + (n mod 4))/2.
G.f.: x*(1+2*x+3*x^2+3*x^3)/((1-x)^2*(1+x)*(1+x^2)). - R. J. Mathar, Sep 30 2008
E.g.f.: (3*cos(x) + (9*x - 3)*cosh(x) - sin(x) + (9*x - 4)*sinh(x))/4. - Stefano Spezia, Aug 07 2024
MATHEMATICA
Select[Range[0, 200], MemberQ[{0, 1, 3, 6}, Mod[#, 9]]&] (* Harvey P. Dale, Apr 10 2014 *)
#+{0, 1, 3, 6}&/@(9*Range[0, 20])//Flatten (* Harvey P. Dale, Jun 03 2019 *)
PROG
(Python)
def A055264(n): return (0, 1, 3, 6)[n&3]+9*(n>>2) # Chai Wah Wu, Jan 30 2023
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Henry Bottomley, May 08 2000
STATUS
approved