%I #6 Dec 05 2013 19:56:44
%S 1,1,2,1,2,1,4,3,2,13,12,11,10,15,14,13,12,11,10,11,10,15,14,13,12,11,
%T 10,13,12,11,10,11,10,13,12,11,10,15,14,13,12,11,10,15,14,13,12,11,10,
%U 11,10,15,14,13,12,11,10,13,12,11,10,11,10,15,14,13,12,11,10,13,12,11
%N Least nonzero number having the same number of digits as n which when added to n yields a prime.
%e a(29) = 12 and not 8 though 29+8 =37 is also a prime.
%e a(124) = 103 as 103 is the least three digit number such that 124 +103 = 227 is prime.
%t lnzn[n_]:=Module[{k=10^(IntegerLength[n]-1)},While[!PrimeQ[n+k],k++];k]; Array[lnzn,80] (* _Harvey P. Dale_, Jun 17 2012 *)
%K base,easy,nonn
%O 1,3
%A _Amarnath Murthy_, Dec 21 2003
%E More terms from _David Wasserman_, Feb 15 2006
|