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.

A344782 Number of compositions of the n-th prime into a prime number of prime parts.

This page as a plain text file.
%I A344782 #21 Apr 04 2022 11:41:51
%S A344782 0,0,2,5,11,23,119,237,776,6665,16518,207953,892680,1824445,8374988,
%T A344782 96208461,978217302,2059770725,18616884428,78013141907,158103168924,
%U A344782 1386674113487,6734724875544,82189835767618,2013603833805429,9101106147506177,19147196940580651
%N A344782 Number of compositions of the n-th prime into a prime number of prime parts.
%H A344782 Alois P. Heinz, <a href="/A344782/b344782.txt">Table of n, a(n) for n = 1..300</a>
%e A344782 a(3) = 2: [2,3], [3,2].
%e A344782 a(4) = 5: [5,2], [2,5], [3,2,2], [2,3,2], [2,2,3].
%p A344782 b:= proc(n, c) option remember; `if`(n=0, `if`(isprime(c),
%p A344782       1, 0), add(`if`(isprime(j), b(n-j, c+1), 0), j=2..n))
%p A344782     end:
%p A344782 a:= n-> b(ithprime(n), 0):
%p A344782 seq(a(n), n=1..31);
%t A344782 b[n_, c_] := b[n, c] = If[n == 0, If[PrimeQ[c], 1, 0],
%t A344782      Sum[If[PrimeQ[j], b[n - j, c + 1], 0], {j, 2, n}]];
%t A344782 a[n_] := b[Prime[n], 0];
%t A344782 Table[a[n], {n, 1, 31}] (* _Jean-François Alcover_, Apr 04 2022, after _Alois P. Heinz_ *)
%Y A344782 Cf. A000040, A316154, A344790.
%K A344782 nonn
%O A344782 1,3
%A A344782 _Alois P. Heinz_, May 28 2021