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.

This page as a plain text file.
%I A376501 #15 Oct 23 2024 16:27:32
%S A376501 241,281,283,401,421,461,463,467,601,607,641,643,647,683,809,821,823,
%T A376501 863,1021,1049,1061,1069,1201,1249,1283,1409,1429,1487,1601,1609,1823,
%U A376501 1847,2011,2027,2039,2161,2207,2347,2389,2411,2417,2441,2459,2473,2503,2543,2617,2657,2671,2677,2699,2707
%N 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.
%C A376501 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.
%H A376501 Robert Israel, <a href="/A376501/b376501.txt">Table of n, a(n) for n = 1..10000</a>
%e A376501 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.
%e A376501 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.
%p A376501 filter:= proc(n) local L,oddi,eveni,xodd,i;
%p A376501  if not isprime(n) then return false fi;
%p A376501  L:= convert(n,base,10);
%p A376501  oddi,eveni:= selectremove(t -> L[t]::odd,[$1..nops(L)]);
%p A376501  if nops(convert(L[eveni],set))<2 then return false fi;
%p A376501  xodd:= add(10^(i-1)*L[i],i=oddi);
%p A376501  andmap(t -> isprime(xodd+add(10^(eveni[i]-1)*L[t[i]],i=1..nops(eveni))), combinat:-permute(eveni))
%p A376501 end proc:
%p A376501 select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Oct 23 2024
%Y A376501 Cf. A000040, A003459, A376500, A376502.
%K A376501 nonn,base
%O A376501 1,1
%A A376501 _Enrique Navarrete_, Sep 25 2024