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.

Showing 1-3 of 3 results.

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

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

Original entry on oeis.org

1249, 1429, 1487, 1847, 2617, 2671, 4019, 4091, 6217, 6271, 6389, 6709, 6907, 6983, 7481, 7841, 8369, 8963, 9241, 9421, 60337, 60373, 60733
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, in 6709: permutations of odd digits produce 6907, permutations of even digits produce 769, and permutations of even digits and of odd digits produce 967. Hence 6709 and 6907 are in the sequence but 769 and 967 are not since they have leading 0s.
The primes in the sequence cannot contain 5.
No further terms up to 10^10. - Robert Israel, Sep 25 2024

Examples

			1249 is in the sequence since the permutations described in the name produce 9241, 1429 and 9421, which are also prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,Ev,Od,Le,Lo,i,x;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      Ev,Od:= selectremove(t -> L[t]::even,[$1..nops(L)]);
      if nops(convert(L[Ev],set)) < 2 or nops(convert(L[Od],set)) < 2 then return false fi;
      for Le in combinat:-permute(L[Ev]) do
        for Lo in combinat:-permute(L[Od]) do
          x:= add(Le[i]*10^(Ev[i]-1),i=1..nops(Ev)) + add(Lo[i]*10^(Od[i]-1),i=1..nops(Od));
          if not isprime(x) then return false fi
      od od;
      true
    end proc:
    select(filter, [$1000 .. 10^5]); # Robert Israel, Sep 25 2024

Extensions

a(21) to a(23) from Robert Israel, Sep 25 2024

A377564 Primes that contain at least two different even digits and at least two different odd digits such that any permutation of the odd digits and any permutation of the even digits produces a prime. Permutations with leading 0s are disregarded; ie. if permutations of even digits in a prime p produce a number with a leading 0 that is not prime, p is still in the sequence.

Original entry on oeis.org

1249, 1429, 1487, 1847, 2309, 2617, 2671, 2903, 4019, 4091, 6037, 6073, 6217, 6271, 6389, 6709, 6907, 6983, 7481, 7841, 8039, 8093, 8369, 8963, 9241, 9421, 20129, 20177, 20389, 20717, 20771, 20921, 20983, 21013, 21031, 22109, 22901, 23011
Offset: 1

Views

Author

Enrique Navarrete, Nov 01 2024

Keywords

Comments

Relaxed version of A376502. For example, 2309 is not in A376502 since 329 is not prime; however, 2309 is in this sequence since nonprimes with leading 0s such as 329 that result from permutations of even digits are disregarded.
The primes in the sequence cannot contain 5.

Examples

			The primes 80107 and 80701 are in the sequence even if permutations of even digits produce 187, 781, 8107, 8701 which are numbers with leading 0s that are not prime.
		

Crossrefs

Showing 1-3 of 3 results.