login
a(n) = 3rd elementary symmetric function of the first n+2 primes.
7

%I #12 Feb 03 2020 10:35:04

%S 30,247,1358,5102,16186,41817,98190,220628,441410,852887,1551568,

%T 2631642,4293186,6866813,10757450,16151192,23873746,34440605,48249066,

%U 66877582,91117898,122953643,165196270,218615372,284119458,364962773,462059210,579605426,732954370

%N a(n) = 3rd elementary symmetric function of the first n+2 primes.

%H Alois P. Heinz, <a href="/A024448/b024448.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 A024448 := proc(n)

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

%p SymmPolyn(%,3) ;

%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, 4), polynom)

%p end:

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

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

%t b[n_] := b[n] = If[n == 0, 1, b[n - 1] (Prime[n] x + 1)];

%t a[n_] := SeriesCoefficient[b[n + 2], {x, 0, 3}];

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

%K nonn

%O 1,1

%A _Clark Kimberling_