## 812 Reputation

3 years, 161 days

## At a first step, one might infer that s...

At a first step, one might infer that searching for some rule behind your sequence, reduces to find some rule in the sequences of the exponents.
A good starting point is the OEIS data base, look  https://oeis.org

OEIS doesn't reference any of these 3 sequences

• the sequence of the exponents of 3
• the sequence of the exponents of 2
• the sequence obtained by interleaving the two previous one

Unfortunately OEIS handles sequences of integer only, so you can't go further (even the smallest is to high a number to be used in OEIS).
So the OEIS option seems to be given up.

Maybe knowing where your sequence comes from could help ?

## Is it what you mean by "export" ?...

If you want to save the solution in some file, just type

save pds, myfile    # I use to use ".m" file ; myfile is a string

To reuse the solution in a new worksheet :

restart:
anames(user) ; # will return you the the name(s) of the read objects it's not necessary but it can help if, like me, you're airhead

## If you just want something for this part...

If you just want something for this particular case, here is a probably not very elegant solution

 > eq16 := r(t) = d__vol*V/(K*U*S*V^2+L*tau)
 (1)
 > a := rhs(eq16)
 (2)
 > an := numer(a)/V;
 (3)
 (4)
 > eq17 := lhs(eq16) = an / ad
 (5)
 >

## Maybe this could help ?   Downloa...

Maybe this could help ?

 > f := piecewise(-Pi <= x and x < 0, 1, 0 <= x and x < Pi, 0); la := latex(f);
 \cases{1&$-\pi \leq x$\  and \ $x<0$\cr 0&$0\leq x$\  and \ $x<\pi$\cr}
 > lla := latex(f, output=string);
 (1)
 > LA := StringTools:-SubstituteAll(la, "and", "\\vedge");
 (2)
 > printf("%s\n", LA);
 \cases{1&$-\pi \leq x$\  \vedge \ $x<0$\cr 0&$0\leq x$\  \vedge \ $x<\pi$\cr}
 >

## Hi,    Here is something unp...

Hi,

I think you will be able to improve this the way you want

parametric.mw

## You can use this...

restart:
NewList := proc(L::list, treshold::{integer, float})::list:
map(u -> if u < treshold then 2*u else u end if, L):
end proc:
a := [\$(1..10)];
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
b := 5:
NewList(a, b);
[2, 4, 6, 8, 5, 6, 7, 8, 9, 10]

## Very interesting problem...

@Les

Your problem relates to some of my own.
One of them is Bayesian Inference and directed acyclic grapgs (DAG) are a very important tool here.
I'm often worried by the difficulty do draw these DAG with Maple, that's why your problem triggered my interest.

I don't  know if this can help you, but I provide you this little Maple code, just in case

PermutationGraph.mw

## Try the Pearson's system...

Give a look to this site https://en.wikipedia.org/wiki/Pearson_distribution

The Pearson's system is based upon the observation that the probability density function (PDF) of some "classical" continuous random variables (RV), are solution of an ordinary differential equation (ODE)
This ODE depends on 4 parameters the values of them can be expressed in terms of the four first moments of the RV.
Several statistical softwares use this characterization to "identify" the PDF of the population a given sample if drawn from.

I do not know if you are familiar with the language R (https://cran.r-project.org), but it offers the package https://cran.r-project.org/web/packages/PearsonDS/PearsonDS.pdf to do the job.

It should not be very complicated (here again, if you know R, it's easy to derive manually a MAPLE code from a R code) to develop  a procedure that would "identify" the underlying PDF from its first four empirical moments.
The main problem with the Pearson's system is essentially that the solution is very sensitive to the numerical values of the moments.
You need to have a sufficiently large sample for the those values are reliable estimations of the true values. If not the "identification" process will return you unusual distribution (they will correctly fit the data but [look to the wiki page] , their mathematical expression can be quite uncommon).

Please feel free to contact me for further informations.

## You're wrong !...

You're wrong when you write

They match up very poorly. I can get a better fit by using Geogebra (which produces a function 48.7 * sin(0.52x + 0.56) + 1124.95, which fits the data much better).

Fit or LinearFit are both trying to minimize the residual sum of squares (RSS) between the observations Y and the fitted model.

MapleFit       := unapply(f, x):
GeogebraFit := x -> 48.7 * sin(0.52*x + 0.56) + 1124.95:

6029.89196586546
6080.525269

Then, obviously, Maple returns a better fit than Geogebra does.
I think you make a confusion between "the Geogebra fit is better than the Maple fit" and "the Geogebra fit  suits me more than the fit Maple fit."

More of this, what kind of solution are you looking for ?
It seems you prefer (Geogebra) a slowly oscilating model ?
For Geogebra's solution exhibits 2 periods within the 0..24 range, try this

MyModel := x -> A*sin(b*x+c)+d;

This solution (up to the precision of the computations) has practically the same RSS (6029.8909...) than the original Maple's solution, but oscillates as slowly as the Geogebra's solution.
Mariusz Iwaniuk provided here a close solution by other means (only the phase shiftings substantially differ)

Using Optimization:-NLPSolve can enable you to control the ranges of the parameters A, b, c, d if you have any prior knowledge about them.
But this last result raises the fundamental question : Are you sure that your fitting problem has only one solution ?
tomleslie's "respectfully disagree" answer gives a simple proof of the existence of a continuum of solutions

And, finally, think tabout that : the curve A*sin(b*x)+d densily fills the strip [X]x[d-A, d+A] as b tends to infinity ; my guess is that without no upper bound to the value of b, A*sin(b*x)+d is able to pass arbitrarily close to any (Xn, Yn) point (does anyone here have some mathematical argument to confirm/infirm this claim ?)
If I'm right, the RSS then tends to 0 as b tens to infinity

## Could this suit you ?...

I'm not familiar with MAPLE TA and so I do not understand if your problem is related to MAPLE TA itself or to the construction of the histogram of a weighted sample ?
For the second point you could use the content of the joint file

WeightedSample.mw

Hope it helps

## An alternative view : linearize the prob...

The problem is basically of the form U = A*V + B.
After some suitable transformations a LinearFit can give the solution

## You can cheat ......

Here is a trick I am used to using :

restart:
with(GraphTheory):
with(SpecialGraphs):

G     := CycleGraph(9):
POS := GetVertexPositions(G);
EG   := Edges(G);

PLOT(
seq( CURVES([POS[EG[i][1]], POS[EG[i][2]]], LINESTYLE(3) ), i=1..numelems(Edges(G))),
POINTS(POS, SYMBOL(_SOLIDBOX, 35), COLOR(RGB, 1, 1, 0)),
seq(TEXT(POS[i], i), i=1..numelems(Vertices(G))),
AXESSTYLE(NONE)
)

Now it is up to you to adjust colors, symbols and line styles and "manually" highlight edges and vertices.

## Replace ......

Replace the lines

with(plottools):
with(plots):

By this single one

uses plottools, plots:

Seems it works for me

## Just for fun : a No-Maple solution...

Observe first that 3375 = 3^3 * 5^3.

Each divisor D of 3375 writes  3^p*5^q where p and q verify this set of inequalities

0 <= p <=3,

0 <= q <=3,

0 <=  p+q <= 6

For any such divisor D, there exist a sequence of D odd numbers (D is odd), centered at C = 3^(3-p)*5^(3-q) ,

such that the sum of all its member is 3375

Ex : p = 1, q = 0 : D = 3, C = 1125 and the sequence is [1123, 1125, 1127]

Ex : p = 0, q = 5 : D = 5, C = 675 ans the sequence is [671, 673, 675, 677, 679]

...

There exist 16 such sequences, a number equal to the product of all the p (0, 1, 2, 3) and q (0, 1, 2, 3) values

The shortest has only one element (sequence [3375]) and is obtained with the choice p=q=0

The largest has 3375 elements and is center at 1 (p=q=3)

A sequence has only positive elements if its center C diminished by half its range 2*(D-1)/2  is at least equal to 1.

Which writes C - D - 1 >= 1 or, more conveniently C - D - 1 > -1 ==> C - D > 0

Finally : a sequence has only positive elements iif : 3^(3-p)*5^(3-q) - 3^p*5^q > 0 or equivalently if

3^(3-2p)*5^(3-2q) > 1

When p takes values 0, 1, 2, 3,  3^(3-2p) 27, 3, 1/3, 1/27

Similarly 5^(3-2q) has values 125, 5, 1/5, 1/125

What are the couples (p,q) such that the product 3^(3-2p)*5^(3-2q) is larger than 1 ?

q =0 ==> 5^(3-2q) = 125 which is higher than the lower (1/27) value of 3^(3-2p)

then the admissible couples (p,q) are (0, 0), (1, 0), (2, 0), (3, 0)

q =1 ==> 5^(3-2q) = 5 and the only values of  3^(3-2p) larger than 1/5 are 27, 3, 1/3

then the admissible couples (p,q) are (0, 1), (1, 1), (2, 1),

q =2 ==> 5^(3-2q) = 1/5 and the only value of  3^(3-2p) larger than 5 is 27

then the single one couple (p,q) is (0, 2)),

All strictly positive sequences are obtained by these 8 (p, q) couples

 First 8 9 10 Page 10 of 10
﻿