|
|
A337753
|
|
The number of n-digit numbers which are divisible by 3 and where all decimal digits are odd.
|
|
0
|
|
|
2, 8, 41, 208, 1042, 5209, 26042, 130208, 651041, 3255208, 16276042, 81380209, 406901042, 2034505208, 10172526041, 50862630208, 254313151042, 1271565755209, 6357828776042, 31789143880208, 158945719401041, 794728597005208, 3973642985026042, 19868214925130209
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
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
|
|
|
STATUS
|
approved
|
|
|
|