A069604 a(1) = 1; for n>1, a(n) = smallest number with all odd digits giving a prime in concatenation with the previous terms.
1, 1, 3, 11, 1, 3, 3, 53, 13, 39, 9, 3, 399, 11, 9, 133, 3, 11, 51, 111, 13, 53, 31, 3, 173, 1, 317, 519, 579, 1, 573, 357, 5111, 39, 51, 73, 3317, 1977, 5173, 579, 357, 359, 9, 57, 3991, 959, 951, 7, 111, 1959, 39, 191, 3357, 3151, 3137, 577, 117, 1353, 951, 153, 99
Offset: 1
Examples
a(5) = 1 and the number 113111 is a prime.
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ Union[ Mod[ IntegerDigits[k], 2]] != {1} || !PrimeQ[ FromDigits[ Join[ Flatten[c], IntegerDigits[k]]]], k = k + 1]; k]; Table[ a[n], {n, 61}] (* corrected by Jason Yuen, Jun 22 2025 *)
Extensions
Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003