OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..45
FORMULA
a(n) = ((11^(n-1) + 9)/10) * a(n-1). - Vincenzo Librandi, Nov 12 2012
MATHEMATICA
a[n_, m_]:= a[n, m]= If[n<3, 1, (m^(n-1) +m-2)*a[n-1, m]/(m-1)];
Table[a[n, 10], {n, 30}] (* G. C. Greubel, May 03 2023 *)
PROG
(Magma) [n le 2 select 1 else ((11^(n-1) + 9)/10) * Self(n-1): n in [1..15]]; // Vincenzo Librandi, Nov 12 2012
(SageMath)
def a(n, m) -> int: # a = A015513
return 1 if (n<3) else (m^(n-1)+m-2)*a(n-1, m)//(m-1)
[a(n, 11) for n in range(1, 31)] # G. C. Greubel, May 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved