OFFSET
0,1
LINKS
T. D. Noe, Table of n, a(n) for n = 0..200
FORMULA
G.f.: (6 - 140*x + 1148*x^2 - 4200*x^3 + 6888*x^4 - 4032*x^5)/((1-x)*(1-2*x)*(1-3*x)*(1-4*x)*(1-6*x)*(1-12*x)). - Michael Somos, Apr 02 2003
MATHEMATICA
a[n_] := Plus@@(Divisors[12]^n)
Total[#^Range[0, 20]&/@Divisors[12]] (* Vincenzo Librandi, Apr 17 2014 *)
DivisorSigma[Range[0, 20], 12] (* Harvey P. Dale, Sep 17 2019 *)
PROG
(PARI) a(n)=if(n<0, 0, polsym((x-1)*(x-2)*(x-3)*(x-4)*(x-6)*(x-12), n)[n+1])
(PARI) a(n)=if(n<0, 0, 1^n+2^n+3^n+4^n+6^n+12^n)
(Sage) [sigma(12, n)for n in range(0, 17)] # Zerinvary Lajos, Jun 04 2009
(Magma) [&+[Divisors(12)[i]^n: i in [1..6]]: n in [0..20]]; // Vincenzo Librandi, Apr 17 2014
(Python)
def a(n): return sum(d**n for d in [1, 2, 3, 4, 6, 12])
print([a(n) for n in range(20)]) # Michael S. Branicky, Jun 28 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved