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.

Original entry on oeis.org

14, 16, 34, 35, 38, 112, 118, 119, 121, 124, 125, 128, 133, 134, 136, 142, 143, 145, 146, 152, 154, 164, 166, 175, 176, 182, 188, 194, 214, 215, 218, 314, 316, 334, 341, 343, 344, 346, 356, 358, 361, 364, 365, 368, 374, 377, 385, 386, 388, 395, 398, 412, 413
Offset: 1

Views

Author

Keywords

Comments

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.

Examples

			194=2*97, but 941 is prime.
		

Crossrefs

Subset of A007935.

Programs

  • Mathematica
    Select[Range[500], ! PrimeQ[#] && PrimeQ[FromDigits[Reverse[Sort[IntegerDigits[#]]]]] &] (* T. D. Noe, Apr 05 2013 *)
  • R
    j=1; y=c(); library(gmp)
    while(length(y)<1000) {
    if(isprime((j=j+1))==0) {
    x=sort(as.numeric(strsplit(as.character(j),spl="")[[1]]),decr=T)
    if(isprime(paste(x,collapse=""))>0) y=c(y,j)
    }
    }