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