OFFSET
1,1
LINKS
Stackexchange, Odd digit numbers divisible by 3
Index entries for linear recurrences with constant coefficients, signature (6,-6,5).
FORMULA
3*a(n) = 5^n+A057079(n+1).
a(n) = 6*a(n-1)-6*a(n-2)+5*a(n-3).
G.f.: x*(2-4*x+5*x^2) / ( (1-5*x)*(x^2-x+1) ).
EXAMPLE
a(1) = 2 is the cardinality of the set {3,9}.
a(2) = 8 is the cardinality of the set {15, 33, 39, 51, 57, 75, 93, 99}.
MATHEMATICA
CoefficientList[Series[(2 - 4*x + 5*x^2)/((1 - 5*x)*(x^2 - x + 1)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Nov 07 2020 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
R. J. Mathar, Sep 21 2020
STATUS
approved