OFFSET
1,1
COMMENTS
A 2-digit number 10a + b is in the sequence if |a - b| = 2 (or 0) and 10b + a is prime.
EXAMPLE
The number 35 is in the sequence because if the digit 3 is moved three places to the left and the digit 5 is moved five places to the left, this results in the number 53 (three place to the left from the initial position, which does not matter), and 53 is prime.
PROG
(PARI) is_A296236(n, d=matdiagonal(n=digits(n)), v=[1..#n]+n)={!n||forvec(s=vector(#n, i, [0, 1]), vecmax(p=v-2*s*d)-vecmin(p)==#p-1&&#p==#Set(p)&&isprime(sum(i=1, #p, 10^(vecmax(p)-p[i])*n[i]))&&return(1))}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Dec 09 2017
STATUS
approved