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.

A225193 Composite numbers such that every non-identity permutation gives a prime.

This page as a plain text file.
%I A225193 #12 Dec 29 2023 10:57:00
%S A225193 14,16,20,30,32,34,35,38,50,70,74,76,91,92,95,98,110,118,119,133,772,
%T A225193 775,778,779,1118,3337,7771,77779
%N A225193 Composite numbers such that every non-identity permutation gives a prime.
%e A225193 772 is a member since both 727 and 277 are primes.
%t A225193 t={}; Do[p=Permutations[IntegerDigits[n]]; c=Length[p]; cn=Length[Select[Table[FromDigits[k],{k,p}], PrimeQ]]; If[!PrimeQ[n] && c>1 && cn==c-1, AppendTo[t,n]], {n,10,100000}]; t
%o A225193 (Python)
%o A225193 from sympy import isprime
%o A225193 from itertools import count, islice, permutations
%o A225193 def agen(): yield from (k for k in count(1) if len(set(s:=str(k)))!=1 and not isprime(k) and all((t:=int("".join(m)))==k or isprime(t) for m in permutations(s)))
%o A225193 print(list(islice(agen(), 28))) # _Michael S. Branicky_, Dec 29 2023
%Y A225193 Cf. A003459, A068652, A068653.
%K A225193 nonn,base
%O A225193 1,1
%A A225193 _Jayanta Basu_, May 01 2013