login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307343 Number of partitions of n into 3 mutually distinct, mutually nonadjacent prime parts. 2

%I #20 Apr 05 2019 18:50:58

%S 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,1,0,2,1,1,1,2,1,2,3,1,

%T 2,2,2,3,4,1,2,2,3,3,4,2,5,2,3,5,7,3,7,2,5,5,9,2,8,3,9,5,10,1,8,4,10,

%U 6,11,1,11,4,11,6,12,3,16,4,12,6,14,4,18

%N Number of partitions of n into 3 mutually distinct, mutually nonadjacent prime parts.

%H Alois P. Heinz, <a href="/A307343/b307343.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F a(n) = Sum_{k=1..floor((n-1)/3)} Sum_{i=k+1..floor((n-k-1)/2)} A010051(i) * A010051(k) * A010051(n-i-k) * (1-floor((pi(k)+1)/pi(i))) * (1-floor((pi(i)+1)/pi(n-i-k))), where pi is the prime counting function.

%e a(18) = 1; 18 = 2 + 5 + 11, which is the only partition of 18 into 3 mutually nonadjacent prime parts.

%p with(numtheory): A307343:=n->add(add((pi(k)-pi(k-1))*(pi(i)-pi(i-1))*(pi(n-i-k)-pi(n-i-k-1))*(1-floor((pi(k)+1)/pi(i)))*(1-floor((pi(i)+1)/pi(n-i-k))), i=k+1..floor((n-k-1)/2)), k=1..floor((n-1)/3)): seq(A307343(n), n=1..150);

%p # second Maple program:

%p b:= proc(n, i) option remember; `if`(n=0, [1, 0$3], `if`(i<1, [0$4],

%p zip((x, y)-> x+y, b(n, i-1), [0, `if`(ithprime(i)>n, [0$3],

%p b(n-ithprime(i), i-2)[1..3])[]], 0)))

%p end:

%p a:= n-> b(n, numtheory[pi](n))[4]:

%p seq(a(n), n=1..200); # _Alois P. Heinz_, Apr 05 2019

%t Table[Sum[Sum[(1 - Floor[(PrimePi[k] + 1)/PrimePi[i]]) (1 - Floor[(PrimePi[i] + 1)/PrimePi[n - i - k]]) (PrimePi[i] - PrimePi[i - 1])*(PrimePi[k] - PrimePi[k - 1]) (PrimePi[n - i - k] - PrimePi[n - i - k - 1]), {i, k + 1, Floor[(n - k - 1)/2]}], {k, Floor[(n - 1)/3]}], {n, 100}]

%Y Cf. A000720, A010051, A125688.

%K nonn,easy

%O 1,26

%A _Wesley Ivan Hurt_, Apr 02 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 21:15 EDT 2024. Contains 374377 sequences. (Running on oeis4.)