login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128290 If p(x) is the product of the digits of the number x and s(x) the sum of the digits then the sequence lists all the numbers k for which p(s(k)) = s(p(k)), with k >= 1. 2
1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 36, 63, 109, 123, 132, 158, 185, 190, 199, 208, 213, 231, 280, 289, 298, 307, 312, 321, 333, 370, 406, 458, 460, 469, 485, 496, 505, 518, 548, 550, 556, 559, 565, 581, 584, 595, 604, 640, 649, 655, 667, 676, 694, 703, 730, 766, 802 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
496 is a term: s(496) = 4+9+6 = 19, p(s(496)) = 1*9 = 9, p(496) = 4*9*6 = 216, s(p(496)) = 2+1+6 = 9.
845 is a term: s(845) = 8+4+5 = 17, p(s(845)) = 1*7 = 7, p(845) = 8*4*5 = 160, s(p(845)) = 1+6+0 = 7.
From Jon E. Schoenfield, Jun 15 2024: (Start)
Expressed more visually:
.
Sum Sum
496 --------> 19 845 --------> 17
| 4+9+6 | | 8+4+5 |
P | 4 P | P | 8 P |
r | * r | 1 r | * r | 1
o | 9 o | * o | 4 o | *
d | * d | 9 d | * d | 7
| 6 | | 5 |
v Sum v v Sum v
216 --------> 9 160 --------> 7
2+1+6 1+6+0
(End)
MAPLE
P:=proc(q) local a, b, c; a:=convert(q, base, 10): b:=convert(a, `+`): c:=convert(a, `*`):
if convert(convert(b, base, 10), `*`)=convert(convert(c, base, 10), `+`) then q; fi; end: seq(P(i), i=1..10^3); # Paolo P. Lava, Jun 15 2024
MATHEMATICA
p[n_] := Times @@ IntegerDigits[n]; Select[Range[1000], p[DigitSum[#]] == DigitSum[p[#]] &] (* Paolo Xausa, Jun 17 2024 *)
PROG
(Python)
from math import prod
def ok(n):
d = list(map(int, str(n)))
p, s = prod(d), sum(d)
return sum(map(int, str(p))) == prod(map(int, str(s)))
print([k for k in range(1, 803) if ok(k)]) # Michael S. Branicky, Jun 15 2024
CROSSREFS
Sequence in context: A037264 A274124 A045910 * A110002 A232709 A249334
KEYWORD
easy,nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 03:13 EDT 2024. Contains 375959 sequences. (Running on oeis4.)