cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A304243 #21 Nov 02 2023 14:19:04
%S A304243 27,33,39,57,93,333,3747,5073,5997,7239,10053,22419,349731,425991,
%T A304243 714807,1719279,81453303,406253439,481683189,886662423,2653294371
%N 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.
%C A304243 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.
%C A304243 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.
%H A304243 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_791.htm">Puzzle 791. Interesting consecutive primes</a>, The Prime Puzzles & Problems Connection.
%e A304243 a(1) = 27 because 2|27 = 227, 2|5|7 = 257 and 27|7 = 277 are all prime.
%e A304243 Similarly for a(6) = 333, because 2333, 3533, 3373 and 33311 are all prime.
%o A304243 (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)}
%Y A304243 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).
%Y A304243 Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended).
%Y A304243 Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these).
%Y A304243 Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
%Y A304243 Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these).
%Y A304243 Cf. A158232 (13 is prefixed or appended).
%Y A304243 Cf. A164329 (0 is inserted), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits).
%K A304243 nonn,base,fini
%O A304243 1,1
%A A304243 _M. F. Hasler_, May 10 2018