|
|
A023651
|
|
Numbers k such that (product of digits of k) * (sum of digits of k) = 2k.
|
|
4
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Except for k = 0, this sequence is a subsequence of A049101. - Jason Yuen, Feb 26 2024
|
|
LINKS
|
|
|
MATHEMATICA
|
Do[ If[ 2n == Apply[ Times, IntegerDigits[n]] Apply[ Plus, IntegerDigits[n]], Print[n]], {n, 0, 10^7} ]
|
|
PROG
|
(PARI) isok(n) = if(n, factorback(digits(n)), 0) * sumdigits(n) == 2*n \\ Mohammed Yaseen, Jul 22 2022
(Python)
from math import prod
def s(n): return sum(map(int, str(n)))
def p(n): return prod(map(int, str(n)))
for n in range(0, 10**6):
if p(n)*s(n)==2*n:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,fini,full
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|