cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

2, 2, 1, 2, 2, -2, 2, -2, 4, -1, 4, -7, 10, -19, 20, -20, 34, -42, 64, -100, 126, -178, 258, -326, 464, -675, 936, -1371, 1888, -2550, 3690, -5208, 7292, -10467, 14742, -20808, 29610, -41586, 59052, -84438, 119602, -170153, 242256, -343534, 489550, -697815
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 12 2018

Keywords

Comments

Inverse weigh transform of A000040.

Examples

			(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 + ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(binomial(a(i), j)*b(n-i*j, i-1), j=0..n/i)))
        end:
    a:= proc(n) option remember; ithprime(n)-b(n, n-1) end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Jun 13 2018
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0,
         Sum[Binomial[a[i], j]*b[n - i*j, i - 1], {j, 0, n/i}]]];
    a[n_] := a[n] = Prime[n] - b[n, n - 1];
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Feb 18 2022, after Alois P. Heinz *)

Formula

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