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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A297994 Primes such that the decimal digits in the first half of the number are a nontrivial permutation of the digits in the second half. 1
 107071, 112121, 113131, 115151, 119191, 127217, 127271, 131113, 131311, 134341, 136163, 136361, 137713, 140401, 142421, 143413, 145451, 149419, 149491, 157571, 158581, 161611, 163613, 169691, 170701, 172127, 172217, 172721, 173137, 173713, 178187, 178781, 178817, 179719, 179917, 182821, 187871, 190901, 191119, 191911 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS If the first half of a prime's digits repeat in the second half (thus the number of digits d is even), by being prime they cannot repeat in any visually eye-catching, aesthetically pleasing order, which is frustrating. A d-digit number with an ordered repetition of digits abc...abc... is not prime because it is divisible by 10^(d/2)+1, while a d-digit number with a palindromic arrangement of digits is not prime because it is divisible by 11. Such primes exist for d >= 6, of which at least two digits are distinct, and arranged such that the first half repeat, in a disorderly way, in the second half. For d=6, 265 of the 68906 primes belong here: 10 occur in form aababa, 7 occur in the form abaaab, 10 occur in the form ababaa, 9 occur in the form abbbab, 66 occur in the form abcacb, 58 occur in the form abcbac, 68 occur in the form abcbca, and 37 occur in the form abccab. To find terms for which the first part of the digits is k > 99, where k has qk digits, compute fp = k * 10^qk. Then permute the digits of k. Compute fp + [this permutation]. If it is prime, it is in the sequence. Terms will have 2 * qk digits. See example. - David A. Corneth, Jan 11 2018 LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 EXAMPLE From David A. Corneth, Jan 11 2018: (Start) To see which 6-digit numbers are in the sequence and start with 127, we see that 127 has 3 digits, so we compute 127 * 10^3 = 127000. We then permute the digits of 127 to get {127, 172, 217, 271, 712, 721}. We discard the first one since we know it won't give a prime. For the other five, we compute 127000 + [that permutation]. We see that 127217 and 127271 are prime and hence are in the sequence. (End) PROG (PARI) is(n)=if(!isprime(n) || n == 11, return(0)); my(d=digits(n), t=#d, h=t\2); if(t>2*h, return(0)); vecsort(d[1..h]) == vecsort(d[h+1..t]) \\ Charles R Greathouse IV, Jan 10 2018 (PARI) starts(m) = my(l = List(), d = digits(m), fp = m * 10^#d, np, c); if(m < 100, return(Set(l))); for(i = 1, (#d)! - 1, np = numtoperm(#d, i); c = fp + fromdigits(vector(#d, j, d[np[j]])); if(isprime(c), listput(l, c))); Set(l) \\ David A. Corneth, Jan 11 2018 CROSSREFS Sequence in context: A028466 A157105 A122711 * A237216 A228268 A215783 Adjacent sequences: A297991 A297992 A297993 * A297995 A297996 A297997 KEYWORD nonn,base,easy AUTHOR C Griffiths, Jan 10 2018 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 March 4 04:12 EST 2024. Contains 370522 sequences. (Running on oeis4.)