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.

A341982 Number of ways to write n as an ordered sum of 2 primes (counting 1 as a prime).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 4, 2, 3, 0, 4, 2, 5, 2, 4, 0, 6, 2, 6, 2, 5, 0, 8, 2, 5, 0, 4, 0, 8, 2, 6, 2, 7, 0, 8, 0, 5, 2, 6, 0, 10, 2, 8, 2, 7, 0, 12, 2, 8, 0, 6, 0, 12, 2, 6, 0, 7, 0, 14, 2, 7, 2, 10, 0, 12, 0, 6, 2, 10, 0, 14, 2, 11, 2, 10, 0, 14, 0, 10, 2, 9, 0, 18, 2, 9, 0, 8
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 24 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; series(`if`(n=0, 1, x*add(
          `if`(j=1 or isprime(j), b(n-j), 0), j=1..n)), x, 3)
        end:
    a:= n-> coeff(b(n), x, 2):
    seq(a(n), n=2..88);  # Alois P. Heinz, Feb 24 2021
  • Mathematica
    nmax = 88; CoefficientList[Series[(x + Sum[x^Prime[k], {k, 1, nmax}])^2, {x, 0, nmax}], x] // Drop[#, 2] &

Formula

G.f.: ( x + Sum_{k>=1} x^prime(k) )^2.