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.
%I A347419 #39 Oct 11 2021 13:25:34 %S A347419 0,0,0,0,1,0,1,1,1,2,0,2,1,2,2,3,1,4,2,4,4,4,4,5,5,6,5,6,6,6,8,7,9,9, %T A347419 9,11,10,11,13,12,13,15,14,17,16,18,18,20,21,23,22,25,25,27,30,29,32, %U A347419 32,34,37,38,40,42,44,45,50,49,53,55,57,60,64,66,70,71,76,78,83,86,89,93,96 %N A347419 Number of partitions of n into two or more distinct primes. %C A347419 Every positive integer can be written as a sum of two or more distinct primes except 1,2,3,4,6 and 11. %F A347419 a(n) = A000586(n) - A010051(n). %e A347419 a(5) = 1: 2+3. %e A347419 a(18) = 4: 11+7, 11+5+2, 13+5, 13+3+2. %p A347419 h:= proc(n) h(n):=`if`(n<2, 0, `if`(isprime(n), n, h(n-1))) end: %p A347419 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0, %p A347419 b(n, h(i-1))+b(n-i, h(min(n-i, i-1))))) %p A347419 end: %p A347419 a:= n-> b(n, h(n-1)): %p A347419 seq(a(n), n=1..100); # _Alois P. Heinz_, Sep 03 2021 %t A347419 m = 24; Rest @ CoefficientList[Series[Product[(1 + x^Prime[k]), {k, 1, m}], {x, 0, Prime[m]}], x] - Table[Boole @ PrimeQ[n], {n, 1, Prime[m]}] (* _Amiram Eldar_, Sep 03 2021 *) %o A347419 (Python) %o A347419 from sympy import isprime, primerange %o A347419 from functools import cache %o A347419 @cache %o A347419 def A000586(n, k=None): # after _Charles R Greathouse IV_ %o A347419 if k == None: k = n %o A347419 if n < 1: return int(n == 0) %o A347419 return sum(A000586(n-p, p-1) for p in primerange(1, k+1)) %o A347419 def a(n): return A000586(n) - isprime(n) %o A347419 print([a(n) for n in range(1, 83)]) # _Michael S. Branicky_, Sep 03 2021 %Y A347419 Cf. A000040, A000586, A010051, A166081. %K A347419 nonn %O A347419 1,10 %A A347419 _Ayoub Saber Rguez_, Aug 31 2021