OFFSET
2,1
LINKS
EXAMPLE
T(5, 3) = 4, because prime(5) = 11 and 11+2*3 = 17, 17+2*3 = 23, 23+2*3 = 29 are all prime, but 29+2*3 = 35 is composite, so 4 terms in the arithmetic progression of primes with common difference 6 starting at 11 are prime.
Table starts
3, 3, 1, 3, 3, 1, 3, 2
2, 1, 5, 2, 1, 5, 2, 1
1, 2, 3, 1, 2, 4, 1, 2
2, 1, 4, 2, 1, 2, 1, 1
1, 2, 2, 1, 2, 1, 1, 2
2, 1, 3, 1, 1, 4, 2, 1
PROG
(PARI) max_prog_len(initialp, diff) = my(i=1, p=initialp); while(ispseudoprime(p+diff), p=p+diff; i++); i
table(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(max_prog_len(prime(n), 2*k), ", ")); print(""))
table(6, 8) \\ print 6x8 table
CROSSREFS
KEYWORD
AUTHOR
Felix Fröhlich, Nov 26 2016
STATUS
approved