OFFSET
1,2
COMMENTS
If either n - k or n + k are prime, they are not counted.
Rows n containing 1: 1, 4, 6, 8, 9, 10, 12, 14, 15, 16, ...(A018252).
Rows n containing 2: 1, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20,...
Rows n containing 3: 1, 2, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19,...
Rows n containing 4: 2, 3, 6, 8, 10, 14, 16, 20, 40, 44, 70, 100,...
Rows n containing 5: 3, 4, 5, 6, 7, 9, 15, 105, 195,...
Rows n containing 6: 6, 7, 8.
Rows n containing 7: 7, 8.
All values of k are less than 8.
Row lengths are: 3, 2, 2, 2, 2, 5, 5, 5, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3,...
Smallest positive k such that there are k-1 primes between n - k and n + k: 1, 1, 3, 4, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1,...
Sequence of final entry in row n: 3, 4, 5, 5, 5, 6, 7, 7, 5, 4, 3, 3, 3, 4, 5, 4, 3, 3, 3, 4, 3, 2, 2,..
Row sums are: 6, 7, 9, 6, 7, 19, 23, 20, 9, 7, 5, 4, 5, 7, 9, 7, 5,...
Largest nonnegative k such that there are k primes in the interval (n-k,n+k): 0, 2, 3, 4, 4, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0,...
Numbers n such that there are two primes in (n-2,n+2): 2, 3, 4, 6, 12, .. continuing as in A014574.
Irregular triangle read by rows in which row n lists the nonnegative values k such that there are k primes in (n-2*k,n+2*k): 0,1,2,3,4 ; 4,5,6; 4,5,6; 0,6,7,8; 1,6,7,8; 0,8,9; 1,2,8,9; 0,1,9; 0,2,9;...
EXAMPLE
Triangle begins:
1, 2, 3;
3, 4;
4, 5;
1, 5;
2, 5;
1, 3, 4, 5, 6;
2, 3, 5, 6, 7;
1, 2, 4, 6, 7;
1, 3, 5;
1, 2, 4;
2, 3;
1, 3;
2, 3;
1, 2, 4;
1, 3, 5.
First row:
n = 1, k = 1, no primes between 0 and 2.
n = 1, k = 2, one prime between -1 and 3.
n = 1, k = 3, two primes between -2 and 4.
Fifth row:
n = 4, k = 1, 0 primes between 3 and 5.
n = 4, k = 5, 4 primes between -1 and 9 (2, 3, 5, and 7).
MAPLE
for n from 1 to 45 do
for k from 1 to 4*n do
numtheory[pi](n+k-1)-numtheory[pi](n-k) ;
if % = k-1 then
printf("%d, ", k) ;
end if;
end do:
printf("\n") ;
end do: # R. J. Mathar, Apr 25 2013
CROSSREFS
KEYWORD
nonn,tabf,less
AUTHOR
Juri-Stepan Gerasimov, Mar 16 2013
STATUS
approved