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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A304243 Numbers that yield a prime when prime(k+2) is inserted after the k-th digit (or prime(1) = 2 before the 1st digit for k=0), for 0 <= k <= number of digits. 5
27, 33, 39, 57, 93, 333, 3747, 5073, 5997, 7239, 10053, 22419, 349731, 425991, 714807, 1719279, 81453303, 406253439, 481683189, 886662423, 2653294371 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The primes to insert are 2 (in front) or 5, 7, 11, 13, ... after the number's first, second, third, ... digit. So there cannot be any 1 digit solution because if 5 is appended this cannot yield a prime. One can show that the terms cannot have more than 21 digits.
The prime 3 is excluded from the strings to insert, because else no term could have more than 2 digits: to be prime with 2 prefixed or with 3 inserted, the number must be congruent to 2 (mod 3), so it cannot be prime with 7 appended or inserted. See also the Rivera link and A304244.
LINKS
Carlos Rivera, Puzzle 791. Interesting consecutive primes, The Prime Puzzles & Problems Connection.
EXAMPLE
a(1) = 27 because 2|27 = 227, 2|5|7 = 257 and 27|7 = 277 are all prime.
Similarly for a(6) = 333, because 2333, 3533, 3373 and 33311 are all prime.
PROG
(PARI) is(n, L=logint(n+!n, 10)+1, d, p, P)={isprime(n+2*10^L) && !for(k=1, L, isprime((d=divrem(n, P=10^(L-k)))[2]+(10^logint(10*p=prime(2+k), 10)*d[1]+p)*P)|| return)}
CROSSREFS
Cf. A304244 (prime(k) is inserted after the k-th digit), A304245 (2 is inserted after the first digit, or prime(k+1) is inserted after the k-th digit for k > 1).
Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended).
Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these).
Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these).
Cf. A158232 (13 is prefixed or appended).
Cf. A164329 (0 is inserted), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits).
Sequence in context: A024796 A025322 A151742 * A309063 A088499 A058902
KEYWORD
nonn,base,fini
AUTHOR
M. F. Hasler, May 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)