login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of partitions of n into two prime parts (p,q) such that |q-p| is squarefree.
0

%I #13 Aug 05 2023 11:15:48

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

%T 0,4,0,0,1,2,0,0,1,2,1,0,0,5,0,0,0,3,0,0,1,1,0,0,0,6,1,0,1,3,0,0,0,1,

%U 1,0,0,5,1,0,1,4,0,0,0,3,1,0,0,7,0,0

%N Number of partitions of n into two prime parts (p,q) such that |q-p| is squarefree.

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

%F a(n) = Sum_{i=1..floor((n-1)/2)} A010051(i) * A010051(n-i) * A008966(n-2i).

%t Table[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[n - i] - PrimePi[n - i - 1]) MoebiusMu[n - 2 i]^2, {i, Floor[(n - 1)/2]}], {n, 100}]

%t Table[Count[IntegerPartitions[n,{2}],_?(AllTrue[#,PrimeQ]&&SquareFreeQ[#[[1]]-#[[2]]]&)],{n,100}] (* _Harvey P. Dale_, Aug 05 2023 *)

%o (PARI) a(n) = sum(i=1, (n-1)\2, isprime(i)*isprime(n-i)*issquarefree(n-2*i)); \\ _Michel Marcus_, Apr 21 2018; corrected by Jun 14 2022

%Y Cf. A008966, A010051.

%K nonn,easy

%O 1,16

%A _Wesley Ivan Hurt_, Apr 19 2018