Is this "base" array suitable for the OEIS?

26 views
Skip to first unread message

Ali Sada

unread,
May 7, 2026, 5:55:14 AM (7 days ago) May 7
to seq...@googlegroups.com
Hi everyone,

Hope all is well. I want to introduce the triangular array below. It counts the number of appearances of A(n,k) when we multiply a pair of digits in base n. For example, in base 10, digit 1 appears 3 times (1*1, 3*7, and 9*9), so A(1,10) = 3. The digits start with 1 and end with 0 in each column. I found out that the main diagonal is A174088, and the numbers that form these pairs are counted in A016035. I have proposed some changes in both sequences. If this array is suitable for the OEIS, I would really appreciate the support with the definition, terms, and program.

Best,

Ali

1 1 2 2 3 2 4 4 4 3
  2 1 2 2 3 4 4 3 6
    3 1 2 3 3 2 6 2
      5 3 4 4 7 4 7
        5 1 3 2 3 5
          8 3 4 6 7
            7 2 4 2
              11 3 6
                12 3
                  14



Ruud H.G. van Tol

unread,
May 7, 2026, 8:44:11 AM (7 days ago) May 7
to seq...@googlegroups.com

On 2026-05-07 11:55, Ali Sada wrote:
> [...] counts the number of appearances of A(n,k) when we multiply a
> pair of digits in base n. For example, in base 10, digit 1 appears 3
> times (1*1, 3*7, and 9*9), so A(1,10) = 3. [...]

Assuming d_1 <= d_2:
in base-10, 2*5, 2*6, 2*7, 2*8, 2*9, 3*4, 3*5, 3*6, 4*4, also have a
1-digit.
So is it meant as Mod(base)?

-- Ruud

Ali Sada

unread,
May 7, 2026, 8:48:08 AM (7 days ago) May 7
to seq...@googlegroups.com
Yes. It counts only the leading digit. Thank you. 

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/94082e7c-18f4-4599-b015-823c65969c50%40isolution.nl.

Ruud H.G. van Tol

unread,
May 7, 2026, 9:33:50 AM (7 days ago) May 7
to seq...@googlegroups.com

On 2026-05-07 14:47, Ali Sada wrote:
> Yes. It counts only the leading digit. Thank you.
>
> On Thu, May 7, 2026 at 8:44 AM 'Ruud H.G. van Tol' via SeqFan
> <seq...@googlegroups.com> wrote:
>
>
> On 2026-05-07 11:55, Ali Sada wrote:
> > [...] counts the number of appearances of A(n,k) when we multiply a
> > pair of digits in base n. For example, in base 10, digit 1
> appears 3
> > times (1*1, 3*7, and 9*9), so A(1,10) = 3. [...]
>
> Assuming d_1 <= d_2:
> in base-10, 2*5, 2*6, 2*7, 2*8, 2*9, 3*4, 3*5, 3*6, 4*4, also have a
> 1-digit.
> So is it meant as Mod(base)?
>

Any specific reason why 0 isn't at the start?

(PARI)
col(b) = {
  my(r=vector(b), k);
  for(i=0, b-1
  , for(j=i, b-1
    , r[ if(k=i*j%b, k, b)]++
    )
  );
  r;
}


Alternative format, with a row per base, and starting with 0:

[ 1]
[ 2, 1]
[ 3, 2,  1]
[ 5, 2,  2, 1]
[ 5, 3,  2, 2,  3]
[ 8, 2,  3, 3,  4, 1]
[ 7, 4,  4, 3,  4, 3,  3]
[11, 4,  4, 2,  7, 2,  4, 2]
[12, 4,  3, 6,  4, 3,  6, 4,  3]
[14, 3,  6, 2,  7, 5,  7, 2,  6, 3]
[11, 6,  5, 6,  6, 6,  5, 5,  5, 6, 5]
[21, 4,  4, 5, 10, 2, 10, 2,  8, 6, 4, 2]
[13, 7,  6, 7,  7, 6,  6, 6,  6, 7, 7, 6, 7]
[20, 4, 10, 3, 10, 3,  9, 7, 10, 4, 9, 4, 9, 3]

-- Ruud

row(n)= {
  my(r=vector(n));
  for(i=0, n-1
  , for(j=i, n-1
    , r[i*j%n+1]++
    )
  );
  r
}

Ali Sada

unread,
May 7, 2026, 9:38:40 AM (7 days ago) May 7
to seq...@googlegroups.com
Because zero doesn't exist in base 1. In any case, I would really appreciate any suggestions regarding the formation of the array. I started the columns by 1 and ended with 0, but maybe there is a batter way.

Best,

Ali 

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.

Ruud H.G. van Tol

unread,
May 7, 2026, 12:56:29 PM (7 days ago) May 7
to seq...@googlegroups.com

On 2026-05-07 15:38, Ali Sada wrote:
> Because zero doesn't exist in base 1. In any case, I would really
appreciate any suggestions regarding the formation of the array. I
started the columns by 1 and ended with 0, but maybe there is a batter way.

In base 1, <empty> is the zero-value, and <empty> * <empty> MOD 1 ==
<empty>, so the count for the zero-result is 1.

>     Alternative format, with a row per base, and starting with 0:
>
>     [ 1]
>     [ 2, 1]
>     [ 3, 2,  1]
>     [ 5, 2,  2, 1]
>     [ 5, 3,  2, 2,  3]
>     [ 8, 2,  3, 3,  4, 1]
>     [ 7, 4,  4, 3,  4, 3,  3]
>     [11, 4,  4, 2,  7, 2,  4, 2]
>     [12, 4,  3, 6,  4, 3,  6, 4,  3]
>     [14, 3,  6, 2,  7, 5,  7, 2,  6, 3]
>     [11, 6,  5, 6,  6, 6,  5, 5,  5, 6, 5]
>     [21, 4,  4, 5, 10, 2, 10, 2,  8, 6, 4, 2]
>     [13, 7,  6, 7,  7, 6,  6, 6,  6, 7, 7, 6, 7]
>     [20, 4, 10, 3, 10, 3,  9, 7, 10, 4, 9, 4, 9, 3]
>

Notice that in this alternative format, each row /starts/ with the value
that is at the /end/ of your column.
BTW, its column 2 is like A180783, A007897.

-- Ruud

Ali Sada

unread,
May 7, 2026, 2:51:17 PM (7 days ago) May 7
to seq...@googlegroups.com
Thank you. I would really appreciate it if you could check before I submit. 

Triangle array T(n,k) read by rows: T(n,k) is the number of pairs of digits (d1, d2) in base n such that (d1 * d2) mod n = k.

1, 2, 1, 3, 2, 1, 5, 2, 2, 1, 5, 3, 2, 2, 3, 8, 2, 3, 3, 4, 1, 7, 4, 4, 3, 4, 3, 3, 11, 4, 4, 2, 7, 2, 4, 2, 12, 4, 3, 6, 4, 3, 6, 4, 3, 14, 3, 6, 2, 7, 5, 7, 2, 6, 3, 11, 6, 5, 6, 6, 6, 5, 5, 5, 6, 5, 21, 4, 4, 5, 10, 2, 10, 2, 8, 6, 4, 2, 13, 7, 6, 7, 7, 6, 6, 6, 6, 7, 7, 6, 7, 20, 4, 10, 3, 10, 3, 9, 7, 10, 4, 9, 4, 9, 3

Offset: 1,0
Keyword: base, tabl

    1
    2, 1
    3, 2,  1
    5, 2,  2, 1
    5, 3,  2, 2,  3
    8, 2,  3, 3,  4, 1
    7, 4,  4, 3,  4, 3,  3
    11, 4,  4, 2,  7, 2,  4, 2
    12, 4,  3, 6,  4, 3,  6, 4,  3
    14, 3,  6, 2,  7, 5,  7, 2,  6, 3
    11, 6,  5, 6,  6, 6,  5, 5,  5, 6, 5
    21, 4,  4, 5, 10, 2, 10, 2,  8, 6, 4, 2
    13, 7,  6, 7,  7, 6,  6, 6,  6, 7, 7, 6, 7
    20, 4, 10, 3, 10, 3,  9, 7, 10, 4, 9, 4, 9, 3



--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.

L. Edson Jeffery

unread,
May 7, 2026, 3:03:23 PM (7 days ago) May 7
to seq...@googlegroups.com
Hello Ali. It appears that the row sums are the triangular numbers.

 Best regards,

Ed Jeffery 

Ali Sada

unread,
May 7, 2026, 3:09:48 PM (7 days ago) May 7
to seq...@googlegroups.com
Thank you Ed. Yes they are because the sum is the number of possible distinct pairs of digits between zero and n-1. 

Ali Sada

unread,
May 7, 2026, 5:47:01 PM (7 days ago) May 7
to seq...@googlegroups.com
Sorry to come back to this again, but in this shape zero doesn't appear in base 1, so T(1,1) is 0, and T(1,2) is 1. That doesn't make it a perfect triangular array, right?

Best,

Ali  

M F Hasler

unread,
May 7, 2026, 6:41:42 PM (7 days ago) May 7
to seq...@googlegroups.com
On Thu, May 7, 2026 at 2:51 PM Ali Sada <ali....@gmail.com> wrote:
Triangle array T(n,k) read by rows: T(n,k) is the number of pairs of digits (d1, d2) in base n such that (d1 * d2) mod n = k.
    1
    2, 1

But in base n, there are n² pairs of digits so the row sums should be n² and not n(n+1)/2 as now.
Obviously you don't want to distinguish (d1,d2) from (d2,d1) but the mathematical notion of "pair" implies that distinction.
The simplest way to avoid counting such "equivalent" pairs twice might be to insert "..., d1 <= d2, ...".

- Maximilian 
Reply all
Reply to author
Forward
0 new messages