A174583 a(k) is the least n such that the concatenation (n - k)"n is a prime number, for k >= 0.
1, 3, 3, 7, 7, 17, 7, 9, 9, 11, 13, 17, 13, 19, 17, 19, 21, 21, 23, 27, 27, 23, 43, 33, 41, 27, 27, 29, 31, 33, 31, 33, 39, 47, 37, 39, 37, 39, 39, 41, 51, 47, 47, 61, 47, 49, 49, 53, 49, 51, 51, 59, 57, 57, 61, 57, 57, 61, 63, 63, 71, 63, 63, 67, 67, 77, 67, 69, 77, 71, 73, 77
Offset: 0
Examples
11 = prime(5) = (1 - 0)"1, thus a(0) = 1. 23 = prime(9) = (3 - 1)"3, thus a(1) = 3. 13 = prime(6) = (3 - 2)"3, thus a(2) = 3. 139 = prime(34) = (39 - 38)"39, thus a(38) = 39. 9109 = prime(1130) = (109 - 100)"109, thus a(100) = 109.
Programs
-
Maple
mycat := (k, n) -> parse(cat(convert(n - k, string), convert(n, string))): sol := (k, n) -> isprime(mycat(k, n)): a := proc(k) local n; for n from k + 1 while not sol(k, n) do od; n end: seq(a(k), k = 0..71); # Peter Luschny, Sep 20 2024
Extensions
Edited, offset set to 0 and a(71) corrected by Peter Luschny, Sep 20 2024
Comments