login
Number of comma-children of n in base 10.
2

%I #18 Dec 25 2023 13:30:48

%S 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,2,1,

%T 1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,2,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,

%U 1,1,2,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1

%N Number of comma-children of n in base 10.

%H Michael S. Branicky, <a href="/A367622/b367622.txt">Table of n, a(n) for n = 1..10000</a>

%t f[n_]:=Module[{k=n+10*Last[IntegerDigits[n]]+Range[9]},Length[Select[k,#-n==

%t FromDigits[{Last[IntegerDigits[n]],First[IntegerDigits[#]]}]&]]]; f/@Range[108] (* _Ivan N. Ianakiev_, Dec 24 2023 *)

%o (Python)

%o def a(n):

%o x = 10*(n%10)

%o return len([y for y in range(1, 10) if str(n+x+y)[0] == str(y)])

%o print([a(n) for n in range(1, 95)]) # _Michael S. Branicky_, Dec 23 2023

%Y Cf. A121805, A367338 (definition), A367341 (0's), A367346 (2's).

%K nonn,base

%O 1,14

%A _N. J. A. Sloane_, Dec 23 2023