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.

A028843 Numbers whose iterated product of digits is a prime.

This page as a plain text file.
%I A028843 #30 Jun 20 2021 02:27:29
%S A028843 2,3,5,7,12,13,15,17,21,26,31,34,35,37,43,51,53,57,62,71,73,75,112,
%T A028843 113,115,117,121,126,131,134,135,137,143,151,153,157,162,171,173,175,
%U A028843 211,216,223,232,261,278,279,287,297,299,311,314,315,317,322,341,351,355
%N A028843 Numbers whose iterated product of digits is a prime.
%H A028843 Vincenzo Librandi, <a href="/A028843/b028843.txt">Table of n, a(n) for n = 1..1000</a>
%e A028843 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.
%e A028843 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.
%t A028843 iterDigitProd[n_] := NestWhile[Times@@IntegerDigits[#] &, n, # > 9 &]; Select[Range[355], PrimeQ[iterDigitProd[#]] &] (* _Jayanta Basu_, Jun 02 2013 *)
%o A028843 (Scala) def iterDigitProd(n: Int): Int = n.toString.length match {
%o A028843   case 1 => n
%o A028843   case _ => iterDigitProd(n.toString.toCharArray.map(_ - 48).scanRight(1)(_ * _).head)
%o A028843 }
%o A028843 (1 to 400).filter(n => List(2, 3, 5, 7).contains(iterDigitProd(n))) // _Alonso del Arte_, Apr 11 2020
%Y A028843 Cf. A003001, A028835, A028842, A031347, A333955.
%K A028843 nonn,base
%O A028843 1,1
%A A028843 _N. J. A. Sloane_
%E A028843 More terms from _Patrick De Geest_, Jun 15 1999
%E A028843 Corrected by _Franklin T. Adams-Watters_, Jan 17 2007