login
4th elementary symmetric function of the first n+3 primes.
7

%I #13 Mar 19 2020 16:00:55

%S 210,2927,20581,107315,414849,1376640,4224150,11063618,27395788,

%T 62364155,129081579,252768753,480307611,885449578,1541654028,

%U 2623783892,4318819858,6832984023,10644660237,16195499543,24304992465,36231495836,52916319106,75433702422

%N 4th elementary symmetric function of the first n+3 primes.

%H Alois P. Heinz, <a href="/A024449/b024449.txt">Table of n, a(n) for n = 1..10000</a>

%p SymmPolyn := proc(L::list,n::integer)

%p local c,a,sel;

%p a :=0 ;

%p sel := combinat[choose](nops(L),n) ;

%p for c in sel do

%p a := a+mul(L[e],e=c) ;

%p end do:

%p a;

%p end proc:

%p A024449 := proc(n)

%p [seq(ithprime(k),k=1..n+3)] ;

%p SymmPolyn(%,4) ;

%p end proc: # _R. J. Mathar_, Sep 23 2016

%p # second Maple program:

%p b:= proc(n) option remember; convert(series(`if`(n=0, 1,

%p b(n-1)*(ithprime(n)*x+1)), x, 5), polynom)

%p end:

%p a:= n-> coeff(b(n+3), x, 4):

%p seq(a(n), n=1..30); # _Alois P. Heinz_, Sep 06 2019

%t b[n_] := b[n] = Series[If[n == 0, 1, b[n - 1] (Prime[n] x + 1)], {x, 0, 5}] // Normal;

%t a[n_] := Coefficient[b[n + 3], x, 4];

%t a /@ Range[24] (* _Jean-François Alcover_, Mar 19 2020, after _Alois P. Heinz_ *)

%o (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]))))

%o a(n)=e4(primes(n)) \\ _Charles R Greathouse IV_, Jun 15 2015

%K nonn

%O 1,1

%A _Clark Kimberling_