OFFSET
0,3
COMMENTS
a(n) is the number k such that the number m with n 3's and k 1's has digit product = digit sum = 3^n.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-7,3).
FORMULA
From Elmo R. Oliveira, Sep 09 2024: (Start)
G.f.: (1 - 5*x + 10*x^2)/((1 - 3*x)*(1 - x)^2).
E.g.f.: exp(x)*(exp(2*x) - 3*x).
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3) for n > 2. (End)
EXAMPLE
Corresponding numbers m are 1, 3, 11133, 111111111111111111333, ...
MATHEMATICA
Table[3^m-3*m, {m, 0, 20}]
PROG
(Magma) [3^n-3*n: n in [0..30]]; // Vincenzo Librandi, Oct 22 2011
(PARI) a(n)=3^n-3*n \\ Charles R Greathouse IV, Sep 08 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, May 16 2005
EXTENSIONS
Corrected by Charles R Greathouse IV, Sep 08 2012
STATUS
approved