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.

A332261 Numbers that yield a prime whenever a '4' is inserted between any two digits.

This page as a plain text file.
%I A332261 #12 Sep 08 2022 08:46:25
%S A332261 0,1,2,3,4,5,6,7,8,9,19,21,37,39,43,49,51,57,61,63,67,73,91,97,109,
%T A332261 129,147,153,159,171,187,199,211,223,237,241,247,259,267,333,349,357,
%U A332261 363,409,421,423,441,447,457,463,493,517,537,541,543,549,571,579,583,627,649,681
%N A332261 Numbers that yield a prime whenever a '4' is inserted between any two digits.
%C A332261 For single-digit terms, the condition is voidly satisfied: nothing can be inserted.
%e A332261 10281 is in this sequence because 1(4)0281, 10(4)281, 102(4)81, and 1028(4)1 are all prime.
%o A332261 (Magma) a:=[]; for k in [1..700] do s:=0; v:=Reverse(Intseq(k)); for i in [1..#v-1] do vv:=v[1..i] cat [4] cat v[i+1..#v]; p:=Seqint(Reverse(vv)); if not IsPrime(p) then break; else s:=s+1; end if; end for;  if s eq #v-1 then Append(~a,k); end if; end for; [0] cat a; // _Marius A. Burtea_, Feb 09 2020
%Y A332261 Cf. A164329, A304246, A304247, A304248, A050714.
%K A332261 nonn,base
%O A332261 1,3
%A A332261 _Eric Fox_, Feb 08 2020