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.

A376500 Primes that contain at least one even digit and two different odd digits where any permutation of the odd digits leaving the even digits fixed produces a prime.

This page as a plain text file.
%I A376500 #17 Oct 23 2024 16:32:26
%S A376500 107,149,167,239,293,347,389,419,491,613,619,631,691,701,709,743,761,
%T A376500 769,907,941,967,983,1009,1013,1019,1031,1049,1063,1091,1123,1223,
%U A376500 1229,1249,1289,1321,1429,1487,1499,1609,1627,1669,1823,1847,2113,2131,2143,2237,2239,2273,2293,2309,2311,2341
%N A376500 Primes that contain at least one even digit and two different odd digits where any permutation of the odd digits leaving the even digits fixed produces a prime.
%C A376500 The primes in the sequence cannot contain 5.
%H A376500 Robert Israel, <a href="/A376500/b376500.txt">Table of n, a(n) for n = 1..10000</a>
%e A376500 1013 is a term since the permutations of the odd digits that leave the even digits fixed give 1031 and 3011, which are also prime.
%p A376500 filter:= proc(n) local L,oddi,eveni,xeven,i;
%p A376500  if not isprime(n) then return false fi;
%p A376500  L:= convert(n,base,10);
%p A376500  if member(5,L) then return false fi;
%p A376500  oddi,eveni:= selectremove(t -> L[t]::odd,[$1..nops(L)]);
%p A376500  if nops(eveni) = 0 or nops(convert(L[oddi],set))<2 then return false fi;
%p A376500  xeven:= add(10^(i-1)*L[i],i=eveni);
%p A376500  andmap(t -> isprime(xeven+add(10^(oddi[i]-1)*L[t[i]],i=1..nops(oddi))), combinat:-permute(oddi))
%p A376500 end proc:
%p A376500 select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Oct 23 2024
%Y A376500 Cf. A000040, A003459, A376501, A376502.
%K A376500 nonn,base
%O A376500 1,1
%A A376500 _Enrique Navarrete_, Sep 25 2024