login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357734 Array T(n,k), read by descending antidiagonals, whose rows are numbers congruent to p or q mod r, with 0 <= p < q < r, sorted by r, then p, then q. 1

%I #27 Nov 05 2022 08:19:03

%S 0,1,0,2,1,0,3,3,2,1,4,4,3,2,0,5,6,5,4,1,0,6,7,6,5,4,2,0,7,9,8,7,5,4,

%T 3,1,8,10,9,8,8,6,4,2,1,9,12,11,10,9,8,7,5,3,2,10,13,12,11,12,10,8,6,

%U 5,3,0,11,15,14,13,13,12,11,9,7,6,1,0

%N Array T(n,k), read by descending antidiagonals, whose rows are numbers congruent to p or q mod r, with 0 <= p < q < r, sorted by r, then p, then q.

%C When r is even, there are r/2 rows for which q - p = r/2. The definition reduces to "numbers congruent to p mod r/2" for these rows. They are kept here for the sake of completeness.

%C The coefficients in the a(k) formula match those in the e.g.f. If we start with the a(k) formula we get the constant of the e.g.f. by setting a(0)=0.

%C The sum of two rows with the same r is a row. In fact (using nonnegative integers), any linear combination of rows with the same r yields a row. The same linear combination applied to p, q and r for the rows gives P, Q and R for the combined row. The linear combination also links the steps for the rows with the steps for the combined row.

%H David Lovler, <a href="/A357734/b357734.txt">Table of n, a(n) for n = 1..9316</a> (First 136 antidiagonals).

%F T(n,k) = T(n,k-1) + T(n,k-2) - T(n,k-3), k > 3.

%F Each row has the following formulas given p,q,r for the row.

%F If the row offsets are 1,

%F a(k) = (2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4.

%F G.f.: x*(p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2).

%F E.g.f.: r - q + ((2*r*x + 2*p + 2*q - 3*r)*exp(x) - (2*p - 2*q + r)*exp(-x))/4.

%F If the row offsets are 0,

%F a(k) = (2*r*k + 2*p + 2*q - r + (2*p - 2*q + r)*(-1)^k)/4.

%F G.f.: (p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2).

%F E.g.f.: ((2*r*x + 2*p + 2*q - r)*exp(x) + (2*p - 2*q + r)*exp(-x))/4.

%e T(n,k) begins

%e 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 congruent to 0 or 1 mod 2

%e 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21 congruent to 0 or 1 mod 3

%e 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21 congruent to 0 or 2 mod 3

%e 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22 congruent to 1 or 2 mod 3

%e 0, 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 24, 25, 28 congruent to 0 or 1 mod 4

%e 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 congruent to 0 or 2 mod 4

%e 0, 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28 congruent to 0 or 3 mod 4

%e 1, 2, 5, 6, 9, 10, 13, 14, 17, 18, 21, 22, 25, 26, 29 congruent to 1 or 2 mod 4

%e 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29 congruent to 1 or 3 mod 4

%e 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30 congruent to 2 or 3 mod 4

%e Row 84 (A047319) with p,q,r = 5,6,7 begins

%e 5, 6, 12, 13, 19, 20, 26, 27, 33, 34, 40, 41, 47, 48, 54, 55, 61, 62, 68, 69.

%e With offset 1 this row has the following formulas.

%e a(k) = (2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4

%e = (2*7*k + 2*5 + 2*6 - 3*7 - (2*5 - 2*6 + 7)*(-1)^k)/4

%e = (14*k + 1 - 5*(-1)^k)/4.

%e G.f.: x*(p + (q - p)*x + (r - q)*x^2) / ((1 + x)*(x - 1)^2)

%e = x*(5 + (6 - 5)*x + (7 - 6)*x^2) / ((1 + x)*(x - 1)^2)

%e = x*(5 + x + x^2) / ((1 + x)*(x - 1)^2).

%e E.g.f.: r - q + ((2*r*x + 2*p + 2*q - 3*r)*exp(x) - (2*p - 2*q + r)*exp(-x))/4

%e = 7 - 6 + ((2*7*x + 2*5 + 2*6 - 3*7)*exp(x) - (2*5 - 2*6 + 7)*exp(-x))/4

%e = 1 + ((14*x + 1)*exp(x) - 5*exp(-x))/4.

%e Example of a linear combination of rows.

%e For r=3, the rows are

%e 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15 congruent to 0 or 1 mod 3 steps [1, 2]

%e 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15 congruent to 0 or 2 mod 3 steps [2, 1]

%e 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16 congruent to 1 or 2 mod 3 steps [1, 2].

%e L={2,3,7} applied to the above three rows yields

%e 7, 22, 43, 58, 79, 94, 115, 130, 151, 166, 187 congruent to 7 or 22 mod 36.

%e L for steps. 2*[1,2] + 3*[2,1] + 7*[1,2] = [2,4] + [6,3] + [7,14] = [15,21].

%o (PARI) {for(r=2,10,for(p=0,r-2,for(q=p+1,r-1,print1(p," or ",q," mod ",r," ");

%o forstep(i=p,10*r,[q-p,r-q+p],print1(i", "));print)))}

%o (PARI) M=[0..19];

%o {for(r=3,6,for(p=0,r-2,for(q=p+1,r-1,newrow=List();

%o for(k=1,20,listput(newrow,(2*r*k + 2*p + 2*q - 3*r - (2*p - 2*q + r)*(-1)^k)/4;));

%o M=matconcat([M;Vec(newrow)]))));

%o T(n,k)=M[n,k];}

%o M

%Y The first column is A144629.

%K nonn,tabl,easy

%O 1,4

%A _David Lovler_, Oct 11 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 12:22 EDT 2024. Contains 374394 sequences. (Running on oeis4.)