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.

A341452 Number of partitions of n into 5 nonprime parts.

This page as a plain text file.
%I A341452 #11 Aug 19 2021 05:10:28
%S A341452 1,0,0,1,0,1,1,1,2,2,2,3,3,4,6,6,7,9,9,12,14,16,18,22,24,29,31,38,40,
%T A341452 49,50,62,65,77,81,97,98,120,122,144,149,176,178,212,214,251,255,299,
%U A341452 304,352,355,412,417,482,485,559,564,643,650,742,745,850,856,965
%N A341452 Number of partitions of n into 5 nonprime parts.
%p A341452 b:= proc(n, i, t) option remember; `if`(n=0,
%p A341452       `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+
%p A341452       `if`(isprime(i), 0, b(n-i, min(n-i, i), t-1))))
%p A341452     end:
%p A341452 a:= n-> b(n$2, 5):
%p A341452 seq(a(n), n=5..68);  # _Alois P. Heinz_, Feb 12 2021
%t A341452 b[n_, i_, t_] := b[n, i, t] = If[n == 0,
%t A341452      If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] +
%t A341452      If[PrimeQ[i], 0, b[n - i, Min[n - i, i], t - 1]]]];
%t A341452 a[n_] := b[n, n, 5];
%t A341452 Table[a[n], {n, 5, 68}] (* _Jean-François Alcover_, Aug 19 2021, after _Alois P. Heinz_ *)
%Y A341452 Cf. A002095, A005171, A018252, A062610, A259195, A341408, A341451, A341453, A341454, A341455, A341457.
%K A341452 nonn
%O A341452 5,9
%A A341452 _Ilya Gutkovskiy_, Feb 12 2021