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.

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