Carl Love

Carl Love

27778 Reputation

25 Badges

12 years, 190 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Adri wrote:

...it is automatically filled with zeros on the empty places.

Zero is the default, but the fill value can be anything, including NULL.

b:= Matrix([a||(1..4)], fill= NULL);

The advantage of NULL is that it is automatically removed when converted to a list.

convert(b^%T, listlist);
 
[[1, 5, 4, 2], [2, 3, 8, 2], [4, 4, 5], [5, 5, 4], [3, 7], [2, 8], [3], [4], [5]]

@Christopher2222 wrote:

On interpretations of the same sentence.  
He didn't marry her because she was rich - (he didn't marry her)
He didn't marry her because she was rich - (he did marry her)

When the subordinate clause ("because she was rich") does not change the meaning of the main clause ("he didn't marry her"), it needs to be set off with a comma.

He didn't marry her, because she was rich. (He didn't marry her.)
He didn't marry her because she was rich. (He did marry her.)

Can you give a more specific example? I'm especially having trouble with the part about z being a function of t. And why is the answer not simply a_k(t)?

Both evalc and expand work for me in Maple 16.02 (and Maple 17). What does expand give you? The command made specifically for this purpose is evalc. The simplified value that you gave is wrong however.

Your last equation is not linear, assuming the Rs are the unknowns, because it has two Rs per term.

Please upload your worksheet, not an image. It is more than inconvenient for us to download the image: We can't be sure what you actually typed into Maple without having the worksheet.

What is the solution? I explicitly checked every k from -2^22 to 2^22, and none worked.

@aminumustafa I am guessing that your method uses a fixed stepsize. There are about a dozen fixed-stepsize methods available in the Maple (pre-packaged) library, some of them implicit. These are there for educational exploration rather than practical problem solving. You can find a description of the methods at ?Student,InitialValueProblem and ?dsolve,classical. The Student package contains a number of tools for comparison of methods.

@Markiyan Hirnyk 

Here I present some insight into my mental process in analyzing such a sequence and finding the patterns. It is mostly mental arithmetic and mental pattern recognition, but Maple helps a little. Here's a worksheet:

 

``

A := [5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63, 83, 85, 87, 91, 93, 99, 109, 111, 117, 135, 163, 165, 171, 189, 245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325, 327, 333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739, 741, 747, 757, 759, 765, 783, 811, 813, 819, 837, 891, 973, 975, 981, 999, 1053, 1215, 1459, 1461, 1467, 1485, 1539, 1701, 2189, 2191, 2193, 2197, 2199, 2205, 2215, 2217, 2223, 2241, 2269, 2271, 2277, 2295, 2349, 2431, 2433, 2439, 2457, 2511, 2673, 2917, 2919, 2925, 2943, 2997, 3159, 3645, 4375, 4377, 4383, 4401, 4455, 4617, 5103, 6563, 6565, 6567, 6571, 6573, 6579, 6589, 6591, 6597, 6615, 6643, 6645, 6651, 6669, 6723, 6805, 6807, 6813, 6831, 6885, 7047, 7291, 7293, 7299, 7317, 7371, 7533, 8019, 8749, 8751, 8757, 8775, 8829, 8991, 9477, 10935, 13123, 13125, 13131, 13149, 13203, 13365, 13851, 15309, 19685, 19687, 19689, 19693, 19695, 19701, 19711, 19713, 19719, 19737, 19765, 19767, 19773, 19791, 19845, 19927, 19929, 19935, 19953, 20007, 20169, 20413, 20415, 20421, 20439, 20493, 20655, 21141, 21871, 21873, 21879, 21897, 21951, 22113, 22599, 24057, 26245, 26247, 26253, 26271, 26325, 26487, 26973, 28431, 32805, 39367, 39369, 39375, 39393, 39447, 39609, 40095, 41553, 45927]:

 

I notice that the sequence is strictly increasing, so I will look at the first differences. Further, every term is odd, so I might as well divide the differences by two

 

A1 := ([seq])((A[k]-A[k-1])*(1/2), k = 2 .. nops(A));

[1, 2, 1, 1, 2, 1, 4, 1, 1, 2, 1, 3, 5, 1, 3, 10, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 28, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 82, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 244, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 730, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 729, 1094, 1, 3, 9, 27, 81, 243, 729, 2188, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 729, 1094, 1, 3, 9, 27, 81, 243, 729, 2187, 3281, 1, 3, 9, 27, 81, 243, 729, 2187]

(1)

 

Many of the terms in A1 look familiar, powers of 3. Apply ifactor.

 

A2 := map(ifactor, A1);

[1, ``(2), 1, 1, ``(2), 1, ``(2)^2, 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(2)*``(5), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(2)^2*``(7), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(2)*``(41), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)^2*``(61), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(2)*``(5)*``(73), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)*``(547), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)^2*``(547), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)*``(547), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(3)^7, ``(17)*``(193), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(3)^7]

(2)

 

Now you can see why my first guess was to add 2*3^8 to the last term (recall that I divided by 2 above). But I missed a small part of the cyclic pattern: The last group of powers of 3 repeats, followed by 2 times the number before the preceding 1. That's why my second guess was the last term plus 4*17*193.

 

After studying sequence A2 for a while, the cycles and epicycles become clear to me. I did not use any plots in my analysis, but the plot below shows the cycles nicely.

 

 

P1 := plot(([seq])([k, log[3](A1[k])], k = 1 .. nops(A1)), style = point, symbol = diamond, symbolsize = 8, gridlines):

P2 := plot(([seq])([k, log[3](A1[k])], k = 1 .. nops(A1)), thickness = 0, color = blue):

plots:-display([P1, P2]);

 

 

At this point, I did not understand the numbers like 17*193 that occasionally appeared in the pattern, but I knew exactly where they occurred. So, at this point I knew that I could generate another 54 = binomial(11,2)-1 terms of the sequence before I encountered another such number.

 

Now I analyze those special numbers, which also form an increasing sequence. I pick off those numbers starting from the end of the sequence A2, because the larger such numbers are easier to see in the pattern. It is harder to see the 1 and 2 as part of this subsequence because 1s and 2s appear in the pattern for other reasons also. But by carefully counting the position numbers within the patterns, I find them. I entered these by hand on the following line as I found them:

 

 

17*193, 2*547, 5*73, 2*61, 41, 2*7, 5, 2, 1;

3281, 1094, 365, 122, 41, 14, 5, 2, 1

(3)

 

I immediately see that each term in this sequence is 3 times the previous minus 1. Use rsolve.

 

rsolve({B(0) = 1, B(n) = 3*B(n-1)-1}, B(n));

(1/2)*3^n+1/2

(4)

 

At this point, I completely understand the pattern of cycles and epicycles (and epi-epicycles), although I don't have a closed form or even a recursive form. But I have enough information to write a procedure that generates a whole number of cycles.

 

 

A := proc (n::{nonnegint, identical(-1)}) local B, R, i, j, k; B := 1, 2, `$`('[1, `$`('[`$`(3^i, i = 0 .. j), (1/2)*3^(j+1)+1/2][]', j = 0 .. k), `$`(3^i, i = 0 .. k), 3^(k+1)+1][]', k = 0 .. n); R[0] := 5; for k to nops([B]) do R[k] := R[k-1]+2*B[k] end do; convert(R, list) end proc:

 

Bonus: I want a closed form for the number of terms that A(n) generates. This could be determined directly from an analysis of the code, but I think pattern finding is easier.

 

seq(nops(A(k)), k = 0 .. 8);

8, 17, 31, 51, 78, 113, 157, 211, 276

(5)

It's an increasing sequence: Look at first differences.

seq(nops(A(k+1))-nops(A(k)), k = 0 .. 8);

9, 14, 20, 27, 35, 44, 54, 65, 77

(6)

I immediately recognize that as the following sequence:

seq(binomial(n, 2)-1, n = 5 .. 13);

9, 14, 20, 27, 35, 44, 54, 65, 77

(7)

rsolve({C(0) = 8, C(n) = C(n-1)+binomial(n+4, 2)-1}, C(n));

5+(n+1)*((1/2)*n+1)*((1/3)*n+1)+2*(n+1)*((1/2)*n+1)+2*n

(8)

expand(%);

8+(1/6)*n^3+2*n^2+(41/6)*n

(9)

numer(%);

48+n^3+12*n^2+41*n

(10)

``

``


Download SeqAnalysis.mw

@Markiyan Hirnyk 

Here I present some insight into my mental process in analyzing such a sequence and finding the patterns. It is mostly mental arithmetic and mental pattern recognition, but Maple helps a little. Here's a worksheet:

 

A:=
[5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63, 83, 85, 87, 91, 93, 99, 109,
 111, 117, 135, 163, 165, 171, 189, 245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325,
 327, 333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739, 741, 747, 757, 759, 765,
 783, 811, 813, 819, 837, 891, 973, 975, 981, 999, 1053, 1215, 1459, 1461, 1467, 1485, 1539,
 1701, 2189, 2191, 2193, 2197, 2199, 2205, 2215, 2217, 2223, 2241, 2269, 2271, 2277, 2295,
 2349, 2431, 2433, 2439, 2457, 2511, 2673, 2917, 2919, 2925, 2943, 2997, 3159, 3645, 4375,
 4377, 4383, 4401, 4455, 4617, 5103, 6563, 6565, 6567, 6571, 6573, 6579, 6589, 6591, 6597,
 6615, 6643, 6645, 6651, 6669, 6723, 6805, 6807, 6813, 6831, 6885, 7047, 7291, 7293, 7299,
 7317, 7371, 7533, 8019, 8749, 8751, 8757, 8775, 8829, 8991, 9477, 10935, 13123, 13125,
 13131, 13149, 13203, 13365, 13851, 15309, 19685, 19687, 19689, 19693, 19695, 19701, 19711,
 19713, 19719, 19737, 19765, 19767, 19773, 19791, 19845, 19927, 19929, 19935, 19953, 20007,
 20169, 20413, 20415, 20421, 20439, 20493, 20655, 21141, 21871, 21873, 21879, 21897, 21951,
 22113, 22599, 24057, 26245, 26247, 26253, 26271, 26325, 26487, 26973, 28431, 32805, 39367,
 39369, 39375, 39393, 39447, 39609, 40095, 41553, 45927]:

I notice that the sequence is strictly increasing, so I will look at the first differences. Further, every term is odd, so I might as well divide the differences by two.

A1:= [seq]((A[k]-A[k-1])/2, k= 2..nops(A));

[1, 2, 1, 1, 2, 1, 4, 1, 1, 2, 1, 3, 5, 1, 3, 10, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 28, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 82, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 244, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 730, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 729, 1094, 1, 3, 9, 27, 81, 243, 729, 2188, 1, 1, 2, 1, 3, 5, 1, 3, 9, 14, 1, 3, 9, 27, 41, 1, 3, 9, 27, 81, 122, 1, 3, 9, 27, 81, 243, 365, 1, 3, 9, 27, 81, 243, 729, 1094, 1, 3, 9, 27, 81, 243, 729, 2187, 3281, 1, 3, 9, 27, 81, 243, 729, 2187]

Many of the terms in A1 look familiar, powers of 3. Apply ifactor.

A2:= map(ifactor, A1);

[1, ``(2), 1, 1, ``(2), 1, ``(2)^2, 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(2)*``(5), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(2)^2*``(7), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(2)*``(41), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)^2*``(61), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(2)*``(5)*``(73), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)*``(547), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)^2*``(547), 1, 1, ``(2), 1, ``(3), ``(5), 1, ``(3), ``(3)^2, ``(2)*``(7), 1, ``(3), ``(3)^2, ``(3)^3, ``(41), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(2)*``(61), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(5)*``(73), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(2)*``(547), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(3)^7, ``(17)*``(193), 1, ``(3), ``(3)^2, ``(3)^3, ``(3)^4, ``(3)^5, ``(3)^6, ``(3)^7]

Now you can see why my first guess was to add 2*3^8 to the last term (recall that I divided by 2 above). But I missed a small part of the cyclic pattern: The last group of powers of 3 repeats, followed by 2 times the number before the preceding 1. That's why my second guess was the last term plus 4*17*193.

 

After studying sequence A2 for a while, the cycles and epicycles become clear to me. I did not use any plots in my analysis, but the plot below shows the cycles nicely.

P1:= plot(
     [seq]([k, log[3](A1[k])], k= 1..nops(A1)),
     style= point, symbol= diamond, symbolsize= 8,
     gridlines
):

P2:= plot(
     [seq]([k, log[3](A1[k])], k= 1..nops(A1)),
     thickness= 0, color= blue
):

plots:-display([P1,P2]);

At this point, I did not understand the numbers like 17*193 that occasionally appeared in the pattern, but I knew exactly where they occurred. So, at this point I knew that I could generate another 54 = binomial(11,2)-1 terms of the sequence before I encountered another such number.

 

Now I analyze those special numbers, which also form an increasing sequence. I pick off those numbers starting from the end of the sequence A2, because the larger such numbers are easier to see in the pattern. It is harder to see the 1 and 2 as part of this subsequence because 1s and 2s appear in the pattern for other reasons also. But by carefully counting the position numbers within the patterns, I find them. I entered these by hand on the following line as I found them:

17*193, 2*547, 5*73, 2*61, 41, 2*7, 5, 2, 1;

3281, 1094, 365, 122, 41, 14, 5, 2, 1

I immediately see that each term in this sequence is 3 times the previous minus 1. Use rsolve.

rsolve({B(n)= 3*B(n-1)-1, B(0)=1}, B(n));

(1/2)*3^n+1/2

At this point, I completely understand the pattern of cycles and epicycles (and epi-epicycles), although I don't have a closed form or even a recursive form. But I have enough information to write a procedure that generates a whole number of cycles.

A:= proc(n::{nonnegint,identical(-1)})
local B, R, i, j, k;
     B:= 1, 2,

          '[1,

               '[3^i $ i= 0..j, (3^(j+1)+1)/2][]'

               $ j= 0..k,
          3^i $ i= 0..k, 3^(k+1)+1

          ][]' $ k= 0..n

     ;
     R[0]:= 5;
     for k to nops([B]) do  R[k]:= R[k-1] + 2*B[k]  end do;
     convert(R, list)
end proc:

Bonus: I want a closed form for the number of terms that A(n) generates. This could be determined directly from an analysis of the code, but I think pattern finding is easier.

seq(nops(A(k)), k= 0..8);

8, 17, 31, 51, 78, 113, 157, 211, 276

It's an increasing sequence: Look at first differences.

seq(nops(A(k+1))-nops(A(k)), k= 0..8);

9, 14, 20, 27, 35, 44, 54, 65, 77

I immediately recognize that as the following sequence:

seq(binomial(n,2)-1, n= 5..13);

9, 14, 20, 27, 35, 44, 54, 65, 77

rsolve({C(n)= C(n-1)+binomial(n+4,2)-1, C(0)=8}, C(n));

5+(n+1)*((1/2)*n+1)*((1/3)*n+1)+2*n+2*(n+1)*((1/2)*n+1)

expand(%);

8+(1/6)*n^3+2*n^2+(41/6)*n

numer(%);

n^3+12*n^2+41*n+48

 

 

Download SeqAnalysis.mw

@Carl Love Why doesn't that get a vote up?

@Carl Love Why doesn't that get a vote up?

@Markiyan Hirnyk 

The following procedure, when called with nonnegint argument n, will generate the first

 (n^3 + 12*n^2 + 41*n + 48)/6

terms of the sequence.

A:= proc(n::nonnegint)
local B, R, i, j, k;
     B:= [1, 2, seq([1, seq([seq(3^i, i= 0..j), (3^(j+1)+1)/2][], j= 0..k),
          seq(3^i, i= 0..k), 3^(k+1)+1][], k= 0..n)];
     R[0]:= 5;
     for k to nops(B) do  R[k]:= R[k-1] + 2*B[k]  end do;
     convert(R, list)
end proc:

A(8);
[5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63,
  83, 85, 87, 91, 93, 99, 109, 111, 117, 135, 163, 165, 171, 189,
245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325, 327,
333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739,
741, 747, 757, 759, 765, 783, 811, 813, 819, 837, 891, 973,
975, 981, 999, 1053, 1215, 1459, 1461, 1467, 1485, 1539, 1701,
2189, 2191, 2193, 2197, 2199, 2205, 2215, 2217, 2223, 2241,
2269, 2271, 2277, 2295, 2349, 2431, 2433, 2439, 2457, 2511,
2673, 2917, 2919, 2925, 2943, 2997, 3159, 3645, 4375, 4377,
4383, 4401, 4455, 4617, 5103, 6563, 6565, 6567, 6571, 6573,
6579, 6589, 6591, 6597, 6615, 6643, 6645, 6651, 6669, 6723,
6805, 6807, 6813, 6831, 6885, 7047, 7291, 7293, 7299, 7317,
7371, 7533, 8019, 8749, 8751, 8757, 8775, 8829, 8991, 9477,
10935, 13123, 13125, 13131, 13149, 13203, 13365, 13851, 15309,
19685, 19687, 19689, 19693, 19695, 19701, 19711, 19713, 19719,
19737, 19765, 19767, 19773, 19791, 19845, 19927, 19929, 19935,
19953, 20007, 20169, 20413, 20415, 20421, 20439, 20493, 20655,
21141, 21871, 21873, 21879, 21897, 21951, 22113, 22599, 24057,
26245, 26247, 26253, 26271, 26325, 26487, 26973, 28431, 32805,
39367, 39369, 39375, 39393, 39447, 39609, 40095, 41553, 45927,
59051, 59053, 59055, 59059, 59061, 59067, 59077, 59079, 59085,
59103, 59131, 59133, 59139, 59157, 59211, 59293, 59295, 59301,
59319, 59373, 59535, 59779, 59781, 59787, 59805, 59859, 60021,
60507, 61237, 61239, 61245, 61263, 61317, 61479, 61965, 63423,
65611, 65613, 65619, 65637, 65691, 65853, 66339, 67797, 72171,
78733, 78735, 78741, 78759, 78813, 78975, 79461, 80919, 85293,
98415, 118099, 118101, 118107, 118125, 118179, 118341, 118827,
120285, 124659, 137781, 177149]

@Markiyan Hirnyk 

The following procedure, when called with nonnegint argument n, will generate the first

 (n^3 + 12*n^2 + 41*n + 48)/6

terms of the sequence.

A:= proc(n::nonnegint)
local B, R, i, j, k;
     B:= [1, 2, seq([1, seq([seq(3^i, i= 0..j), (3^(j+1)+1)/2][], j= 0..k),
          seq(3^i, i= 0..k), 3^(k+1)+1][], k= 0..n)];
     R[0]:= 5;
     for k to nops(B) do  R[k]:= R[k-1] + 2*B[k]  end do;
     convert(R, list)
end proc:

A(8);
[5, 7, 11, 13, 15, 19, 21, 29, 31, 33, 37, 39, 45, 55, 57, 63,
  83, 85, 87, 91, 93, 99, 109, 111, 117, 135, 163, 165, 171, 189,
245, 247, 249, 253, 255, 261, 271, 273, 279, 297, 325, 327,
333, 351, 405, 487, 489, 495, 513, 567, 731, 733, 735, 739,
741, 747, 757, 759, 765, 783, 811, 813, 819, 837, 891, 973,
975, 981, 999, 1053, 1215, 1459, 1461, 1467, 1485, 1539, 1701,
2189, 2191, 2193, 2197, 2199, 2205, 2215, 2217, 2223, 2241,
2269, 2271, 2277, 2295, 2349, 2431, 2433, 2439, 2457, 2511,
2673, 2917, 2919, 2925, 2943, 2997, 3159, 3645, 4375, 4377,
4383, 4401, 4455, 4617, 5103, 6563, 6565, 6567, 6571, 6573,
6579, 6589, 6591, 6597, 6615, 6643, 6645, 6651, 6669, 6723,
6805, 6807, 6813, 6831, 6885, 7047, 7291, 7293, 7299, 7317,
7371, 7533, 8019, 8749, 8751, 8757, 8775, 8829, 8991, 9477,
10935, 13123, 13125, 13131, 13149, 13203, 13365, 13851, 15309,
19685, 19687, 19689, 19693, 19695, 19701, 19711, 19713, 19719,
19737, 19765, 19767, 19773, 19791, 19845, 19927, 19929, 19935,
19953, 20007, 20169, 20413, 20415, 20421, 20439, 20493, 20655,
21141, 21871, 21873, 21879, 21897, 21951, 22113, 22599, 24057,
26245, 26247, 26253, 26271, 26325, 26487, 26973, 28431, 32805,
39367, 39369, 39375, 39393, 39447, 39609, 40095, 41553, 45927,
59051, 59053, 59055, 59059, 59061, 59067, 59077, 59079, 59085,
59103, 59131, 59133, 59139, 59157, 59211, 59293, 59295, 59301,
59319, 59373, 59535, 59779, 59781, 59787, 59805, 59859, 60021,
60507, 61237, 61239, 61245, 61263, 61317, 61479, 61965, 63423,
65611, 65613, 65619, 65637, 65691, 65853, 66339, 67797, 72171,
78733, 78735, 78741, 78759, 78813, 78975, 79461, 80919, 85293,
98415, 118099, 118101, 118107, 118125, 118179, 118341, 118827,
120285, 124659, 137781, 177149]

Joe, Could you explain the significance of the operator &^ that you used? I don't mean explain mathematically, I mean explain its significance in Maple. Is there a package where differentials are expressed like that?

First 650 651 652 653 654 655 656 Last Page 652 of 705