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.

A376501 Primes that contain at least two different even digits where any permutation of the even digits leaving the odd digits fixed produces a prime. See comments for the treatment of 0.

Original entry on oeis.org

241, 281, 283, 401, 421, 461, 463, 467, 601, 607, 641, 643, 647, 683, 809, 821, 823, 863, 1021, 1049, 1061, 1069, 1201, 1249, 1283, 1409, 1429, 1487, 1601, 1609, 1823, 1847, 2011, 2027, 2039, 2161, 2207, 2347, 2389, 2411, 2417, 2441, 2459, 2473, 2503, 2543, 2617, 2657, 2671, 2677, 2699, 2707
Offset: 1

Views

Author

Enrique Navarrete, Sep 25 2024

Keywords

Comments

Primes for which permutations described in the name produce primes with leading 0s are in the sequence but the generated primes with leading 0s are not. For example, a transposition in 401 produces 041, hence 401 is in the sequence but 41 is not.

Examples

			2027, 2207 are primes and 227 is prime with a leading 0 generated by permuting even digits in either 2027 or 2207.  Hence 2027 and 2207 are in the sequence but 227 is not due to the leading 0.
6067, 6607 are primes but 667 generated by permuting even digits in either 6067 or 6607 is not prime, hence by name, neither number is in the sequence.
		

Crossrefs

Programs

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