cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062382 Positive numbers whose product of digits is 5 times their sum.

Original entry on oeis.org

257, 275, 345, 354, 435, 453, 527, 534, 543, 572, 725, 752, 1258, 1285, 1528, 1582, 1825, 1852, 2158, 2185, 2235, 2253, 2325, 2352, 2518, 2523, 2532, 2581, 2815, 2851, 3225, 3252, 3522, 5128, 5182, 5218, 5223, 5232, 5281, 5322, 5812, 5821, 8125, 8152
Offset: 1

Views

Author

Amarnath Murthy, Jun 27 2001

Keywords

Examples

			2235 belongs to the sequence as (2*2*3*5)/(2+2+3+5) = 60/12 = 5.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[9000],Times@@IntegerDigits[#]==5*Total[IntegerDigits[#]]&] (* Harvey P. Dale, Mar 01 2012 *)
  • PARI
    isok(n) = my(d=digits(n)); vecprod(d)==5*vecsum(d) \\ Mohammed Yaseen, Aug 02 2022
    
  • Python
    from math import prod
    def ok(n): d = list(map(int, str(n))); return prod(d) == 5*sum(d)
    print([k for k in range(1, 9000) if ok(k)]) # Michael S. Branicky, Aug 02 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jul 06 2001
Offset corrected by Mohammed Yaseen, Aug 02 2022