The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A232709 Nonnegative integers such that the sum of digits mod 10 equals the product of digits mod 10. 1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 48, 84, 109, 123, 132, 137, 145, 154, 159, 173, 178, 187, 190, 195, 208, 213, 228, 231, 233, 235, 237, 239, 248, 253, 268, 273, 280, 282, 284, 286, 288, 293, 307, 312, 317, 321, 323, 325, 327, 329, 332, 337, 347, 352, 357, 367, 370, 371, 372, 373, 374, 375, 376, 377 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
293 is in the sequence because 2+9+3 = 14 == 4 mod 10 and 2*9*3 = 54 == 4 mod 10.
MATHEMATICA
Select[Range[0, 400], Mod[Total[IntegerDigits[#]], 10]==Mod[Times@@ IntegerDigits[ #], 10]&] (* Harvey P. Dale, Oct 15 2021 *)
PROG
(JavaScript)
for (i=0; i<1000; i++) {
s=i.toString().split("");
sl=s.length;
c=0; d=1;
for (j=0; j<sl; j++) {c+=s[j]*1; d*=s[j]; }
c%=10; d%=10;
if (c==d) document.write(i+", ");
}
(PARI) is(n) = my(d=digits(n)); vecsum(d)%10==vecprod(d)%10 \\ David A. Corneth, Oct 15 2021
(Python)
from math import prod
def ok(n): d = list(map(int, str(n))); return sum(d)%10 == prod(d)%10
print([k for k in range(378) if ok(k)]) # Michael S. Branicky, Oct 15 2021
CROSSREFS
Cf. A034710.
Sequence in context: A045910 A128290 A110002 * A249334 A338257 A064158
KEYWORD
nonn,base
AUTHOR
Jon Perry, Nov 28 2013
EXTENSIONS
Offset changed from 0 to 1 by N. J. A. Sloane, Oct 15 2021
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 May 21 01:24 EDT 2024. Contains 372720 sequences. (Running on oeis4.)