A120805 Primes with consecutive digits.
2, 3, 5, 7, 23, 43, 67, 89, 109, 4567, 10987, 76543, 78901, 678901, 23456789, 45678901, 9012345678901, 789012345678901, 56789012345678901234567890123, 90123456789012345678901234567, 10987654321098765432109876543210987
Offset: 1
Programs
-
Mathematica
f[n_] := Block[{u = Range@n, d = Reverse@ Range@n, t = Table[1, {n}]}, Select[ Drop[ Union@ Flatten@ Table[ FromDigits /@ Mod[{u, d} + {i*t, i*t}, 10], {i, 10}], 2], PrimeQ@# &]]; Array[f, 35] // Flatten
Comments