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.

A046511 Numbers with multiplicative persistence value 2.

Original entry on oeis.org

25, 26, 27, 28, 29, 34, 35, 36, 37, 38, 43, 44, 45, 46, 48, 52, 53, 54, 56, 58, 62, 63, 64, 65, 67, 72, 73, 76, 82, 83, 84, 85, 92, 99, 125, 126, 127, 128, 129, 134, 135, 136, 137, 138, 143, 144, 145, 146, 148, 152, 153, 154, 156, 158, 162, 163, 164, 165, 167, 172
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Examples

			129 -> [ 18 ] -> [ 8 ] = one digit in two steps.
		

Crossrefs

Programs

  • Mathematica
    mpQ[n_]:=Length[NestWhileList[Times@@IntegerDigits[#]&,n,#>9&]]==3; Select[Range[200], mpQ] (* Harvey P. Dale, Apr 12 2014 *)
  • Python
    from math import prod
    def pd(n): return prod(map(int, str(n)))
    def ok(n): return n > 9 and (p := pd(n)) > 9 and pd(p) < 10
    print([k for k in range(173) if ok(k)]) # Michael S. Branicky, Jan 16 2022

A199992 Composite numbers whose multiplicative persistence is 2.

Original entry on oeis.org

25, 26, 27, 28, 34, 35, 36, 38, 44, 45, 46, 48, 52, 54, 56, 58, 62, 63, 64, 65, 72, 76, 82, 84, 85, 92, 99, 125, 126, 128, 129, 134, 135, 136, 138, 143, 144, 145, 146, 148, 152, 153, 154, 156, 158, 162, 164, 165, 172, 176, 182, 183, 184, 185, 192, 215, 216
Offset: 1

Views

Author

Jaroslav Krizek, Nov 13 2011

Keywords

Comments

Complement of A046502 with respect to A046511.

Examples

			125 -> 1 * 2 * 5-> [ 10 ] -> 1 * 0 -> [ 0 ] -> one digit in two steps.
		

Crossrefs

Cf. A046502 (primes whose multiplicative persistence is 2).

Programs

  • Mathematica
    persistence[n_] := Module[{cnt = 0, k = n}, While[k > 9, cnt++; k = Times @@ IntegerDigits[k]]; cnt]; Select[Range[400], ! PrimeQ[#] && persistence[#] == 2 &] (* T. D. Noe, Nov 23 2011 *)
    Select[Range[250],CompositeQ[#]&&Length[NestWhileList[Times@@ IntegerDigits[ #]&,#,#>9&]] == 3&] (* Harvey P. Dale, Apr 10 2015 *)
Showing 1-2 of 2 results.