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.

A380873 Concatenate sum and product of decimal digits of n.

This page as a plain text file.
%I A380873 #16 Apr 12 2025 18:19:25
%S A380873 0,11,22,33,44,55,66,77,88,99,10,21,32,43,54,65,76,87,98,109,20,32,44,
%T A380873 56,68,710,812,914,1016,1118,30,43,56,69,712,815,918,1021,1124,1227,
%U A380873 40,54,68,712,816,920,1024,1128,1232,1336,50,65,710,815,920,1025,1130,1235,1340,1445,60
%N A380873 Concatenate sum and product of decimal digits of n.
%C A380873 This sequence is motivated by A271220 and A271268 (maybe others?) which give the trajectory of specific starting values under iterations of this map.
%C A380873 The fixed points of this map, (0, 10, ..., 90, 119, 1236, ...), are listed in sequence A062237 (except for 0).
%C A380873 Besides the fixed points, this map has also limiting cycles, for example:
%C A380873 * the cycle C(88) = (88, 1664, 17144, 17112, 1214) of length 5, first reached for initial values 8 (cf. A271268) and 38, 83, 88, 146, ....
%C A380873 * Another 5-cycle is C(18168) = (18168, 24384, 21768, 24672, 21672), first reached for initial values 188 and 233.
%C A380873 The infinite square array A380872 gives the trajectory of starting value r = 0, 1, 2, ... in row r.
%H A380873 Alois P. Heinz, <a href="/A380873/b380873.txt">Table of n, a(n) for n = 0..10000</a>
%e A380873 For n = 0, ..., 9, a(n) = 11*n because sum and product of digits of n are equal to n.
%e A380873 a(10) = concat(1+0, 1*0) = 10, a(11) = concat(1+1, 1*1) = 21, a(12) = concat(1+2, 1*2) = 32, etc.
%p A380873 a:= n-> (l-> parse(cat(add(i, i=l), mul(i, i=l))))(convert(n, base, 10)):
%p A380873 seq(a(n), n=0..60);  # _Alois P. Heinz_, Apr 12 2025
%t A380873 a[n_]:=FromDigits[Join[IntegerDigits[Total[IntegerDigits[n]]],IntegerDigits[Times@@IntegerDigits[n]]]];Array[a,61,0] (* _James C. McMahon_, Apr 02 2025 *)
%o A380873 (PARI) apply( {A380873(n)=eval(Str(vecsum(n=digits(n)),if(n,vecprod(n))))}, [0..99])
%o A380873 (Python)
%o A380873 from math import prod
%o A380873 def A380873(n): return int(f"{sum(d:=list(map(int,str(n))))}{prod(d)}")
%o A380873 print(first_99 := list(map(A380873,range(99))))
%Y A380873 Cf. A007953 (sum of digits), A007954 (product of digits).
%Y A380873 Cf. A062237 (fixed points of this map).
%Y A380873 Cf. A271220 (trajectory of 6), A271268 (trajectory of 8), A380872 (trajectories of all nonnegative integers as rows of a table).
%K A380873 nonn,base
%O A380873 0,2
%A A380873 _M. F. Hasler_, Apr 01 2025