A118697 Semiprimes with consecutive digits.
4, 6, 9, 10, 21, 34, 65, 87, 123, 321, 543, 789, 901, 1234, 4321, 8765, 34567, 56789, 98765, 654321, 876543, 901234, 1234567, 7654321, 7890123, 10987654, 21098765, 567890123, 12345678901, 54321098765, 76543210987, 87654321098
Offset: 1
Crossrefs
Cf. A001358.
Programs
-
Mathematica
spQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; 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], spQ@# &]]; Array[f, 13] // Flatten (* Robert G. Wilson v, Jun 16 2006 *)
Extensions
More terms from Robert G. Wilson v, Jun 16 2006
Comments