A086153 Special prime numbers arranged in a triangle: n-th row contains m primes p (where m = pi(2n + A020483(n)) - pi(A020483(n))) with following properties.
3, 7, 3, 23, 5, 89, 23, 3, 139, 19, 7, 3, 199, 47, 17, 5, 113, 83, 23, 17, 3, 1831, 211, 43, 13, 7, 3, 523, 109, 79, 19, 11, 5, 887, 317, 107, 47, 17, 11, 3, 1129, 619, 109, 79, 19, 7, 1669, 199, 113, 73, 43, 13, 5, 2477, 1373, 197, 113, 71, 41, 11, 3, 2971, 1123, 199, 109
Offset: 1
Examples
The table begins as follows: 3; 7, 3; 23, 5; 89, 23, 3; 139, 19, 7, 3; 199, 47, 17, 5; 113, 83, 23, 17, 3; ... For example, suppose n = 50: d = 2n = 100; the 50th row consists of 25 terms as follows: {396733, 58789, 142993, 38461, 37699, 7351, 5881, 1327, 2557, 1879, 1621, 1117, 463, 457, 283, 331, 211, 127, 73, 67, 31, ?, ?, 7, 3}; A000230(50)=396733, A020483(50)=3; between 143093 and 142993 two primes {143053,143063} occur because 142993 is the 3rd (from 2+1) entry in the 50th row. The length of 50th row is pi(100+3) - pi(3) = pi(103) - pi(3) = 27 - 2 = 25, number of primes between 103 and 3 is 24 (not counting 103 and 3).
Links
- Brian Kehrig, Rows n = 1..42, flattened (Rows 1..37 from Martin Raab)
- Martin Raab, The first 370 rows of the table arranged as a triangle, including unknown terms.
Programs
-
Mathematica
(* Program to generate the 19th row *) cp[x_, y_] := Count[Table[PrimeQ[i], {i, x, y}], True] {d=38, k=0, mxc=Ceiling[d/3]; vg=PrimePi[30593]} t=Table[0, {mxc}]; t1=Table[0, {mxc}]; Do[s=cp[1+Prime[n], Prime[n]+d-1]; np=d+Prime[n]; If[PrimeQ[np]&&s<(1+mxc)&&t[[s+1]]==0, t[[s+1]]=n; t1[[s+1]]=Prime[n]], {n, 1, 5000}]; {t, t1}
-
PARI
{z=concat(vector(13),binary(8683781)); for(n=1, 37, p1=3; while(!isprime(p1+2*n), p1=nextprime(p1+2)); p2=p1+2*n; k=primepi(p2)-primepi(p1); r=vector(k); r[k]=p1; i1=1; i2=0; s=vecsort(r); while(s[1+z[n]]==0, while(i1*i2==0, p1+=2; p2+=2; i2=isprime(p2); k=k-i1+i2; i1=isprime(p1)); if(!r[k], r[k]=p1; s=vecsort(r)); i2=0); print("row "n": "r))} \\ Martin Raab, Oct 21 2021
Comments