brian bovril

889 Reputation

16 Badges

18 years, 300 days

MaplePrimes Activity


These are questions asked by brian bovril

Hello,

Paraphrasing:

https://en.m.wikipedia.org/wiki/Langford_pairing

given a sequence of 2n numbers 1,1,2,2,3,3,...n,n in which the two 1's are 1 slot apart, the two 2's are 2 slots apart, the two 3's are 3 slots apart, -> generally the two n's are n slots apart.

for n=3, a possible sequence is [2,3,1,2,1,3]. 

There is sequences for n=4,7,8...

i havent a clue how to write a maple procedure to generate a sequence for given n, but I'm hoping an expert here can.

Experts.

When I subtract (in base 10) 235 (octal digits) from its reverse I get  [-1,-1,2]. converting this list to number equals 189 (base 10)....divisible by 7. [I would think the list would be [9,8,1] ;

in wolfram alpha 532 base 8 - 235  base 8 = 189 base 10 ).

Converting 189 to octal yields 275. All this is done correctly in Maple.

Now when I add 275 base 8 to 572 (edit: not 575 as I had before) base 8 I should get 1067 base 8, but I don't....

for sure i've done something silly

octal.mw

Hi. Is there a maple function which can interpolate values from a simple table:

given (x,y) compute z value

eg z(0.5,0.5)=1.5

x:=[0,1,2];y:=[0,1,2]

array:=[0,2,4;1,3,5;2,4,6] #probably the wrong input, but you get the idea

ArrayInterpolation?

there is a method in vba:

http://www.tushar-mehta.com/excel/newsgroups/interpolation/#Two_dimensional_interpolation_

(Some) prime reciprocals have an interesting property. the repeating sequence has length p-1.

eg 7, has repeats after 6.

1/7=0.142857142857......

17 has repeats after 16

1/17=0.05882352941176470588235294117647059.........

of course some primes don''t have this property....

So what I need the experts here is for some code

myproc(17)=16, (and the sequence) 0588235294117647

my go:pinched from

http://199.71.183.11/questions/39621-Pattern-Matching-In-A-Sequence-Of-Digits

PriDigits := "" || (op(1, evalf(1/17, 50)));

reps := StringTools[Repeats](PriDigits);

lngth := seq(op(3, A), A in [reps]);

the leading 0 (which is part of the sequence)  is a problem.....

 

 

Occasionally I have need to import 1D Maple expressions into Mathematica, because I believe mma has superior simplify functionality (sorry Maple). Mathematica has its own syntax which (of course) differs to maple.  eg sin(x) in maple is Sin[x] in mma ; ln(x)=Log[x] ;....... I'm aware of the package MmaTranslator, but I think it only converts mma to maple.

so i need some code pls.

(i have bolded the functions which need to be converted)

eg: i/p:

(1/365)*(365*B21*EP*ln(1+i)*(1+i)^B21*hr*kw*p-365*EP*hr*kw*p*(1+i)^(-1+B21)*i-365*EP*hr*kw*p*(1+i)^(-1+B21)+365*EP*hr*kw*p+SC*i)/(hr*kw*(EP*ln(1+i)*(1+i)^B21*p-FIT*i*p+cos(omega)))

o/p:

(1/365)*(365*B21*EP*Log[1+i]*(1+i)^B21*hr*kw*p-365*EP*hr*kw*p*(1+i)^(-1+B21)*i-365*EP*hr*kw*p*(1+i)^(-1+B21)+365*EP*hr*kw*p+SC*i)/(hr*kw*(EP*Log[1+i]*(1+i)^B21*p-FIT*i*p+Cos[omega]))

 

First 15 16 17 18 19 20 21 Last Page 17 of 34