OFFSET
0,3
COMMENTS
Numbers a(n) = k such that number m with n 4's and k 1's has digit product = digit sum = 4^n.
LINKS
FORMULA
From Harvey P. Dale, Oct 21 2011: (Start)
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3) with a(0)=1, a(1)=0, and a(2)=8.
G.f.: (-17*x^2+6*x-1)/((x-1)^2*(4*x-1)). (End)
E.g.f.: exp(x)*(exp(3*x) - 4*x). - Elmo R. Oliveira, Sep 10 2024
EXAMPLE
Corresponding numbers m are 1, 4, 1111111144, ...
MATHEMATICA
Table[4^m-4*m, {m, 0, 20}]
LinearRecurrence[{6, -9, 4}, {1, 0, 8}, 30] (* Harvey P. Dale, Oct 21 2011 *)
PROG
(Magma) [(4^n - 4*n): n in [0..25]]; // Vincenzo Librandi, Dec 16 2010
(PARI) a(n)=4^n-4*n \\ Charles R Greathouse IV, Sep 08 2012
(Python)
def A107584(n): return (1<<(n<<1))-(n<<2) # Chai Wah Wu, Nov 29 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, May 16 2005
EXTENSIONS
More terms from Vincenzo Librandi, Dec 16 2010
Corrected by Charles R Greathouse IV, Sep 08 2012
STATUS
approved