OFFSET
1,1
COMMENTS
LINKS
Robert G. Wilson v, Antidiagonals n = 1..13, flattened
EXAMPLE
Array starts
2, 3, 5, 7, 11, 19, 23, ...
13, 17, 31, 37, 71, 73, 79, ...
113, 131, 197, 199, 311, 337, 373, ...
1193, 1931, 3119, 3779, 7793, 7937, 9311, ...
11939, 19391, 19937, 37199, 39119, 71993, 91193, ...
193939, 199933, 319993, 331999, 391939, 393919, 919393, ...
17773937, 39371777, 71777393, 73937177, 77393717, 77739371, 93717773, ...
119139133, 133119139, 139133119, 191391331, 311913913, 331191391, 913311913, ...
...
PROG
(PARI) eva(n) = subst(Pol(n), x, 10)
rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
count_primes(n) = my(d=digits(n), i=0); while(1, if(ispseudoprime(eva(d)), i++); d=rot(d); if(d==digits(n), return(i)))
row(n, terms) = my(i=0); forprime(p=1, , if(count_primes(p)==n, print1(p, ", "); i++); if(i==terms, print(""); break))
array(rows, cols) = for(x=1, rows, row(x, cols))
array(7, 7) \\ print initial 7 rows and 7 columns of array
CROSSREFS
KEYWORD
AUTHOR
Felix Fröhlich, Aug 05 2018
STATUS
approved