%I #38 Mar 05 2022 11:07:24
%S 1,2,3,4,5,6,7,8,9,10,1,11,2,12,13,14,5,15,16,17,18,19,10,20,1,21,2,
%T 22,23,4,24,5,25,26,27,28,29,10,30,1,31,2,32,3,33,34,5,35,6,36,37,38,
%U 39,10,20,40,1,41,2,42,43,4,44,5,15,45,46,47,8,48,49,10,50
%N Irregular triangle read by rows: the n-th row gives the divisors of n ending with the final digit of n.
%H Stefano Spezia, <a href="/A346393/b346393.txt">First 5000 rows of the triangle, flattened</a>
%e The triangle begins:
%e 1
%e 2
%e 3
%e 4
%e 5
%e 6
%e 7
%e 8
%e 9
%e 10
%e 1 11
%e 2 12
%e 13
%e 14
%e 5 15
%e 16
%e 17
%e 18
%e 19
%e 10 20
%e 1 21
%e 2 22
%e 23
%e 4 24
%e 5 25
%e 26
%e 27
%e 28
%e 29
%e 10 30
%e 1 31
%e 2 32
%e 3 33
%e 34
%e 5 35
%e 6 36
%e 37
%e 38
%e 39
%e 10 20 40
%e ...
%t r[n_]:=Drop[Select[Divisors[n],(Mod[#,10]==Mod[n,10]&)]]; Flatten[Array[r, 50]]
%o (Python)
%o from sympy import divisors
%o def auptorow(nn):
%o for n in range(1, nn+1):
%o yield from [d for d in divisors(n) if d%10 == n%10]
%o print([an for an in auptorow(50)]) # _Michael S. Branicky_, Jul 21 2021
%o (PARI) row(n) = select(x->(x%10) == (n%10), divisors(n)); \\ _Michel Marcus_, Jul 25 2021
%Y Cf. A010879, A027750, A330348 (row length).
%K nonn,tabf,base
%O 1,2
%A _Stefano Spezia_, Jul 21 2021