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.

Original entry on oeis.org

107, 149, 167, 239, 293, 347, 389, 419, 491, 613, 619, 631, 691, 701, 709, 743, 761, 769, 907, 941, 967, 983, 1009, 1013, 1019, 1031, 1049, 1063, 1091, 1123, 1223, 1229, 1249, 1289, 1321, 1429, 1487, 1499, 1609, 1627, 1669, 1823, 1847, 2113, 2131, 2143, 2237, 2239, 2273, 2293, 2309, 2311, 2341
Offset: 1

Views

Author

Enrique Navarrete, Sep 25 2024

Keywords

Comments

The primes in the sequence cannot contain 5.

Examples

			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.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,oddi,eveni,xeven,i;
     if not isprime(n) then return false fi;
     L:= convert(n,base,10);
     if member(5,L) then return false fi;
     oddi,eveni:= selectremove(t -> L[t]::odd,[$1..nops(L)]);
     if nops(eveni) = 0 or nops(convert(L[oddi],set))<2 then return false fi;
     xeven:= add(10^(i-1)*L[i],i=eveni);
     andmap(t -> isprime(xeven+add(10^(oddi[i]-1)*L[t[i]],i=1..nops(oddi))), combinat:-permute(oddi))
    end proc:
    select(filter, [seq(i,i=3..10000,2)]); # Robert Israel, Oct 23 2024