OFFSET
1,1
COMMENTS
To explain "read vertically in the same direction": let b, c be the last two digits of a(n-1), and d, e the first two digits of a(n), then either both of 10b + d and 10c + e, or both of 10d + a and 10e + b must be primes > 9.
We are tempted to conjecture that this sequence contains all integers > 10 which don't have '0' as second or one of the last two digits.
LINKS
Éric Angelini, Prime bayonets, personal web site "Cinquante signes" on blogspot.com, May 03 2022.
EXAMPLE
a(2) together with a(3) form the two 2-digit primes 11 and 23, when we write
a(2) = 13 and read the two last columns
a(3) = 12 both from bottom to top.
a(11) = 21 is followed by 37 and not 34 since we cannot write
a(11) = 21 and read one column downwards to get the prime 23
next = 34 and the other column upwards to get the prime 41.
PROG
(PARI) u=[a=11]; (ok(x, y)=isprime(x[1]*10+y[1])&&isprime(x[2]*10+y[2])); vector(99, n, if(a>u[1]+1, u=setunion(u, [a]), u[1]=a; while(#u>1 && u[2]==u[1]+1+(u[1]%10==9), u=u[^1])); a=digits(a)[-2..-1]; my(k=u[1], d); n>1&& until(k++%10 && k%100>9&& !setsearch(u, k) && (d=divrem(k\10^logint(k\10, 10), 10))[2]&& (ok(a, d)||ok(d, a)), ); a=k)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler and Eric Angelini, May 03 2022
STATUS
approved