OFFSET
1,1
COMMENTS
LINKS
Jean-Marc Rebert, Table of n, a(n) for n = 1..18866 (the first 7 rows).
EXAMPLE
The first row is empty.
T(2,1) = 5 because (5,7) is a pair of primes centered at A002110(2) = prime(2)# = 6.
Triangle starts:
[];
[5];
[7, 13, 17, 19, 23, 29];
[11, 19, 23, 31, 37, 41, 47, 53, 61, 67, 71, 73, 83, 89, 103, 107, 109, 113, 127, 137, 139, 149, 151, 157, 163, 179, 181, 191, 193, 197];
...
PROG
(PARI) a147517=[0, 1, 6, 30, 190, 1564, 17075, 226758, 3792532]
a002110(n)=prod(i=1, n, prime(i))
a(n)=my(k=2, maxk=2, primorielle=2, s=0, y=5); if(n==1, y=5, maxk=2; while(sum(k=2, k=maxk, a147517[k])<n, maxk++; s=sum(k=2, k=maxk, a147517[k-1])); k=maxk; primorielle=a002110(k); forprime(p=2, primorielle, if(isprime(2*primorielle-p), s++; if(s==n, y=p; break))); return(y); )
(PARI) row(n) = {v = []; pn = prod(i=1, n, prime(i)); forprime(p=1, pn-1, if (isprime(2*pn-p), v = concat(v, p))); v; } \\ Michel Marcus, Aug 02 2015
(PARI) a002110(n) = prod(p=1, n, prime(i));
T(n, k) = my(P= a002110(n), compteur = 0, q=0, y=-1); forprime(p=1, P-1, q = 2*P-p; if(isprime(q), compteur++; if(compteur== k, y=p; y; break))); y
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Jean-Marc Rebert, Jul 24 2015
STATUS
approved