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 11-20 of 72 results. Next

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

A133048 Powerback(n): reverse the decimal expansion of n, drop any leading zeros, then apply the powertrain map of A133500 to the resulting number.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 1, 4, 9, 16, 25, 36, 49, 64, 81, 3, 1, 8, 27, 64, 125, 216, 343, 512, 729, 4, 1, 16, 81, 256, 625, 1296, 2401, 4096, 6561, 5, 1, 32, 243, 1024, 3125, 7776, 16807, 32768, 59049, 6, 1, 64, 729, 4096, 15625, 46656, 117649
Offset: 0

Views

Author

J. H. Conway and N. J. A. Sloane, Dec 31 2007

Keywords

Comments

a(A221221(n)) = A133500(A221221(n)) = A222493(n). - Reinhard Zumkeller, May 27 2013

Examples

			E.g. 240 -> (0)42 -> 4^2 = 16; 12345 -> 54321 -> 5^4*3^2*1 = 5625.
		

Crossrefs

Cf. A131571 (fixed points), A133059 and A133134 (records); A133500 (powertrain).
Cf. A133144 (length of trajectory), A031346 and A003001 (persistence).
Cf. A031298.

Programs

  • Haskell
    a133048 0 = 0
    a133048 n = train $ dropWhile (== 0) $ a031298_row n where
       train []       = 1
       train [x]      = x
       train (u:v:ws) = u ^ v * (train ws)
    -- Reinhard Zumkeller, May 27 2013
  • Maple
    powerback:=proc(n) local a,i,j,t1,t2,t3;
    if n = 0 then RETURN(0); fi;
    t1:=convert(n, base, 10); t2:=nops(t1);
    for i from 1 to t2 do if t1[i] > 0 then break; fi; od:
    a:=1; t3:=t2-i+1;
    for j from 0 to floor(t3/2)-1 do a := a*t1[i+2*j]^t1[i+2*j+1]; od:
    if t3 mod 2 = 1 then a:=a*t1[t2]; fi;
    RETURN(a); end;
  • Mathematica
    ptm[n_]:=Module[{idn=IntegerDigits[IntegerReverse[n]]},If[ EvenQ[ Length[idn]],Times@@ (#[[1]]^#[[2]]&/@Partition[idn,2]),(Times@@(#[[1]]^#[[2]]&/@Partition[ Most[ idn],2]))Last[idn]]];Array[ptm,70,0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2020 *)

A350180 Numbers of multiplicative persistence 1 which are themselves the product of digits of a number.

Original entry on oeis.org

10, 12, 14, 15, 16, 18, 20, 21, 24, 30, 32, 40, 42, 50, 60, 70, 80, 81, 90, 100, 105, 108, 112, 120, 140, 150, 160, 180, 200, 210, 240, 250, 270, 280, 300, 320, 350, 360, 400, 405, 420, 450, 480, 490, 500, 504, 540, 560, 600, 630, 640, 700, 720, 750, 800
Offset: 1

Views

Author

Daniel Mondot, Dec 18 2021

Keywords

Comments

The multiplicative persistence of a number mp(n) is the number of times the product of digits function p(n) must be applied to reach a single digit, i.e., A031346(n).
The product of digits function partitions all numbers into equivalence classes. There is a one-to-one correspondence between values in this sequence and equivalence classes of numbers with multiplicative persistence 2.
There are infinitely many numbers with mp of 1 to 11, but the classes of numbers (p(n)) are postulated to be finite for subsequent sequences A350181..., but not for this sequence (where mp(p(n)) = 1). That is because there are infinitely many numbers that include both an even digit (2, 4, 6 or 8), a 5 and no 0. For these numbers n, p(n) will include a zero and p(p(n)) will be 0.
Equivalently: This sequence contains all numbers A007954(k) such that A031346(k) = 2, and they are the numbers k in A002473 such that A031346(k) = 1.
Or, they factor into powers of 2, 3, 5 and 7 exclusively and p(n) goes to a single digit in 1 step.

Examples

			10 is in this sequence because:
- 10 goes to a single digit in 1 step: p(10) = 0.
- 25, 52, 125, 152, 215, 512, 251, 521, 1125, 1152, 1215, 1512, 1251, 1521, 2115, 5112, 2511, 5211, etc. all lead to 10, i.e., p(25)=10, p(52)=10, etc.
Some of these (25, 125, 512, 1125, 1152, 1215, 1512) are in the next layer of classes, A350181, and the rest are not.
12 is in this sequence because:
- 12 goes to a single digit in 1 step: p(12) = 2.
- 12, 21, 112, 211, 121, 11112, 11211, etc. all lead to 12.
(12, 21 and 112 are in the next layer of classes, A350181, but the rest are not)
14 is in this sequence because:
- 14 goes to a single digit in 1 step: p(14) = 4.
- 27, 72, 127, 172, 217, 712, 271, 721, 12111711, etc. all lead to 14.
(27 and 72 are in the next layer of classes, A350181, the rest are not).
		

Crossrefs

Intersection of A002473 and A046510
Cf. A003001 (smallest number with multiplicative persistence n), A031346 (multiplicative persistence), A031347 (multiplicative digital root), A046510 (all numbers with mp of 1).
Cf. A350181, A350182, A350183, A350184, A350185, A350186, A350187 (numbers with mp 2 to 10 that are themselves 7-smooth numbers).

Programs

  • PARI
    mp(n)={my(k=0); while(n>=10, k++; n=vecprod(digits(n))); k}
    isparent(n)={my(m=0); while(m<>n, m=n; n/=gcd(n,2*3*5*7)); n==1}
    isok(n)={mp(n)==1 && isparent(n)} \\ Andrew Howroyd, Dec 20 2021

A064870 The minimal number which has multiplicative persistence 6 in base n.

Original entry on oeis.org

11262, 57596799, 30536, 6788, 4684, 1571, 439, 667, 1964, 683, 218, 857, 264, 278, 353, 393, 227, 382, 344, 311, 319, 307, 283, 417, 422, 381, 485, 436, 349, 431, 436, 449, 421, 469, 327, 575, 598, 483, 539, 413, 511, 517, 534, 641, 611, 609, 476, 479
Offset: 7

Views

Author

Sascha Kurz, Oct 08 2001

Keywords

Comments

The persistence of a number is the number of times you need to multiply the digits together before reaching a single digit. a(5)=1811981201171874, a(6) seems not to exist.

Examples

			a(13) = 439 because 439 = [2'7'10]->[10'10]->[7'9]->[4'11]->[3'5]->[1'2]->[2] needs 6 steps and no fewer n.
		

Crossrefs

Formula

a(n) = 7*n-[n/720] for n > 719.

A064872 The minimal number which has multiplicative persistence 8 in base n.

Original entry on oeis.org

7577, 130883, 596667, 3644381, 2820, 61773, 2752, 5136, 7452, 38631, 2780, 8015, 2996, 542, 8611, 4591, 575, 10586, 2532, 2681, 2764, 1016, 4547, 10151, 1065, 983, 813, 5431, 900, 1255, 983, 5179, 5117, 1190, 982, 1129, 1501, 1491, 1471, 1084
Offset: 13

Views

Author

Sascha Kurz, Oct 08 2001

Keywords

Comments

The persistence of a number is the number of times you need to multiply the digits together before reaching a single digit. a(7)=1086400325525346, a(10)=2677889, a(11)=757074, a(8) and a(9) seem not to exist.

Examples

			a(13) = 7577 because 7577 is the fewest number with persistence 8 in base 13.
		

Crossrefs

Formula

a(n) = 9*n-[n/40320] for n > 40319.

A070562 Fecundity of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with x=n, repeatedly replace x by x + product of digits of x until the product is 0; fecundity = number of steps. a(0) = 0 by convention.

Examples

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

References

  • P. Tougne, Jeux Mathematiques column, Pour La Science (French edition of "Scientific American"), Vol. 82, Aug. 1984, Prob. 6, pp. 101, 104.

Crossrefs

Programs

  • Mathematica
    f[ n_ ] := Block[ {a=n,b,c=0}, While[ b=Times@@IntegerDigits[ a ]; b>0, a=a+b; c++ ]; c ]; f[ 0 ]=0; Table[ f[ n ], {n,0,100} ]
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 2; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)
  • PARI
    prodig(n) = local(s, d); if(n==0, s=0, s=1; while(n>0, d=divrem(n, 10); n=d[1 ]; s=s*d[2 ])); s for(n=0, 92, x=n; c=0; while((d=prodig(x))!=0, c++; x=x+d); print1(c, ", "))

Extensions

Edited and extended by Klaus Brockhaus, May 08 2002
Clarified the definition of fecundity and improved the Mathematica program. - T. D. Noe, Oct 06 2008
More terms from Robert G. Wilson v, Jun 27 2010

A350181 Numbers of multiplicative persistence 2 which are themselves the product of digits of a number.

Original entry on oeis.org

25, 27, 28, 35, 36, 45, 48, 54, 56, 63, 64, 72, 84, 125, 126, 128, 135, 144, 162, 192, 216, 224, 225, 243, 245, 252, 256, 315, 324, 375, 432, 441, 512, 525, 567, 576, 588, 625, 675, 735, 756, 875, 945, 1125, 1134, 1152, 1176, 1215, 1225, 1296, 1323, 1372
Offset: 1

Views

Author

Daniel Mondot, Dec 18 2021

Keywords

Comments

The multiplicative persistence of a number mp(n) is the number of times the product of digits function p(n) must be applied to reach a single digit, i.e., A031346(n).
The product of digits function partitions all numbers into equivalence classes. There is a one-to-one correspondence between values in this sequence and equivalence classes of numbers with multiplicative persistence 3.
There are infinitely many numbers with mp of 1 to 11, but the classes of numbers (p(n)) are postulated to be finite for this and subsequent sequences A350182....
Equivalently:
This sequence consists of the numbers A007954(k) such that A031346(k) = 3,
These are the numbers k in A002473 such that A031346(k) = 2,
Or:
- they factor into powers of 2, 3, 5 and 7 exclusively.
- p(n) goes to a single digit in 2 steps.
Postulated to be finite and complete.
The largest known number is 2^25 * 3^227 * 7^28 (140 digits).
No more numbers have been found between 10^140 and probably 10^20000 (according to comment in A003001), and independently verified up to 10^10000.

Examples

			25 is in this sequence because:
- 25 goes to a single digit in 2 steps: p(25) = 10, p(10) = 0.
- 25 has ancestors 55, 155, etc. p(55) = 25.
27 is in this sequence because:
- 27 goes to a single digit in 2 steps: p(27) = 14, p(14) = 4.
- 27 has ancestors 39, 93, 333, 139, etc. p(39) = 27.
		

Crossrefs

Cf. A002473, A003001 (smallest number with multiplicative persistence n), A031346 (multiplicative persistence), A031347 (multiplicative digital root), A046511 (all numbers with mp of 2).
Cf. A350180, A350182, A350183, A350184, A350185, A350186, A350187 (numbers with mp 1, and 3 to 10 that are themselves 7-smooth numbers).

Programs

  • Mathematica
    Select[Range@1400,AllTrue[First/@FactorInteger@#,#<10&]&&Length@Most@NestWhileList[Times@@IntegerDigits@#&,#,#>9&]==2&] (* Giorgos Kalogeropoulos, Jan 16 2022 *)
  • Python
    from math import prod
    from sympy import factorint
    def pd(n): return prod(map(int, str(n)))
    def ok(n):
        if n <= 9 or max(factorint(n)) > 9: return False
        return (p := pd(n)) > 9 and pd(p) < 10
    print([k for k in range(1400) if ok(k)]) # Michael S. Branicky, Jan 16 2022

A350182 Numbers of multiplicative persistence 3 which are themselves the product of digits of a number.

Original entry on oeis.org

49, 75, 96, 98, 147, 168, 175, 189, 196, 288, 294, 336, 343, 392, 448, 486, 648, 672, 729, 784, 864, 882, 896, 972, 1344, 1715, 1792, 1944, 2268, 2744, 3136, 3375, 3888, 3969, 7938, 8192, 9375, 11664, 12288, 12348, 13824, 14336, 16384, 16464, 17496, 18144
Offset: 1

Views

Author

Daniel Mondot, Dec 18 2021

Keywords

Comments

The multiplicative persistence of a number mp(n) is the number of times the product of digits function p(n) must be applied to reach a single digit, i.e., A031346(n).
The product of digits function partitions all numbers into equivalence classes. There is a one-to-one correspondence between values in this sequence and equivalence classes of numbers with multiplicative persistence 4.
There are infinitely many numbers with mp of 1 to 11, but the classes of numbers (p(n)) are postulated to be finite for sequences A350181....
Equivalently:
This sequence consists of the numbers A007954(k) such that A031346(k) = 4,
These are the numbers k in A002473 such that A031346(k) = 3,
Or:
- they factor into powers of 2, 3, 5 and 7 exclusively.
- p(n) goes to a single digit in 3 steps.
Postulated to be finite and complete.
Let p(n) be the product of all the digits of n.
The multiplicative persistence of a number mp(n) is the number of times you need to apply p() to get to a single digit.
For example:
mp(1) is 0 since 1 is already a single-digit number.
mp(10) is 1 since p(10) = 0, and 0 is a single digit, 1 step.
mp(25) is 2 since p(25) = 10, p(10) = 0, 2 steps.
mp(96) is 3 since p(96) = 54, p(54) = 20, p(20) = 0, 3 steps.
mp(378) is 4 since p(378) = 168, p(168) = 48, p(48) = 32, p(32) = 6, 4 steps.
There are infinitely many numbers n such that mp(n)=4. But for each n with mp(n)=4, p(n) is a number included in this sequence, and this sequence is likely finite.
This sequence lists p(n) such that mp(n) = 4, or mp(p(n)) = 3.

Examples

			49 is in this sequence because:
- 49 goes to a single digit in 3 steps: p(49) = 36, p(36) = 18, p(18) = 8.
- p(77) = p(177) = p(717) = p(771) = 49, etc.
75 is in this sequence because:
- 75 goes to a single digit in 3 steps: p(75) = 35, p(35) = 15, p(15) = 5.
- p(355) = p(535) = p(1553) = 75, etc.
		

Crossrefs

Cf. A002473, A003001 (smallest number with multiplicative persistence n), A031346 (multiplicative persistence), A031347 (multiplicative digital root), A046512 (all numbers with mp of 3).
Cf. A350180, A350181, A350183, A350184, A350185, A350186, A350187 (numbers with mp 0, 1 and 3 to 10 that are themselves 7-smooth numbers).

A350183 Numbers of multiplicative persistence 4 which are themselves the product of digits of a number.

Original entry on oeis.org

378, 384, 686, 768, 1575, 1764, 2646, 4374, 6144, 6174, 6272, 7168, 8232, 8748, 16128, 21168, 23328, 27216, 28672, 32928, 34992, 49392, 59535, 67228, 77175, 96768, 112896, 139968, 148176, 163296, 214326, 236196, 393216, 642978, 691488, 774144, 777924
Offset: 1

Views

Author

Daniel Mondot, Dec 18 2021

Keywords

Comments

The multiplicative persistence of a number mp(n) is the number of times the product-of-digits function p(n) must be applied to reach a single digit, i.e., A031346(n).
The product-of-digits function partitions all numbers into equivalence classes. There is a one-to-one correspondence between values in this sequence and equivalence classes of numbers with multiplicative persistence 5.
There are infinitely many numbers with mp of 1 to 11, but the classes of numbers (p(n)) are postulated to be finite for sequences A350181....
Equivalently:
- This sequence lists all numbers A007954(k) such that A031346(k) = 5.
- These are the numbers k in A002473 such that A031346(k) = 4.
Or:
- These numbers factor into powers of 2, 3, 5 and 7 exclusively.
- p(n) goes to a single digit in 4 steps.
Postulated to be finite and complete.

Examples

			384 is in this sequence because:
- 384 goes to a single digit in 4 steps: p(384)=96, p(96)=54, p(54)=20, p(20)=0.
- p(886)=384, p(6248)=384, p(18816)=384, etc.
378 is in this sequence because:
- 378 goes to a single digits in 4 steps: p(378)=168, p(168)=48, p(48)=32, p(32)=6.
- p(679)=378, p(2397)=378, p(12379)=378, etc.
		

Crossrefs

Cf. A002473 (7-smooth), A003001 (smallest number with multiplicative persistence n), A031346 (multiplicative persistence), A031347 (multiplicative digital root), A046513 (all numbers with mp of 4).
Cf. A350180, A350181, A350182, A350184, A350185, A350186, A350187 (numbers with mp 1 to 3 and 5 to 10 that are themselves 7-smooth numbers).

Programs

  • Mathematica
    mx=10^6;lst=Sort@Flatten@Table[2^i*3^j*5^k*7^l,{i,0,Log[2,mx]},{j,0,Log[3,mx/2^i]},{k,0,Log[5,mx/(2^i*3^j)]},{l,0,Log[7,mx/(2^i*3^j*5^k)]}]; (* from A002473 *)
    Select[lst,Length@Most@NestWhileList[Times@@IntegerDigits@#&,#,#>9&]==4&] (* Giorgos Kalogeropoulos, Jan 16 2022 *)
  • PARI
    pd(n) = if (n, vecprod(digits(n)), 0); \\ A007954
    mp(n) = my(k=n, i=0); while(#Str(k) > 1, k=pd(k); i++); i; \\ A031346
    isok(k) = (mp(k)==4) && (vecmax(factor(k)[,1]) <= 7); \\ Michel Marcus, Jan 25 2022
  • Python
    from math import prod
    from sympy import factorint
    def pd(n): return prod(map(int, str(n)))
    def ok(n):
        if n <= 9 or max(factorint(n)) > 9: return False
        return (p := pd(n)) > 9 and (q := pd(p)) > 9 and (r := pd(q)) > 9 and pd(r) < 10
    print([k for k in range(778000) if ok(k)])
    

A350184 Numbers of multiplicative persistence 5 which are themselves the product of digits of a number.

Original entry on oeis.org

2688, 18816, 26244, 98784, 222264, 262144, 331776, 333396, 666792, 688128, 1769472, 2939328, 3687936, 4214784, 4917248, 13226976, 19361664, 38118276, 71663616, 111476736, 133413966, 161414428, 169869312, 184473632, 267846264, 368947264, 476171136, 1783627776
Offset: 1

Views

Author

Daniel Mondot, Dec 18 2021

Keywords

Comments

The multiplicative persistence of a number mp(n) is the number of times the product of digits function p(n) must be applied to reach a single digit, i.e., A031346(n).
The product of digits function partitions all numbers into equivalence classes. There is a one-to-one correspondence between values in this sequence and equivalence classes of numbers with multiplicative persistence 5.
There are infinitely many numbers with mp of 1 to 11, but the classes of numbers (p(n)) are postulated to be finite for sequences A350181....
Equivalently:
This sequence consists of all numbers A007954(k) such that A031346(k) = 6.
These are the numbers k in A002473 such that A031346(k) = 5.
Or:
- they factor into powers of 2, 3, 5 and 7 exclusively.
- p(n) goes to a single digit in 5 steps.
Postulated to be finite and complete.

Examples

			2688 is in this sequence because:
- 2688 goes to a single digit in 5 steps: p(2688)=768, p(768)=336, p(336)=54, p(54)=20, p(20)=0.
- p(27648) = p(47628) = 2688, etc.
331776 is in this sequence because:
- 331776 goes to a single digit in 5 steps: p(331776)=2646, p(2646)=288, p(288)=128, p(128)=16, p(16)=6.
- p(914838624) = p(888899) = 331776, etc.
		

Crossrefs

Intersection of A002473 and A046514 (all numbers with mp of 5).
Cf. A003001 (smallest number with multiplicative persistence n), A031346 (multiplicative persistence), A031347 (multiplicative digital root).
Cf. A350180, A350181, A350182, A350183, A350185, A350186, A350187 (numbers with mp 1 to 4 and 6 to 10 that are themselves 7-smooth numbers).

Programs

  • Mathematica
    mx=10^10;lst=Sort@Flatten@Table[2^i*3^j*5^k*7^l,{i,0,Log[2,mx]},{j,0,Log[3,mx/2^i]},{k,0,Log[5,mx/(2^i*3^j)]},{l,0,Log[7,mx/(2^i*3^j*5^k)]}];
    Select[lst,Length@Most@NestWhileList[Times@@IntegerDigits@#&,#,#>9&]==5&] (* code for 7-smooth numbers from A002473. - Giorgos Kalogeropoulos, Jan 16 2022 *)
  • Python
    from math import prod
    def hd(n):
        while (n&1) == 0:  n >>= 1
        while (n%3) == 0:  n /= 3
        while (n%5) == 0:  n /= 5
        while (n%7) == 0:  n /= 7
        return(n)
    def pd(n): return prod(map(int, str(n)))
    def ok(n):
        if hd(n) > 9: return False
        return (p := pd(n)) > 9 and (q := pd(p)) > 9 and (r := pd(q)) > 9 and (s := pd(r)) > 9 and pd(s) < 10
    print([k for k in range(10,476200000) if ok(k)])
Previous Showing 11-20 of 72 results. Next