The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A274321 Primes equal to a concatenation of a prime and a nonzero palindromic number. 1
 13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 113, 131, 137, 139, 167, 173, 179, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 271, 277, 283, 293, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 419, 431, 433, 439 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS David A. Corneth, Table of n, a(n) for n = 1..4366 PROG (PARI) lista() = {my(l = List(), pal = vector(199, i, a2113(i)), pri = vector(primepi(10000)), t=0); forprime(i=2, 10000, t++; pri[t]=i); for(i = 2, #pal, for(j=1, #pri, p = conc(pal[i], pri[j]); if(#digits(p) < 6, if(isprime(p), listput(l, p))); p = conc(pri[j], pal[i]); if(#digits(p) < 6, if(isprime(p), listput(l, p))))); listsort(l, 1); l}a2113(n)={my(d, i, r); r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11)); n=n-10^(#digits(n\11)); d=digits(n); for(i=1, #d, r[i]=d[i]; r[#r+1-i]=d[i]); sum(i=1, #r, 10^(#r-i)*r[i])} a2113(n)={my(d, i, r); r=vector(#digits(n-10^(#digits(n\11)))+#digits(n\11)); n=n-10^(#digits(n\11)); d=digits(n); for(i=1, #d, r[i]=d[i]; r[#r+1-i]=d[i]); sum(i=1, #r, 10^(#r-i)*r[i])} conc(a, b) = {a * 10^(#digits(b)) + b} \\ David A. Corneth, Jun 18 2016 (PARI) ispal(n) = n && (eval(subst(Polrev(digits(n)), x, 10)) == n); isconc(n) = {d = digits(n); for (k=1, #d, na = n\10^k; nb = n % 10^k; if ((n == eval(concat(Str(na), Str(nb)))) && ((isprime(na) && ispal(nb)) || (isprime(nb) && ispal(na))), return(1)); ); } isok(n) = isprime(n) && isconc(n); \\ Michel Marcus, Jun 20 2016 CROSSREFS Cf. A000040, A002113. Sequence in context: A060343 A080603 A179924 * A316603 A235914 A050716 Adjacent sequences: A274318 A274319 A274320 * A274322 A274323 A274324 KEYWORD nonn,easy,base AUTHOR Giovanni Teofilatto, Jun 18 2016 STATUS approved

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

Last modified February 3 01:16 EST 2023. Contains 360024 sequences. (Running on oeis4.)