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.

A062237 Numbers k which are (sum of digits of k) concatenated with (product of digits of k).

This page as a plain text file.
%I A062237 #35 Apr 02 2025 09:43:20
%S A062237 0,10,20,30,40,50,60,70,80,90,119,1236,19135,19144,261296,3634992,
%T A062237 43139968
%N A062237 Numbers k which are (sum of digits of k) concatenated with (product of digits of k).
%C A062237 For a d-digit number with d >= 88, the sum and product of the digits together have fewer than d digits. So every element of this sequence has 87 or fewer digits, hence it is finite. - _David W. Wilson_, Apr 28 2005
%C A062237 Fixed points of the map A380873: concatenate sum and product of digits. - _M. F. Hasler_, Apr 01 2025
%e A062237 1236 has sum of digits 12 and product of digits 36.
%t A062237 sdpdQ[n_]:=Module[{idn=IntegerDigits[n],s,p},s=Total[idn];p=Times@@idn;n==FromDigits[Join[IntegerDigits[s],IntegerDigits[p]]]]; Select[Range[44*10^6],sdpdQ] (* _Harvey P. Dale_, Nov 23 2024 *)
%o A062237 (Python)
%o A062237 from math import prod
%o A062237 from sympy.utilities.iterables import multiset_permutations as mp
%o A062237 from itertools import count, islice, combinations_with_replacement as mc
%o A062237 def c(s):
%o A062237     d = list(map(int, s))
%o A062237     return sorted(s) == sorted(str(sum(d)) + str(prod(d)))
%o A062237 def ok(s):
%o A062237     d = list(map(int, s))
%o A062237     return s[0] != '0' and "".join(s) == str(sum(d)) + str(prod(d))
%o A062237 def nd(d): yield from ("".join(m) for m in mc("0123456789", d))
%o A062237 def b(): yield from (s for d in count(1) for s in nd(d) if c(s))
%o A062237 def a(): yield from (int("".join(p)) for s in b() for p in mp(s) if ok(p))
%o A062237 print(list(islice(a(), 16))) # _Michael S. Branicky_, Jun 30 2022
%Y A062237 Cf. A007953 (sum of digs), A007954 (product of digs), A038364, A038369, A066282, A380873, A380872 (trajectories under map).
%K A062237 nonn,base,fini,full
%O A062237 1,2
%A A062237 _Erich Friedman_, Jun 30 2001
%E A062237 More terms from _Harvey P. Dale_, Jul 04 2001
%E A062237 More terms from _David W. Wilson_, Apr 28 2005; he reports on May 03 2005 that there are no further terms.
%E A062237 Offset corrected by _Altug Alkan_, Apr 10 2018