A237767 Integers whose product of digits is a nonzero cube.
1, 8, 11, 18, 24, 39, 42, 81, 88, 93, 111, 118, 124, 139, 142, 181, 188, 193, 214, 222, 241, 248, 284, 319, 333, 389, 391, 398, 412, 421, 428, 444, 469, 482, 496, 555, 649, 666, 694, 777, 811, 818, 824, 839, 842, 881, 888, 893, 913, 931
Offset: 1
Examples
3*9*1 = 27 = 3^3, thus 391 is a member of this sequence. 3*9*8 = 216 = 6^3, thus 398 is a member of this sequence. 4*2*8 = 64 = 4^3, thus 428 is a member of this sequence.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Maple
filter:= proc(n) local T; T:= Statistics:-Tally(convert(n,base,10),output=table); if assigned(T[0]) then return false fi; eval(T[2] + 2*T[4] + T[6] mod 3, T = [0$6]) = 0 and eval(T[3] + T[6] + 2*T[9] mod 3, T = [0$9]) = 0 and member(T[5] mod 3, [0,'T[5]']) and member(T[7] mod 3, [0,'T[7]']) end proc: select(filter, [$1..1000]); # Robert Israel, Jun 16 2025
-
Mathematica
pdcQ[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,0]&&IntegerQ[ Surd[ Times@@idn,3]]]; Select[Range[1000],pdcQ] (* Harvey P. Dale, Aug 25 2017 *)
-
PARI
s=[]; for(n=1, 1000, t=eval(Vec(Str(n))); d=prod(i=1, #t, t[i]); if(d>0 && ispower(d, 3), s=concat(s, n))); s \\ Colin Barker, Feb 17 2014
-
Python
def DigitProd(x): total = 1 for i in str(x): total *= int(i) return total def Cube(x): for n in range(1,10**3): if DigitProd(x) == n**3: return True if DigitProd(x) < n**3: return False return False x = 1 while x < 1000: if Cube(x): print(x) x += 1
-
Python
from math import prod from sympy import integer_nthroot def ok(n): return (p:=prod(map(int, str(n)))) > 0 and integer_nthroot(p, 3)[1] print([k for k in range(10**3) if ok(k)]) # Michael S. Branicky, Jun 16 2025
Formula
There are between 9^(k-6) and 9^k k-digit members of this sequence, so a(n) >> n^1.04 and in particular this sequence has density 0. - Charles R Greathouse IV, Feb 21 2014
Extensions
Name edited by Michel Marcus, Jun 16 2025
Comments