A230443 Number of decompositions of 2n into a sum of two primes p2 >= p1 such that the number of runs in binary expansion of p2-p1 is less than or equal to 4.
1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 2, 4, 4, 2, 3, 4, 3, 4, 5, 4, 2, 5, 3, 4, 6, 3, 4, 6, 2, 5, 6, 5, 4, 7, 3, 5, 7, 5, 4, 9, 3, 4, 6, 3, 5, 8, 3, 6, 7, 5, 5, 10, 4, 5, 8, 3, 3, 10, 2, 6, 7, 6, 3, 8, 7, 7, 10, 6, 5, 12, 3, 7, 10, 5, 5, 10, 1, 6, 10, 7, 4
Offset: 2
Examples
n=2, 2n=4, 4=2+2, 2-2=0, A005811(0)=1 < 4, only one decomposition, so a(2)=1; ... n=5, 2n=10, 10=5+5=3+7, 5-5=0, A005811(0)=1<4, 7-3=4, A005811(4)=2<4, so a(5)=2; ... n=26, 2n=52, 52=5+47=11+41=23+29. 47-5=42, A005811(42)=6>4 [X]; 41-11=30, A005811(30)=2<4 [v]; 29-23=6, A005811(6)=2<4 [v]; so a(26)=2.
Links
- Lei Zhou, Table of n, a(n) for n = 2..10000
Programs
-
Mathematica
Table[ev=2*seed;ct=0;cp1=seed-1;While[cp1=NextPrime[cp1];cp1
Comments