Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@David Sycamore Thanks for the clarification, especially of last. My first several attempts at generating the sequence failed because I interpretted "last" as "most recent" rather than "most recent unmarked."

@David Sycamore

Your new sequence (the one generated by the code in my Answer immediately above) contains a copy of itself as an evenly spaced subsequence; specifically, a(4*q+2) = a(q-1), q > 0. I derived simple algebraic formulae for the other remainders mod 4: a(4*q+r), r in {0, 1, 3}. Thus, the sequence can be computed by an ordinary recursion (no counting, auxilliary tables, etc.), and recursion is only used in 1/4 of the cases.

A_:= proc(n::nonnegint)
option remember;
local N:= 2^(ilog2(n+1)-1), r, q:= iquo(n,4,r)-1;
   `if`(r=0, q, `if`(r=2, thisproc(q), `if`(n > 3*N-r/2, 7, 5)*N/2 - 2*q - (r+9)/2))
end proc: 
#Initialize remember table:
(A_(0), A_(1), A_(2), A_(5)):= (0, 0, 0, 2)
: 

I verified that this matches the previous code for the first 100,000 terms. This code computes about 300,000 terms per second on my modest computer.

This sequence needs a catchy name.

@ajfriedlan Issue the command currentdir(); before both the save and read commands. Do the two currentdirs return the same string? If not, that's your problem. Use currentdir("some path name") to set the current directory to the same value in each worksheet.

@tomleslie I'm not sure---and I wouldn't mind being proven wrong---but I don't think that that'll work with a Matrix of highly symbolic entries such as described by the OP.

@ajfriedlan Sorry, I missed a comma in my command. It should be

save M, "MyData.map";

@David Sycamore I need you to clarify the rule "a(n+1) = index of the last term k = a(n)". In particular, what is meant by index and what is meant by last? I can think of two conflicting definitions for each:

Index: For the term a(n), is n the index? Or is n+1 the index because the term appears in the (n+1)th ordinal position?

Last: In the sequence 1, 2, 3, is 1 or 3 the last term?

@Kitonum I hope that you don't need me to tell you that that's extremely inefficient; for example, it takes over 500 times as long as mine to compute the first 2^13 terms.

@mtango345 For the example in your Reply immediately above, r:= <cos(2*t), sin(2*t), 4*t>, it is trivial to get a closed-form expression for the arclength over any interval 0 <= tau <= t, as you have done: s = 2*sqrt(5)*t. And then it's trivial to find the inverse function of that: t = s/2/sqrt(5). If you try to do that with your original function r:= <cos(2*t), sin(3*t), 4*t>, you'll find that the arclength integral is quite complicated, and finding its symbolic inverse is impossible. Hence, numerical methods are used in the Answers by Kitonum and VV.

Do you intend there to be any relationship between any of the  variables u[]u[1]u[2]u[1,1]u[1,2]u[2,2]? If they are all intended to be independent of each other, that is fine. But u[] seems to be a strange name for a variable.

@zhuxian "1D" is an abbreviation of "one-dimensional" which is another name for "plaintext" or ASCII or character style Maple Input.

@TeyhaNeedHelp So, if you look closely at the equations in the paper, is it true that the boundary condition is f ' '(6) = 0, as I guessed? Surely f ' '(0) = 0 is incorrect; that's obvious from the plot.

@zakaria You're welcome. I'm sorry that I cannot investigate your Question further because I don't have MapleSim. I hope that someone else will get to it. You will greatly improve your chances of getting an Answer if you upload all relevant files, not just pictures (screenshots).

@David Sycamore I'm not sure exactly what you're saying/asking about twin primes, but hopefully this Reply will clear up some issues for you anyway.

Let's apply the Proposition with which I started this Answer to finite arithmetic progressions (APs)[*1]: Any AP-3 (p, p+2, p+4) necessarily contains a multiple of 3 (which may be 3 itself), regardless of whether p is prime. So 3, 5, 7 is the only possible AP-3 of twin primes. Thus, if the even number e for the example is 2, then must start 3, 5, .... Likewise, any AP-3 (p, p+4, p+8) also necessarily contains a multiple of 3, so 3, 7, 11 is the only possible AP-3 of cousin primes; and so if e=4, then must start 3, 7, .... But if e is a multiple of 6, the situation is different: (p, p+6, p+12) definitely does NOT contain a multiple of 3 for p prime, p > 3. This allows the possibility of examples starting 5, 11, ...7, 13, ...5, 17, ...; etc., and indeed my program in the Reply immediately above has generated examples for these.

The significance of 6 is that it's the primorial[*2] of 3, sometimes denoted 3#. Proposition 2: If an AP-n (q + k*e $ k= 0..n-1)q > n, contains only primes, then necessarily e is a multiple of n#.

[*1] Definition: finite arithmetic progression (AP) is a finite sequence of n terms x, x+d, x+2*d, ..., x + (n-1)*d. In Maple syntax that's (x + k*d $ k= 0..n-1). An AP of n terms is sometimes called an AP-n. While in general d <= 0 is allowed, there's no point in considering this case for the study of prime numbers. So, I'll specify that d > 0, and so all APs are strictly increasing sequences. If every term of an AP-n is prime, it's sometimes called a PAP-n.

[*2] Definition: For x > 0, we define the primorial of x as the product of all primes less than or equal to x. It is sometimes denoted x#; however, this is not Maple syntax.

I gave this Question a Vote Up yesterday, as can be seen in its header. So why is the OP's reputation still 0?

@David Sycamore is declared in the first line of doWork (its proc(...) line) as its second parameter. Hence, the subsequent call doWork(j, Neven) makes equal to Neven.

First 250 251 252 253 254 255 256 Last Page 252 of 709