login
A387334
Number of addition sums of the form x + y = z with 0 < x < y in base n, where each digit of the base appears at most once among all of x, y and z.
1
0, 0, 0, 1, 6, 17, 40, 153, 650, 1991, 6580, 29855, 135510, 552769, 2286248, 12645869, 66642290, 327091959, 1705795612, 9596727627
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
Sequence in context: A213780 A101945 A220407 * A013319 A047861 A370589
KEYWORD
nonn,base,more
AUTHOR
Denny Vrandecic, Aug 26 2025
STATUS
approved