cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A331787 T(b,n) is the largest m such that there exists N such that none of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N in base b. Square array read by ascending antidiagonals.

This page as a plain text file.
%I A331787 #33 Jul 06 2024 19:04:33
%S A331787 0,0,2,0,1,6,0,2,4,14,0,1,2,7,30,0,2,4,6,16,62,0,1,4,3,14,25,126,0,2,
%T A331787 2,6,8,14,52,254,0,1,4,5,4,13,30,79,510,0,2,4,6,8,10,28,62,160,1022,0,
%U A331787 1,2,3,8,5,22,23,62,241,2046,0,2,4,6,8,10,12,34,48,126,484,4094
%N A331787 T(b,n) is the largest m such that there exists N such that none of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N in base b. Square array read by ascending antidiagonals.
%C A331787 Write n = (b-1)*s + t, 1 <= t <= b-1. The smallest N_0 such that none of S(N_0), S(N_0+1), ..., S(N_0+m-1) is divisible by n is given by N_0 = b^(u_0) - b^s*(t-gcd(t,b-1)+1) + 1, where u_0 is the smallest nonnegative solution to (b-1)*u == -gcd(t,b-1) (mod n). See my link below for more detailed information.
%H A331787 Jianing Song, <a href="/A331787/b331787.txt">Table of n, a(n) for n = 2..7627</a> (Note: T(b,n) occurs at the ((n+b-2)*(n+b-1)/2-b+3)-th place)
%H A331787 Jianing Song, <a href="/A331787/a331787.pdf">Proof of the formula, and the examples N_0 such that none of S(N_0), S(N_0+1), ..., S(N_0+m-1) is divisible by n</a>.
%F A331787 If n = (b-1)*s + t, 1 <= t <= b-1, then T(b,n) = b^s*(2*t-gcd(t,b-1)+1) - 2. See my link for a proof of the formula.
%F A331787 T(b,n) = T(b,n-1) + b*T(b,n-b+1) - b*T(b,n-b) for b >= 2, n >= b+1.
%F A331787 T(b,n) = O(b^(n/(b-1))).
%e A331787 Table begins
%e A331787   b\n  1  2  3   4   5   6    7    8    9    10
%e A331787    2   0  2  6  14  30  62  126  254  510  1022
%e A331787    3   0  1  4   7  16  25   52   79  160   241
%e A331787    4   0  2  2   6  14  14   30   62   62   126
%e A331787    5   0  1  4   3   8  13   28   23   48    73
%e A331787    6   0  2  4   6   4  10   22   34   46    34
%e A331787    7   0  1  2   5   8   5   12   19   26    47
%e A331787    8   0  2  4   6   8  10    6   14   30    46
%e A331787    9   0  1  4   3   8   9   12    7   16    25
%e A331787   10   0  2  2   6   8   8   12   14    8    18
%o A331787 (PARI) T(b,n) = my(s=(n-1)\(b-1), t=(n-1)%(b-1)+1); b^s*(2*t-gcd(t,b-1)+1)-2
%Y A331787 Cf. A331789.
%Y A331787 Cf. A000918 (row 2), A164123 (row 3), A331786 (row 10).
%K A331787 nonn,base,easy,tabl
%O A331787 2,3
%A A331787 _Jianing Song_, Jan 25 2020