A032662 a(n) is the least k such that k concatenated with k + n is prime.
1, 2, 1, 4, 3, 12, 1, 2, 1, 2, 3, 6, 1, 6, 3, 4, 5, 4, 5, 8, 7, 2, 21, 10, 17, 2, 1, 2, 3, 4, 1, 2, 7, 14, 3, 4, 1, 2, 1, 2, 11, 6, 5, 18, 3, 4, 3, 6, 1, 2, 1, 8, 5, 4, 7, 2, 1, 4, 5, 4, 11, 2, 1, 4, 3, 12, 1, 2, 9, 2, 3, 6, 1, 8, 9, 2, 3, 6, 1, 2, 1, 2, 5, 4, 929, 6, 3, 4, 5, 12, 1, 2, 1
Offset: 0
Examples
a(22) = 21: the concatenation of 21 and 21 + 22 = 43 is 2143 and this is a prime.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Crossrefs
Cf. A032663.
Programs
-
Maple
tcat:= (a,b) -> a*10^(1+ilog10(b))+b: f:= proc(n) local k; for k from 1 + (n mod 2) by 2 do if isprime(tcat(k,k+n)) then return k fi od; end proc: map(f, [$0..100]); # Robert Israel, Sep 05 2024
Extensions
Edited by Robert Israel, Sep 05 2024
Comments