login
-1 + Product_{n>=1} (1 + x^n)^a(n) = g.f. of A000040 (prime numbers).
7

%I #13 Feb 18 2022 07:55:36

%S 2,2,1,2,2,-2,2,-2,4,-1,4,-7,10,-19,20,-20,34,-42,64,-100,126,-178,

%T 258,-326,464,-675,936,-1371,1888,-2550,3690,-5208,7292,-10467,14742,

%U -20808,29610,-41586,59052,-84438,119602,-170153,242256,-343534,489550,-697815

%N -1 + Product_{n>=1} (1 + x^n)^a(n) = g.f. of A000040 (prime numbers).

%C Inverse weigh transform of A000040.

%H Alois P. Heinz, <a href="/A305871/b305871.txt">Table of n, a(n) for n = 1..3000</a>

%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>

%F Product_{n>=1} (1 + x^n)^a(n) = 1 + Sum_{k>=1} prime(k)*x^k.

%e (1 + x)^2 * (1 + x^2)^2 * (1 + x^3) * (1 + x^4)^2 * (1 + x^5)^2 * (1 + x^6)^(-2) * ... * (1 + x^n)^a(n) * ... = 1 + 2*x + 3*x^2 + 5*x^3 + 7*x^4 + 11*x^5 + 13*x^6 + ... + A000040(k)*x^k + ...

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

%p add(binomial(a(i), j)*b(n-i*j, i-1), j=0..n/i)))

%p end:

%p a:= proc(n) option remember; ithprime(n)-b(n, n-1) end:

%p seq(a(n), n=1..50); # _Alois P. Heinz_, Jun 13 2018

%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0,

%t Sum[Binomial[a[i], j]*b[n - i*j, i - 1], {j, 0, n/i}]]];

%t a[n_] := a[n] = Prime[n] - b[n, n - 1];

%t Table[a[n], {n, 1, 50}] (* _Jean-François Alcover_, Feb 18 2022, after _Alois P. Heinz_ *)

%Y Cf. A000040, A030010, A030011, A061152.

%K sign

%O 1,1

%A _Ilya Gutkovskiy_, Jun 12 2018