login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256481 Smallest prime obtained by appending a number with identical digits to n or 0 if no such prime exists. 2
2, 11, 23, 31, 41, 53, 61, 71, 83, 97, 101, 113, 127, 131, 149, 151, 163, 173, 181, 191, 2011, 211, 223, 233, 241, 251, 263, 271, 281, 293, 307, 311, 3299, 331, 347, 353, 367, 373, 383, 397, 401, 419, 421, 431, 443, 457, 461, 479, 487, 491, 503, 511111, 521, 5333 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

For n <= 15392, a(n) = 0 if and only if n = 6930. Conjecture: if a(n) = 0, then n is divisible by 3. Conjecture verified for n <= 10^6.  a(n) = 0 for n = 6930, 50358, 56574, 72975.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 0..6068

Chai Wah Wu, On a conjecture regarding primality of numbers constructed from prepending and appending identical digits, arXiv:1503.08883 [math.NT], 2015.

PROG

(Python)

from gmpy2 import mpz, digits, is_prime

def A256481(n, limit=2000):

....if n in (6930, 50358, 56574, 72975):

........return 0

....if n == 0:

........return 2

....sn = str(n)

....for i in range(1, limit+1):

........for j in range(1, 10, 2):

............si = digits(j, 10)*i

............p = mpz(sn+si)

............if is_prime(p):

................return int(p)

....else:

........return 'search limit reached.'

CROSSREFS

Cf. A090287, A256480, A030665.

Sequence in context: A106927 A158189 A218255 * A085745 A106856 A045387

Adjacent sequences:  A256478 A256479 A256480 * A256482 A256483 A256484

KEYWORD

nonn,base

AUTHOR

Chai Wah Wu, Mar 31 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 15 22:19 EDT 2019. Contains 324145 sequences. (Running on oeis4.)