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.

A304244 Numbers that yield a prime when prime(k) is inserted after the k-th digit, for any k >= 1, k < number of digits.

This page as a plain text file.
%I A304244 #10 Feb 17 2019 23:38:26
%S A304244 0,1,2,3,4,5,6,7,8,9,17,23,27,29,41,51,53,77,81,83,87,89,99,101,149,
%T A304244 191,239,251,287,317,353,359,419,473,497,509,527,533,611,677,743,797,
%U A304244 809,821,887,893,941,983,1037,1043,1277,1421,1841,1853,1973,1979,2543
%N A304244 Numbers that yield a prime when prime(k) is inserted after the k-th digit, for any k >= 1, k < number of digits.
%C A304244 The primes to insert are: 2 (after the first digit), 3 (after the second digit, if there are at least three), etc.
%C A304244 Inspired by A304243 and analog sequences given in cross-references.
%C A304244 The sequence is finite: if insertion of 3 after the second digit yields a prime, then the sum of digits must be congruent to 1 or 2 (mod 3). However, insertion of 2 after the first digit also must yield a prime, so only the second case is possible. But then, insertion of a digit 7 cannot yield a prime, so no term can have 5 digits or more. (Sequence A304243 circumvents this restriction by excluding 3 from the primes to insert, but it is still finite for a similar reason occurring later.)
%H A304244 M. F. Hasler, <a href="/A304244/b304244.txt">Table of n, a(n) for n = 1..100</a> (complete sequence).
%e A304244 The 1-digit numbers 0..9 are included since the condition is voidly satisfied: Nothing can be inserted, therefore each of the resulting numbers is prime.
%e A304244 17 is in the sequence because 127 is prime.
%e A304244 101 is in the sequence because 1201 and 1031 are prime.
%o A304244 (PARI) is(n,L=logint(n+!n,10)+1,d,p,P)={!for(k=1,L-1, isprime((d=divrem(n,P=10^(L-k)))[2]+(10^logint(10*p=prime(k),10)*d[1]+p)*P)|| return)}
%Y A304244 Cf. A304243 (2 is prefixed or prime(k+2) is inserted after the k-th digit).
%Y A304244 Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended).
%Y A304244 Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these).
%Y A304244 Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
%Y A304244 Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these).
%Y A304244 Cf. A158232 (13 is prefixed or appended).
%Y A304244 Cf. A164329 (0 is inserted), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits).
%K A304244 nonn,base,fini,full
%O A304244 1,3
%A A304244 _M. F. Hasler_, May 21 2018