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-2 of 2 results.

A028843 Numbers whose iterated product of digits is a prime.

Original entry on oeis.org

2, 3, 5, 7, 12, 13, 15, 17, 21, 26, 31, 34, 35, 37, 43, 51, 53, 57, 62, 71, 73, 75, 112, 113, 115, 117, 121, 126, 131, 134, 135, 137, 143, 151, 153, 157, 162, 171, 173, 175, 211, 216, 223, 232, 261, 278, 279, 287, 297, 299, 311, 314, 315, 317, 322, 341, 351, 355
Offset: 1

Views

Author

Keywords

Examples

			For 53, the product of digits is 5 * 3 = 15, iterated to 1 * 5 = 5, which is a prime, so 53 is in the sequence.
For 54, the product of digits is 5 * 4 = 20, iterated to 2 * 0 = 0, which is not prime, so 54 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    iterDigitProd[n_] := NestWhile[Times@@IntegerDigits[#] &, n, # > 9 &]; Select[Range[355], PrimeQ[iterDigitProd[#]] &] (* Jayanta Basu, Jun 02 2013 *)
  • Scala
    def iterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => iterDigitProd(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)
    }
    (1 to 400).filter(n => List(2, 3, 5, 7).contains(iterDigitProd(n))) // Alonso del Arte, Apr 11 2020

Extensions

More terms from Patrick De Geest, Jun 15 1999
Corrected by Franklin T. Adams-Watters, Jan 17 2007

A333960 Numbers k with digits in nondecreasing order and each digit > 1 such that the iterated product of digits of k is a prime and k is the least positive integer with this property and its product of digits.

Original entry on oeis.org

2, 3, 5, 7, 26, 35, 37, 57, 355, 278, 279, 359, 299, 557, 389, 579, 999, 2699, 2799, 5579, 5777, 3889, 4788, 3999, 35559, 26999, 29999, 47888, 277777, 357799, 267999, 557779, 288999, 2777778, 689999, 779999, 2688888, 7777888, 26777777, 6788899, 27777899, 47778899, 67788888, 77788888, 2677777889, 7777777788, 26888888889
Offset: 1

Views

Author

David A. Corneth, Apr 11 2020

Keywords

Comments

Primitive sequence to A333955.

Examples

			26 is in the sequence. It has iterated product of digits 2 which is prime and its digits are in nondecreasing order and all digits are > 1 and 26 is the least integer with these properties having product of digits 12.
34 is not in the sequence. It has all properties mentioned above except it has product of digits 12 where 34 isn't the least positive integer with those properties and product of digits 12.
		

Crossrefs

Showing 1-2 of 2 results.