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.

A224402 Composite numbers that become prime when their digits are put in nonincreasing order.

This page as a plain text file.
%I A224402 #11 Apr 23 2013 11:14:58
%S A224402 14,16,34,35,38,112,118,119,121,124,125,128,133,134,136,142,143,145,
%T A224402 146,152,154,164,166,175,176,182,188,194,214,215,218,314,316,334,341,
%U A224402 343,344,346,356,358,361,364,365,368,374,377,385,386,388,395,398,412,413
%N A224402 Composite numbers that become prime when their digits are put in nonincreasing order.
%C A224402 Because any number ending in zero is composite, the sequence experiences gaps of at least order O(a(n))-1 between changes in the most significant digit.
%H A224402 Christian N. K. Anderson, <a href="/A224402/b224402.txt">Table of n, a(n) for n = 1..10000</a>
%e A224402 194=2*97, but 941 is prime.
%t A224402 Select[Range[500], ! PrimeQ[#] && PrimeQ[FromDigits[Reverse[Sort[IntegerDigits[#]]]]] &] (* _T. D. Noe_, Apr 05 2013 *)
%o A224402 (R) j=1; y=c(); library(gmp)
%o A224402 while(length(y)<1000) {
%o A224402 if(isprime((j=j+1))==0) {
%o A224402 x=sort(as.numeric(strsplit(as.character(j),spl="")[[1]]),decr=T)
%o A224402 if(isprime(paste(x,collapse=""))>0) y=c(y,j)
%o A224402 }
%o A224402 }
%Y A224402 Subset of A007935.
%Y A224402 Cf. A068653, A076055, A224400.
%K A224402 nonn,base
%O A224402 1,1
%A A224402 _Christian N. K. Anderson_ and _Kevin L. Schwartz_, Apr 05 2013