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.

Previous Showing 41-50 of 72 results. Next

A070560 a(0) = 1; for n > 0, a(n) = (fecundity of n) + 2.

Original entry on oeis.org

1, 12, 11, 11, 10, 3, 10, 9, 9, 8, 2, 10, 9, 9, 8, 3, 8, 8, 7, 5, 2, 7, 7, 6, 7, 4, 6, 7, 4, 5, 2, 5, 6, 4, 4, 3, 5, 5, 5, 4, 2, 6, 3, 4, 3, 5, 3, 4, 3, 6, 2, 7, 5, 10, 4, 3, 6, 4, 4, 3, 2, 4, 4, 7, 7, 4, 3, 3, 9, 7, 2, 6, 6, 4, 3, 3, 8, 7, 5, 4, 2, 6, 4, 3, 9, 5, 5, 5, 6, 5, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until reach 0; fecundity = number of steps - 1.

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 -> 102 -> 0 has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n]; f[0] = 1; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A070561 a(0) = 0; for n > 0, a(n) = (fecundity of n) + 1.

Original entry on oeis.org

0, 11, 10, 10, 9, 2, 9, 8, 8, 7, 1, 9, 8, 8, 7, 2, 7, 7, 6, 4, 1, 6, 6, 5, 6, 3, 5, 6, 3, 4, 1, 4, 5, 3, 3, 2, 4, 4, 4, 3, 1, 5, 2, 3, 2, 4, 2, 3, 2, 5, 1, 6, 4, 9, 3, 2, 5, 3, 3, 2, 1, 3, 3, 6, 6, 3, 2, 2, 8, 6, 1, 5, 5, 3, 2, 2, 7, 6, 4, 3, 1, 5, 3, 2, 8, 4, 4, 4, 5, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until the product of digits reaches 0; fecundity = number of steps - 1.
Equivalently, with A230099 = f, a(n) is the number k of distinct values that are obtained with iterations: n, f(n), f(f(n)), f(f(f(n))), ... until a term of this sequence contains a 0. - Bernard Schott, Jul 31 2023

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 ->102 -> 102 -> ... has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 1; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Formula

a(n) = 1 iff n positive is in A011540. - Bernard Schott, Jul 31 2023

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A132161 Smallest number which has multiplicative persistence n in base 16.

Original entry on oeis.org

1, 16, 40, 62, 95, 187, 683, 15838, 3644381
Offset: 0

Views

Author

R. J. Mathar, Nov 02 2007

Keywords

Comments

See A003001 for base 10 and A125582 for base 12. a(3), a(4),...,a(8) are A064867(16), A064868(16),...,A064872(16).

Extensions

a(8) drawn from A064872 by Michel Marcus, Jul 23 2013

A133503 Numbers for which iteration of the powertrain map of A133500 takes a record number of steps to converge.

Original entry on oeis.org

0, 10, 24, 26, 39, 3573, 26899, 68697, 497699, 3559595, 555959597395
Offset: 1

Views

Author

J. H. Conway and N. J. A. Sloane, Dec 03 2007, Dec 04 2007, Dec 18 2007

Keywords

Comments

Where records occur in A133501.
This sequence is almost certainly finite.
The number 31395559595973 takes 16 steps to converge and may be the next term. It may also be the last term.
The next term is > 10^7 (and <= 31395559595973).

Examples

			The smallest number that takes 13 steps to converge is 497699, for which the trajectory is 497699 -> 11948427342082473984 -> 23554621393597287150649344 -> 2030652382202824185652602470400000 -> 101921587200000000 -> 38281250 -> 1679616 -> 1452729852 -> 1318305830625 -> 70312500 -> 96 -> 531441 -> 500 -> 0.
The smallest number that takes 15 steps to converge is 3559595 -> for which the trajectory is 3559595 -> 4634857177734375 -> 23122964691361341376561152 -> 1194842734208247398400000000 -> 23554621393597287150649344 -> 2030652382202824185652602470400000 -> 101921587200000000 -> 38281250 -> 1679616 -> 1452729852 -> 1318305830625 -> 70312500 -> 96 -> 531441 -> 500 -> 0.
The number 31395559595973 takes 16 steps to converge and so the next term is >= 16. The trajectory is 31395559595973 -> 471570692025125026702880859375 -> 34755118508614725279865110528 -> 23122964691361341376561152000000 -> 1194842734208247398400000000 -> 23554621393597287150649344 -> 2030652382202824185652602470400000 -> 101921587200000000 -> 38281250 -> 1679616 -> 1452729852 -> 1318305830625 -> 70312500 -> 96 -> 531441 -> 500 -> 0.
The smallest number that takes 16 steps to converge is 555959597395, for which the trajectory starts 555959597395 -> 471570692025125026702880859375 and then continues as above. - _Michael S. Branicky_, Jan 24 2022
		

Crossrefs

See A133508 for the corresponding numbers of steps. Cf. A133500, A133501.
See also A003001.

Extensions

a(11) from Michael S. Branicky, Jan 24 2022

A225974 Multiplicative persistence with squares of decimal digits: smallest number such that the number of iterations of "multiply digits squared" needed to reach 0 or 1 equals n.

Original entry on oeis.org

0, 10, 25, 5, 8, 6, 3, 2
Offset: 0

Views

Author

Michel Lagneau, May 22 2013

Keywords

Comments

This sequence is probably finite.

Examples

			a(1) is not 1, because 1 takes 0 steps to reach 0 or 1. - _N. J. A. Sloane_, Nov 05 2022
From _Mohammed Yaseen_, Oct 11 2022: (Start)
5 -> 25 -> 4*25 = 100 -> 1*0*0 = 0. So a(3) = 5.
8 -> 64 -> 36*16 = 576 -> 25*49*36 = 44100 -> 16*16*1*0*0 = 0. So a(4) = 8. (End)
		

Crossrefs

Programs

  • Mathematica
    lst = {}; n = 0; Do[While[True, k = n; c = 0; While[k > 9, k = Times @@ IntegerDigits[k]^2; c++]; If[c == l, Break[]]; n++]; AppendTo[lst, n], {l, 0, 7}]; lst
  • Python
    from math import prod
    from itertools import count, islice
    def f(n): return prod(map(lambda x: x*x, map(int, str(n))))
    def A031348(n):
        c = 0
        while n not in {0, 1}: n, c = f(n), c+1
        return c
    def agen():
        adict, n = dict(), 0
        for k in count(0):
            v = A031348(k)
            if v not in adict: adict[v] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 8))) # Michael S. Branicky, Oct 13 2022

Formula

a(n) = Min{k >= 0 : A031348(k) = n}. - Michael S. Branicky, Oct 13 2022

Extensions

a(3)-a(6) corrected and a(7) from Mohammed Yaseen, Oct 11 2022

A330152 Absolute multiplicative persistence: a(n) is the least number with multiplicative persistence n for some base b > 1.

Original entry on oeis.org

0, 2, 8, 23, 52, 127, 218, 412, 542, 692, 1471, 2064, 2327, 4739, 13025, 16213, 20388, 45407, 82605, 123706, 207778, 323382, 605338, 905670, 1033731, 2041995, 3325970, 4282238, 7638962, 9840138, 10364329, 26110715, 40706834, 57222153, 82242809, 97900397
Offset: 0

Views

Author

Tim Lamont-Smith, Nov 29 2019

Keywords

Examples

			2 when represented in base 2 goes 10 -> 0 and has an absolute persistence of 1, so a(1) = 2.
8 when represented in base 3 goes 22 -> 11 -> 1 and has an absolute persistence of 2, so a(2) = 8.
23 when represented in base 6 goes 35 -> 23 -> 10 -> 1 and has absolute persistence of 3, so a(3) = 23 (Cf. A064867).
52 when represented in base 9 goes 57 -> 38 -> 26 -> 13 -> 3 and has absolute persistence of 4, so a(4) = 52 (Cf. A064868).
		

Crossrefs

Programs

  • Python
    from math import prod
    from sympy.ntheory.digits import digits
    def mp(n, b): # multiplicative persistence of n in base b
        c = 0
        while n >= b:
            n, c = prod(digits(n, b)[1:]), c+1
        return c
    def a(n):
        k = 0
        while True:
            if any(mp(k, b)==n for b in range(2, max(3, k))): return k
            k += 1
    print([a(n) for n in range(11)]) # Michael S. Branicky, Sep 17 2021

Extensions

a(19)-a(27) from Giovanni Resta, Jan 20 2020
a(28)-a(30) from Michael S. Branicky, Sep 17 2021
a(31)-a(35) from Brendan Gimby, Jul 08 2025

A333955 Numbers k with digits in nondecreasing order and each digit greater than 1 such that the iterated product of digits of k is a prime.

Original entry on oeis.org

2, 3, 5, 7, 26, 34, 35, 37, 57, 223, 278, 279, 299, 355, 359, 367, 369, 389, 447, 469, 557, 579, 666, 999, 2247, 2269, 2337, 2339, 2349, 2366, 2699, 2799, 3335, 3336, 3338, 3346, 3357, 3399, 3499, 3669, 3679, 3889, 3999, 4689, 4788, 5579, 5777, 6668, 22227, 22239, 22336
Offset: 1

Views

Author

David A. Corneth, Apr 11 2020

Keywords

Comments

Primitive sequence of A028843. If k is in this sequence, then one can concatenate as many 1s as one likes, and/or permute the digits, to get terms of A028843 that are not in this sequence. For example, from 35 in this sequence, we can obtain 135, 1135, 11135, ... as well as 153, 315, 351, 1153, 1315, 1351, 1513, 1531, etc.

Examples

			For 35, we have 3 * 5 = 15 and then 1 * 5 = 5, which is a prime. Furthermore, the digits of 35 are nondecreasing and all digits of 35 are greater than 1, so 35 is in the sequence.
Likewise with 37, we see that 3 * 7 = 21 and 2 * 1 = 2, which is prime, and 3 < 7, so 37 is also in the sequence. The numbers 137, 1137, 11137, etc., are in A028843 but are not in this sequence of account of containing the digit 1.
With 43, we confirm that 4 * 3 = 12 and 1 * 2 = 2, which is prime, but 4 > 3, so 43 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25000], Min[(d = IntegerDigits[#])] > 1 && (Length[d] < 2 || Min @ Differences[d] > -1) && PrimeQ[FixedPoint[IntegerDigits @ (Times @@ #)&, d][[1]]] &] (* Amiram Eldar, Apr 14 2020 *)
  • PARI
    is(n) = my(d=digits(n), v); if(d!=(v=vecsort(d))||v[1]<2, return(0)); while(n>=10, n=vecprod(digits(n))); isprime(n)
    
  • Scala
    def hasDigitsSorted(n: Int): Boolean = {
      val digSort = Integer.parseInt(n.toString.toCharArray.sorted.mkString)
      n == digSort
    }
    def iterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => iterDigitProd(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)
    }
    val prelim = (1 to 20000).filter(hasDigitsSorted(_)).filter(n => List(2, 3, 5, 7).contains(iterDigitProd(n)))
    prelim.filter(!.toString.startsWith("1")) // _Alonso del Arte, Apr 20 2020

A343403 Numbers k such that the product of the digits of k is not the product of digits of any earlier term in the sequence.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 25, 26, 27, 28, 29, 35, 37, 38, 39, 45, 47, 48, 49, 55, 56, 57, 58, 59, 67, 68, 69, 77, 78, 79, 88, 89, 99, 255, 256, 257, 258, 259, 267, 268, 269, 277, 278, 279, 288, 289, 299, 355, 357, 358, 359, 377, 378, 379, 388, 389, 399, 455
Offset: 1

Views

Author

Collin King, Apr 14 2021

Keywords

Comments

Observations:
The digits 0 and 1 appear only in terms 0 and 1, respectively.
Terms cannot contain two 2s, two 3s, a 2 and a 3, a 2 and a 4, a 3 and a 4, or a 4 and a 6.
Digits in each term appear in ascending order (A009994).

Crossrefs

Cf. A003001, A007954, A009994 (ascending digits), A031346, A068189, A343160.

Programs

  • Maple
    # product of digits
    A007954 := proc(n::integer)
        if n = 0 then
            0;
        else
            mul( d, d=convert(n, base, 10)) ;
        end if;
    end proc:
    hit:=Array(0..10000,-1);
    a:=[0];
    hit[0]:=0;
    for n from 1 to 50000 do p:=A007954(n);
       if p>0 and hit[p]=-1 then hit[p]:=n; a:=[op(a),n]; fi; od:
    a; # N. J. A. Sloane, Apr 14 2021
  • PARI
    See Links section.

A352531 Numbers with multiplicative persistence value 10.

Original entry on oeis.org

3778888999, 3778889899, 3778889989, 3778889998, 3778898899, 3778898989, 3778898998, 3778899889, 3778899898, 3778899988, 3778988899, 3778988989, 3778988998, 3778989889, 3778989898, 3778989988, 3778998889, 3778998898, 3778998988, 3778999888, 3779888899, 3779888989
Offset: 1

Views

Author

Daniel Mondot, Mar 19 2022

Keywords

Comments

The product of the digits of each term is either 438939648 or 231928233984.
The first term that produces the product 231928233984 is a(959230456).

Examples

			3778888999 -> 438939648 -> 4478976 -> 338688 -> 27648 -> 2688 -> 768 -> 336 -> 54 -> 20 -> 0. One digit in 10 steps.
		

Crossrefs

A352532 Numbers with multiplicative persistence value 11.

Original entry on oeis.org

277777788888899, 277777788888989, 277777788888998, 277777788889889, 277777788889898, 277777788889988, 277777788898889, 277777788898898, 277777788898988, 277777788899888, 277777788988889, 277777788988898, 277777788988988, 277777788989888, 277777788998888
Offset: 1

Views

Author

Daniel Mondot, Mar 19 2022

Keywords

Comments

The product of the digits of each term is either 4996238671872 or 937638166841712.
The first term that produces the product 937638166841712 is a(1178695599).

Examples

			277777788888899 -> 4996238671872 -> 438939648 -> 4478976 -> 338688 -> 27648 -> 2688 -> 768 -> 336 -> 54 -> 20 -> 0. One digit in 11 steps.
		

Crossrefs

Previous Showing 41-50 of 72 results. Next