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

A352172 a(n) is the product of the cubes of the nonzero digits of n.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 1, 8, 27, 64, 125, 216, 343, 512, 729, 8, 8, 64, 216, 512, 1000, 1728, 2744, 4096, 5832, 27, 27, 216, 729, 1728, 3375, 5832, 9261, 13824, 19683, 64, 64, 512, 1728, 4096, 8000, 13824, 21952, 32768, 46656, 125, 125, 1000, 3375, 8000, 15625
Offset: 1

Views

Author

Michel Marcus, Mar 07 2022

Keywords

Crossrefs

Used in A351876.
Cf. A051801.

Programs

  • Mathematica
    a[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; Array[a, 55] (* Amiram Eldar, Mar 07 2022 *)
  • PARI
    a(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n))));
    
  • Python
    from math import prod
    def a(n): return prod(int(d)**3 for d in str(n) if d != '0')
    print([a(n) for n in range(1, 56)]) # Michael S. Branicky, Mar 07 2022
    
  • Python
    from math import prod
    def A352172(n): return prod(map(lambda x:(0, 1, 8, 27, 64, 125, 216, 343, 512, 729)[int(x)],filter(lambda x:x>'1',str(n)))) # Chai Wah Wu, Sep 17 2024

A352260 Integers that need 2 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

25, 52, 125, 152, 205, 215, 250, 251, 455, 502, 512, 520, 521, 545, 554, 1025, 1052, 1125, 1152, 1205, 1215, 1250, 1251, 1455, 1502, 1512, 1520, 1521, 1545, 1554, 2005, 2015, 2050, 2051, 2105, 2115, 2150, 2151, 2255, 2500, 2501, 2510, 2511, 2525, 2552, 4055, 4155, 4505
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			25 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[4505], q[#, 2] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok2(n) = {for (k=1, 2, n = f(n); if ((n==1), return(k==2)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x):
        x = A352172(x)
        return x != 1 and A352172(x) == 1
    print([k for k in range(4506) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352261 Integers that need 3 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

5, 8, 15, 18, 24, 42, 50, 51, 80, 81, 105, 108, 115, 118, 124, 142, 150, 151, 180, 181, 204, 214, 222, 240, 241, 255, 258, 285, 402, 412, 420, 421, 445, 454, 500, 501, 510, 511, 525, 528, 544, 552, 582, 800, 801, 810, 811, 825, 852, 1005, 1008, 1015, 1018, 1024, 1042, 1050
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			5 -> 125 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[1050], q[#, 3] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok3(n) = {for (k=1, 3, n = f(n); if ((n==1), return(k==3)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=3):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(1051) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352262 Integers that need 4 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

2, 12, 20, 21, 45, 54, 102, 112, 120, 121, 145, 154, 200, 201, 210, 211, 225, 252, 405, 415, 450, 451, 504, 514, 522, 540, 541, 558, 585, 855, 1002, 1012, 1020, 1021, 1045, 1054, 1102, 1112, 1120, 1121, 1145, 1154, 1200, 1201, 1210, 1211, 1225, 1252, 1405, 1415, 1450, 1451
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			2 -> 8 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[1451], q[#, 4] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok4(n) = {for (k=1, 4, n = f(n); if ((n==1), return(k==4)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=4):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(1452) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352263 Integers that need 5 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

679, 697, 769, 796, 967, 976, 1679, 1697, 1769, 1796, 1967, 1976, 2379, 2397, 2739, 2793, 2937, 2973, 3279, 3297, 3367, 3376, 3637, 3673, 3729, 3736, 3763, 3792, 3927, 3972, 6079, 6097, 6179, 6197, 6337, 6373, 6709, 6719, 6733, 6790, 6791, 6907, 6917, 6970, 6971, 7069, 7096
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			679 -> 54010152 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[7096], q[#, 5] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok5(n) = {for (k=1, 5, n = f(n); if ((n==1), return(k==5)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=5):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(7100) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352264 Integers that need 6 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

377, 737, 773, 1377, 1737, 1773, 3077, 3177, 3707, 3717, 3770, 3771, 3889, 3898, 3988, 4689, 4698, 4869, 4896, 4968, 4986, 5677, 5767, 5776, 6489, 6498, 6577, 6668, 6686, 6757, 6775, 6849, 6866, 6894, 6948, 6984, 7037, 7073, 7137, 7173, 7307, 7317, 7370, 7371, 7567, 7576
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			377 -> 3176523 -> 54010152000 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[7576], q[#, 6] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok6(n) = {for (k=1, 6, n = f(n); if ((n==1), return(k==6)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=6):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(7577) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352265 Integers that need 7 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

478, 487, 748, 784, 847, 874, 1478, 1487, 1748, 1784, 1847, 1874, 2278, 2287, 2447, 2474, 2728, 2744, 2782, 2827, 2872, 4078, 4087, 4178, 4187, 4247, 4274, 4427, 4472, 4708, 4718, 4724, 4742, 4780, 4781, 4807, 4817, 4870, 4871, 5788, 5878, 5887, 7048, 7084, 7148, 7184, 7228
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			478 -> 11239424 -> 5159780352 -> 54010152000000000 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[7228], q[#, 7] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok7(n) = {for (k=1, 7, n = f(n); if ((n==1), return(k==7)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=7):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(7229) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352266 Integers that need 8 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

27, 57, 72, 75, 127, 157, 172, 175, 207, 217, 270, 271, 355, 457, 475, 507, 517, 535, 547, 553, 570, 571, 574, 702, 705, 712, 715, 720, 721, 745, 750, 751, 754, 1027, 1057, 1072, 1075, 1127, 1157, 1172, 1175, 1207, 1217, 1270, 1271, 1355, 1457, 1475, 1507, 1517, 1535, 1547
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			27 -> 2744 -> 11239424 -> 5159780352 -> 54010152000000000 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[1547], q[#, 8] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok8(n) = {for (k=1, 8, n = f(n); if ((n==1), return(k==8)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=8):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(1548) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352267 Integers that need 9 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

3, 13, 30, 31, 56, 65, 103, 113, 130, 131, 156, 165, 235, 253, 300, 301, 310, 311, 325, 352, 506, 516, 523, 532, 560, 561, 605, 615, 650, 651, 1003, 1013, 1030, 1031, 1056, 1065, 1103, 1113, 1130, 1131, 1156, 1165, 1235, 1253, 1300, 1301, 1310, 1311, 1325, 1352, 1506, 1516
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			3 -> 27 -> 2744 -> 11239424 -> 5159780352 -> 54010152000000000 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[1516], q[#, 9] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok9(n) = {for (k=1, 9, n = f(n); if ((n==1), return(k==9)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=9):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(1517) if ok(k)]) # Michael S. Branicky, Mar 10 2022

A352268 Integers that need 10 iterations of the map x->A352172(x) to reach 1.

Original entry on oeis.org

55, 155, 505, 515, 550, 551, 1055, 1155, 1505, 1515, 1550, 1551, 2555, 5005, 5015, 5050, 5051, 5105, 5115, 5150, 5151, 5255, 5500, 5501, 5510, 5511, 5525, 5552, 10055, 10155, 10505, 10515, 10550, 10551, 11055, 11155, 11505, 11515, 11550, 11551, 12555, 15005, 15015, 15050
Offset: 1

Views

Author

Michel Marcus, Mar 10 2022

Keywords

Examples

			55 -> 15625 -> 27000000 -> 2744 -> 11239424 -> 5159780352 -> 54010152000000000 -> 8000000 -> 512 -> 1000 -> 1.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[15050], q[#, 10] &] (* Amiram Eldar, Mar 10 2022 *)
  • PARI
    f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
    isok10(n) = {for (k=1, 10, n = f(n); if ((n==1), return(k==10)););}
    
  • Python
    from math import prod
    def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
    def ok(x, iters=10):
        i = 0
        while i < iters and x != 1: i, x = i+1, A352172(x)
        return i == iters and x == 1
    print([k for k in range(15051) if ok(k)]) # Michael S. Branicky, Mar 10 2022
Showing 1-10 of 10 results.