[seqfan] Re: Divisibility sequences
Robert Munafo
mrob27 at gmail.com
Fri Dec 18 15:20:16 CET 2009
"N. J. A. Sloane" wrote:
>
> Actually, for an irregular triangle, it is better to
> use the keyword "tabf" (funny triangle)
> and simply read the coefficiants across the rows. So your example
Anti-diagonals are better because they allow one to derive the triangle from
the sequence. It makes the sequence self-contained. Otherwise the assignment
from sequence back to triangle is ambiguous, one would need a "length of
each row in the triangle" sequence.
Your Legendre example (A008316) isn't really a jagged triangle anyway
because the number of items in row N is 1+floor(n/2). It's about as
non-jagged as you can get (-: (Checked in Maxima, using commands like
"nterms(expand(legendre_p(25,z)));")
Let's go back to "Bill(rwg"'s example; I have verified the coefficients now
using Maxima code below. I wouldn't call this one "jagged" either, but it
grows somewhat irregularly: the highest exponent of each successive
polynomial is: 0, 0, 0, 1, 1, 2, 3, 2, 5, 6, 7, 9, 10, 12, 14, 14, 18, 20,
22, 25, 27, 30, 33, 34, 39, 42, 45, 49, 52, 56, 60, 62, 68, 72, ... (The
number of items in each row of the triangle is one more, and neither
sequence is in OEIS)
So it grows kind of irregularly, and this sequence or row lengths would have
to be entered separately.
Maybe you would suggest entering all three sequences (antidiagonal,
collapsed rows, and length of each row)?
Triangle begins:
[1]
[1]
[- 1]
[0, 1]
[1, 1]
[- 1, - 1, 1]
[- 1, - 1, 0, - 1]
[0, - 2, - 3]
[1, 3, 3, 0, - 1, 1]
[1, 3, 0, - 5, - 2, 0, - 1]
[- 1, - 3, - 3, - 5, - 9, - 3, 2, - 1]
[0, 3, 12, 15, 5, - 2, - 3, - 1, 1, - 1]
[1, 6, 15, 16, 0, - 6, 12, 13, 0, 1, 1]
[- 1, - 6, - 9, 10, 40, 39, 22, 23, 15, - 4, - 2, 3, - 1]
[- 1, - 6, - 15, - 30, - 70, - 113, - 75, 7, 11, - 13, - 3, - 3, - 3, 1, -
1]
Here's the code:
/* [Bill(rwg)]'s example "elliptic divisibility sequence" from seqfan */
print(" "); print("i=",1," : ",ed[1]:1);
print(" "); print("i=",2," : ",ed[2]:1);
print(" "); print("i=",3," : ",ed[3]:-1);
print(" "); print("i=",4," : ",ed[4]:x);
print(" "); m:20; /* m is max number of additional rows to calculate */
for i:1 thru m step 1 do (
ed[i+4]: ratsimp((ed[i+3]*ed[i+1] + ed[i+2]^2)/ed[i]),
print("i=",i+4," : ",ed[i+4] = factor(ed[i+4])),
print(" ")
);
hpl:[]; ntl:[]; /* highest powers, and number of terms */
for i:1 thru m+4 step 1 do (
l:[],
hp:hipow(ed[i],x),
hpl:append(hpl,[hp]),
ntl:append(ntl,[hp+1]),
for j:0 thru hp step 1 do (
l:append(l,[coeff(ed[i],x,j)])
),
print("row", i, "has", hp+1, "term(s):", l)
);
print(" ");
print("Highest power of x in each polynomial ed[n] is:");
print(hpl);
print("Number of terms in each row of the triangle is:");
print(ntl);
"N. J. A. Sloane" wrote:
>
> Actually, for an irregular triangle, it is better to
> use the keyword "tabf" (funny triangle)
> and simply read the coefficiants across the rows. So your example
>
> 1 0 0 0 0 0 0 . . .
> 1 0 0 0 0 0 0
> -1 0 0 0 0 0 0
> 1 1 0 0 0 0 0
> -1 -1 1 0 0 0 0
> -1 -1 0 -1 0 0 0
> 0 -2 -3 0 0 0 0
> 1 3 -3 -1 1 0 0 . . .
> . . .
> . . .
>
> would becomne the sequence
>
> 1 1 -1 1 1 -1 -1 1 -1 -1 0 -1 ...
>
> See A008316, coeffts of Legenre polynomials, for a classical example.
>
--
Robert Munafo -- mrob.com
More information about the SeqFan
mailing list