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.

A304245 Numbers that yield a prime when '2' is inserted between the first and second digit, or prime(k+1) is inserted after the k-th digit for any k > 1, k < number of digits.

This page as a plain text file.
%I A304245 #10 Feb 18 2019 02:07:59
%S A304245 0,1,2,3,4,5,6,7,8,9,17,23,27,29,41,51,53,77,81,83,87,89,99,101,113,
%T A304245 129,149,159,179,191,203,213,221,237,251,267,269,273,281,287,293,297,
%U A304245 321,329,357,359,401,417,419,429,441,461,471,497,509,531,561,581,603,611,663,669,687,699,707,711
%N A304245 Numbers that yield a prime when '2' is inserted between the first and second digit, or prime(k+1) is inserted after the k-th digit for any k > 1, k < number of digits.
%C A304245 The primes to be inserted are: 2 between 1st and 2nd digit, or 5 between 2nd and 3rd digit, or 7 between 3rd and 4th digit, etc.
%C A304245 The prime 3 is excluded because it would restrict the terms to have no more than 4 digits; see A304244 and the Rivera link in A304243.
%C A304245 The two terms 27 and 87 are the only numbers (with more than one digit) for which 2, 5 or 7 can be inserted between any two digits to yield a prime: all of 227, 257, 277, 827, 857 an 877 are prime. There is no other such number with more than 2 digits.
%H A304245 M. F. Hasler, <a href="/A304245/b304245.txt">Table of n, a(n) for n = 1..348</a> (all terms < 10^7).
%e A304245 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 A304245 17 is in the sequence because 127 is prime.
%e A304245 101 is in the sequence because 1201 and 1051 are prime.
%o A304245 (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+(k>1)),10)*d[1]+p)*P)|| return)}
%Y A304245 Cf. A304243 (2 is prefixed or prime(k+2) is inserted after the k-th digit), A304244 (prime(k) is inserted after the k-th digit) .
%Y A304245 Cf. A068679 (1 is prefixed, appended or inserted anywhere), A069246 (primes among these), A068673 (1 is prefixed, or appended).
%Y A304245 Cf. A158594 (3 is prefixed, appended or inserted anywhere), A215419 (primes among these).
%Y A304245 Cf. A069832 (7 is prefixed, appended or inserted anywhere), A215420 (primes among these), A068677 (7 is prefixed or appended).
%Y A304245 Cf. A069833 (9 is prefixed, appended or inserted anywhere), A215421 (primes among these).
%Y A304245 Cf. A158232 (13 is prefixed or appended).
%Y A304245 Cf. A164329 (0 is inserted), A216169 (subset of composite terms), A215417 (subset of primes), A159236 (0 is inserted between all digits).
%K A304245 nonn,base,fini
%O A304245 1,3
%A A304245 _M. F. Hasler_, May 21 2018