[go: up one dir, main page]

login
A090924
Least nonzero number having the same number of digits as n which when added to n yields a prime.
0
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, 10, 13, 12, 11, 10, 11, 10, 13, 12, 11, 10, 15, 14, 13, 12, 11, 10, 15, 14, 13, 12, 11, 10, 11, 10, 15, 14, 13, 12, 11, 10, 13, 12, 11, 10, 11, 10, 15, 14, 13, 12, 11, 10, 13, 12, 11
OFFSET
1,3
EXAMPLE
a(29) = 12 and not 8 though 29+8 =37 is also a prime.
a(124) = 103 as 103 is the least three digit number such that 124 +103 = 227 is prime.
MATHEMATICA
lnzn[n_]:=Module[{k=10^(IntegerLength[n]-1)}, While[!PrimeQ[n+k], k++]; k]; Array[lnzn, 80] (* Harvey P. Dale, Jun 17 2012 *)
CROSSREFS
Sequence in context: A341827 A138567 A103530 * A247074 A160595 A105778
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Dec 21 2003
EXTENSIONS
More terms from David Wasserman, Feb 15 2006
STATUS
approved