OFFSET
1,2
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..139 (first 116 terms from K. D. Bajpai)
EXAMPLE
a(4) = 64 = 4*4*4, which is a cube. Product of its digits = 6*4 = 24.
a(5) = 343 = 7*7*7, which is a cube. Product of its digits = 3*4*3 = 36.
Since 36 > 24, 64 and 343 appear in the sequence.
As suggested by Wolfdieter Lang, examples further clarified:
(Start)
A053668 is sieved (from left to right):
1, 2, 3, 4, 5, 6, 7, 8, 9, ....(numbers: k)
1, 8, 27, 64, 125, 216, 343, 512, 729, ....(cubes: k^3)
1, 8, 14, 24, 10, 12, 36, 10, 126, ....(prod of digits of k^3)
1, 8, 14, 24, X, X, 36, X, 126, ....(sieved products)
and related leftover cubes are:
1, 8, 27, 64, 343, 729, ....(leftover cubes)
(End)
MATHEMATICA
PROG
(PARI) \\ For b-file
c = 0; k = 0; for(n=1, 5*10^8, d = digits(n^3); p = prod(i = 1, #d, d[i]); while(p > k, c++; print(c, " ", n^3); k = p))
(Python)
from operator import mul
from functools import reduce
A248705_list, x, m = [], 0, [6, -6, 1, 0]
for _ in range(10**9):
for i in range(3):
m[i+1]+= m[i]
xn = reduce(mul, [int(d) for d in str(m[-1])], 1)
if xn > x:
x = xn
A248705_list.append(m[-1]) # Chai Wah Wu, Nov 19 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Oct 13 2014
STATUS
approved