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.

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

This page as a plain text file.
%I A352172 #17 Sep 18 2024 05:52:54
%S A352172 1,8,27,64,125,216,343,512,729,1,1,8,27,64,125,216,343,512,729,8,8,64,
%T A352172 216,512,1000,1728,2744,4096,5832,27,27,216,729,1728,3375,5832,9261,
%U A352172 13824,19683,64,64,512,1728,4096,8000,13824,21952,32768,46656,125,125,1000,3375,8000,15625
%N A352172 a(n) is the product of the cubes of the nonzero digits of n.
%H A352172 Michel Marcus, <a href="/A352172/b352172.txt">Table of n, a(n) for n = 1..10000</a>
%t A352172 a[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; Array[a, 55] (* _Amiram Eldar_, Mar 07 2022 *)
%o A352172 (PARI) a(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n))));
%o A352172 (Python)
%o A352172 from math import prod
%o A352172 def a(n): return prod(int(d)**3 for d in str(n) if d != '0')
%o A352172 print([a(n) for n in range(1, 56)]) # _Michael S. Branicky_, Mar 07 2022
%o A352172 (Python)
%o A352172 from math import prod
%o A352172 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
%Y A352172 Used in A351876.
%Y A352172 Cf. A051801.
%K A352172 nonn,base
%O A352172 1,2
%A A352172 _Michel Marcus_, Mar 07 2022