A024449 4th elementary symmetric function of the first n+3 primes.
210, 2927, 20581, 107315, 414849, 1376640, 4224150, 11063618, 27395788, 62364155, 129081579, 252768753, 480307611, 885449578, 1541654028, 2623783892, 4318819858, 6832984023, 10644660237, 16195499543, 24304992465, 36231495836, 52916319106, 75433702422
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
SymmPolyn := proc(L::list,n::integer) local c,a,sel; a :=0 ; sel := combinat[choose](nops(L),n) ; for c in sel do a := a+mul(L[e],e=c) ; end do: a; end proc: A024449 := proc(n) [seq(ithprime(k),k=1..n+3)] ; SymmPolyn(%,4) ; end proc: # R. J. Mathar, Sep 23 2016 # second Maple program: b:= proc(n) option remember; convert(series(`if`(n=0, 1, b(n-1)*(ithprime(n)*x+1)), x, 5), polynom) end: a:= n-> coeff(b(n+3), x, 4): seq(a(n), n=1..30); # Alois P. Heinz, Sep 06 2019
-
Mathematica
b[n_] := b[n] = Series[If[n == 0, 1, b[n - 1] (Prime[n] x + 1)], {x, 0, 5}] // Normal; a[n_] := Coefficient[b[n + 3], x, 4]; a /@ Range[24] (* Jean-François Alcover, Mar 19 2020, after Alois P. Heinz *)
-
PARI
e4(v)=sum(i=1,#v-3,v[i]*sum(j=i+1,#v-2,v[j]*sum(k=j+1,#v-1,v[k]*vecsum(v[k+1..#v])))) a(n)=e4(primes(n)) \\ Charles R Greathouse IV, Jun 15 2015