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.

A056768 Number of partitions of the n-th prime into parts that are all primes.

This page as a plain text file.
%I A056768 #37 Jul 02 2025 16:02:00
%S A056768 1,1,2,3,6,9,17,23,40,87,111,219,336,413,614,1083,1850,2198,3630,5007,
%T A056768 5861,9282,12488,19232,33439,43709,49871,64671,73506,94625,221265,
%U A056768 279516,394170,441250,766262,853692,1175344,1608014,1975108,2675925
%N A056768 Number of partitions of the n-th prime into parts that are all primes.
%H A056768 David A. Corneth, <a href="/A056768/b056768.txt">Table of n, a(n) for n = 1..10000</a> (first 4000 terms from Alois P. Heinz)
%F A056768 a(n) = A000607(prime(n)).
%F A056768 a(n) = A168470(n) + 1. - _Alonso del Arte_, Feb 15 2014, restating the corresponding formula given by _R. J. Mathar_ for A168470.
%F A056768 a(n) = [x^prime(n)] Product_{k>=1} 1/(1 - x^prime(k)). - _Ilya Gutkovskiy_, Jun 05 2017
%e A056768 a(4) = 3 because the 4th prime is 7 which can be partitioned using primes in 3 ways: 7, 5 + 2, and 3 + 2 + 2.
%e A056768 In connection with the 6th prime 13, for instance, we have the a(6) = 9 prime partitions: 13 = 2 + 2 + 2 + 2 + 2 + 3 = 2 + 2 + 2 + 2 + 5 = 2 + 2 + 2 + 7 = 2 + 2 + 3 + 3 + 3 = 2 + 3 + 3 + 5 = 2 + 11 = 3 + 3 + 7 = 3 + 5 + 5.
%p A056768 b:= proc(n, i) option remember; `if`(n=0 or i=2
%p A056768        and n::even, 1, `if`(i=2 or n=1, 0,
%p A056768        b(n, prevprime(i)))+`if`(i>n, 0, b(n-i, i)))
%p A056768     end:
%p A056768 a:= n-> b(ithprime(n)$2):
%p A056768 seq(a(n), n=1..50);  # _Alois P. Heinz_, Sep 15 2016
%t A056768 Table[Count[IntegerPartitions[n],_?(AllTrue[#,PrimeQ]&)],{n,Prime[ Range[ 40]]}] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 07 2015 *)
%t A056768 n=40;ser=Product[1/(1-x^Prime[i]),{i,1,n}];Table[SeriesCoefficient[ser,{x,0,Prime[i]}],{i,1,n}] (* _Gus Wiseman_, Sep 14 2016 *)
%o A056768 (Haskell)
%o A056768 a056768 = a000607 . a000040  -- _Reinhard Zumkeller_, Aug 05 2012
%Y A056768 Cf. A000041, A000607, A100118, A276687, A070215 (distinct parts).
%K A056768 nonn
%O A056768 1,3
%A A056768 _Brian Galebach_, Aug 16 2000
%E A056768 More terms from _James Sellers_, Aug 25 2000