OFFSET
1,5
COMMENTS
If the restriction x < y is removed then there are exactly twice as many results.
Results for n = 13 calculated independently by Markus Kroetzsch and Denny Vrandecic, results for n = 14 to 20 calculated solely by Markus Kroetzsch.
EXAMPLE
The a(4) = 1 addition sum in base 4 is 1 + 2 = 3.
The a(5) = 6 addition sums in base 5 are:
1 + 2 = 3,
1 + 3 = 4,
2 + 3 = 10,
3 + 4 = 12,
1 + 24 = 30,
4 + 21 = 30.
PROG
(PARI) A387334(n)={ sum(Lx=1, n\3, sum(Ly=Lx, (n-Lx)\2, my(cnt=0, ii=2+(Lx<3)*Lx, dz); forvec(dxy=vector(Lx+Ly, i, [Ly<3, n-1]), forperm(if(dxy[1], dxy, concat([dxy[2..ii], 0, dxy[ii+1..-1]])), d, (d[Lx+1] && d[#d] && d[Lx]) || next; Lx<Ly || d[1]<d[Lx+1] || (d[1]<dxy[#dxy] && next) || break; #(dz=digits(fromdigits(d[1..Lx], n)+fromdigits(d[-Ly..-1], n), n))==#(dz=Set(dz)) && !#setintersect(dz, dxy) && cnt++), 2); cnt))} \\ M. F. Hasler, Sep 06 2025
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Denny Vrandecic, Aug 26 2025
STATUS
approved
