Items tagged with digits

>nombor1:=[4,6,2];

nombor1:=[4,6,2]

 

Hi, anyone know hot i need to continue my command to get 462 from [4,6,2]?

Thank you~=]]

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

(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.....

 

 

Hi,

restart;
.123456789*.123456789;
                                               0.01524157875

i need Maple to respond   0.015241578750190521 by adjusting Digits number dynamically. I don't want to adjust  the Digits Number to a fixed value.

Thanks!

This is not actually a question, but an interesting problem found in the recent book (2nd edition, 2015):
Mathematica®: A Problem-Centered Approach
by  Hazrat Roozbeh
Springer

I hope that you will enjoy the problem too.

Define the functions f, h : N --> N by
f(n) = the sum of the squares of the digits of n; e.g. f(25) = 2^2 + 5^2 = 29.
h(n) = min {f(n), f(f(n)), f(f(f(n))), ... };  e.g. h(7)  = min{49,97,130,10,1} = 1.

A natural number n is happy if h(n) = 1.
Find all the happy ages, i.e., happy numbers up to 100.
Conclude that happy ages are mostly before one gets a job or after retirement!

Hi. I want to solve this system of equations by varying the value of n. I managed to aolve and plot for n=1, 1.1 and 1.2 but it happens to be a problem when I let n=1.3.

>restart;

>Digits := 15;

>with(plots):n:=1.3: mu(eta):=(diff(U(eta),eta)^(2)+diff(V(eta),eta)^(2))^((n-1)/(2)):

>Eqn1 := 2*U(eta)+(1-n)*eta*(diff(U(eta), eta))/(n+1)+diff(W(eta), eta) = 0;

>Eqn2 := U(eta)^2-(V(eta)+1)^2+(W(eta)+(1-n)*eta*U(eta)/(n+1))*(diff(U(eta), eta))-mu(eta)*(diff(U(eta), eta, eta))-(diff(U(eta), eta))*(diff(mu(eta), eta)) = 0;

>Eqn3 := 2*U(eta)*(V(eta)+1)+(W(eta)+(1-n)*eta*U(eta)/(n+1))*(diff(V(eta), eta))-mu(eta)*(diff(V(eta), eta, eta))-(diff(V(eta), eta))*(diff(mu(eta), eta)) = 0;

>bcs1 := U(0) = 0, V(0) = 0, W(0) = 0;

>bcs2 := U(20) = 0, V(20) = -1;

>R1 := dsolve({Eqn1, Eqn2, Eqn3, bcs1, bcs2}, {U(eta), V(eta), W(eta)}, initmesh = 30000, output = listprocedure, numeric);


Error, (in dsolve/numeric/bvp) precision is insufficient for required absolute error, suggest increasing Digits to approximately 23 for this problem

>for l from 0 by 2 to 20 do R1(l) end do;
>plot1 := odeplot(R1, [eta, U(eta)], 0 .. 20, numpoints = 2000, color = red);


Error, (in plots/odeplot) input is not a valid dsolve/numeric solution

 

I have tried increasing the Digits as suggested to 23, 25, 30, 31 up untill 500 yet still same error occur suggesting to increase the Digits. Is there any other way to solve this kind of error? Can someone help me? Thank you in advance.

 

Hi everybody,

Ever since i updated to maple 2015, the output of calculations display a disproportionate amount of zeros. For instance:

If i write:

2.3*10^(-4)

i get:

0.000230000000000

Is there anyway to make maple NOT display the last 10 zeros? I've tried Tools ->Options ->Precision -> Round screen display to X. But then it rounds all results to that X amount of digits, wich is also anoying. Like, if i set X to be 10, it'll write 3.000000000 instead of just 3.

Hope someone can help me :-)


Anton

FP3.mw

Hi all,

I write this code with some matricial calculations.

There are two important parameters N and Digits (in red in the code).

For N=8, I can do the calculation with Digits=10. For N=10, to get the results (without overflow), I should give Digits=30.

I want to do the calculation for N=100 and higher.

I do not know how to do this. I have a PC with 4G of RAM.

Thank you

 

How to find the maximum natural number n s. t. the sum of its cubed digits is greater than or equal to n? Of course, with Maple. The same question for the sum of the  digits to k-th power. Here are my unsuccessful attempts:
1.Optimization:-Maximize(n, {n <= convert(map(c ->c^3, convert(n, base, 10)), `+`)}, assume = integer);

Error, invalid input: `convert/base` expects its 1st argument, n, to be of type {integer, list(integer)}, but received n


2. for n while n <= convert(map(c ->c^3, convert(n, base, 10)), `+`) do print(n) end do;

                               1
                               2
                               3
                               4
                               5
                               6
                               7
                               8
                               9

I found this problem in a book about mathematica.
I want repeat it with maple.
But even Digits=1400, the exact value of s@x=70 is still different with the result(0.633319) on that book.
How to resolve this problem?
I want some help.

code:
restart;
Digits:=1400:
p:=convert(series(cos(x),x,201),polynom):
s:=add(op(i,p),i=[1,2,3,-1,-2,-3]);
add(evalf(coeff(p,x,i))*70^i,i=[200,198,196])+add(evalf(coeff(p,x,i))*70^i,i=[2])+add(evalf(coeff(p,x,i))*70^i,i=[4]);
#plot(s,x=0..40,view=[0..40,-2..2],numpoints=6000,gridlines,style=point);
simplify(eval(s,x=70));
evalf(%);

I have a pair of markov matrices that are 250x250 and 500x500 in size. I am raising these matrices to high powers, like 10^17 by 10^12. (I'm using a do loop.) If I set digits:=15, Maple will use 100% of the processor that is available. If I set digits:=16+ Maple will only use 1 thread of my processor. Why? It is the same matrix same program. The only thing that changes is the digits of accuracy. This seems exactly backwards from what it should be. As a result, my AMD9590 processor will run full blast when I choose 15 digits of accuracy and gets the biggest matrix done in 1-2 hours. If i set the accuracy to 17 digits, it takes half a day or more to do the same thing!!! 2 digits of greater accuracy should not take an additional 20 hours!

 

Thanks 

I would like to announce a new unofficial record computation of the MRB constant that was finished on Sun 21 Sep 2014 18:35:06.

I really would like to see someone beat it with Maple!

It took 1 month 27 days 2 hours 45 minutes 15 seconds. I computed 3,014,991 digits of the MRB constant, (confirming my previous 2,00,000 or more digit computation was actually accurate to 2,009,993 digits), with Mathematica 10.0. I Used my version of Richard Crandall's code:

 

____________________________________________________________________________

(*Fastest (at MRB's end) as of 25 Jul 2014.*)

DateString[]

prec = 3000000;(*Number of required decimals.*)ClearSystemCache[];

T0 = SessionTime[];

expM[pre_] := 

  Module[{a, d, s, k, bb, c, n, end, iprec, xvals, x, pc, cores = 12, 

    tsize = 2^7, chunksize, start = 1, ll, ctab, 

    pr = Floor[1.005 pre]}, chunksize = cores*tsize;

   n = Floor[1.32 pr];

   end = Ceiling[n/chunksize];

   Print["Iterations required: ", n];

   Print["end ", end];

   Print[end*chunksize]; d = ChebyshevT[n, 3];

   {b, c, s} = {SetPrecision[-1, 1.1*n], -d, 0};

   iprec = Ceiling[pr/27];

   Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;

        x = N[E^(Log[ll]/(ll)), iprec];

        pc = iprec;

        While[pc < pr, pc = Min[3 pc, pr];

         x = SetPrecision[x, pc];

         y = x^ll - ll;

         x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];(*N[Exp[Log[ll]/ll],

        pr]*)x, {l, 0, tsize - 1}], {j, 0, cores - 1}, 

       Method -> "EvaluationsPerKernel" -> 4]];

    ctab = ParallelTable[Table[c = b - c;

       ll = start + l - 2;

       b *= 2 (ll + n) (ll - n)/((ll + 1) (2 ll + 1));

       c, {l, chunksize}], Method -> "EvaluationsPerKernel" -> 2];

    s += ctab.(xvals - 1);

    start += chunksize;

    Print["done iter ", k*chunksize, " ", SessionTime[] - T0];, {k, 0,

      end - 1}];

   N[-s/d, pr]];

t2 = Timing[MRBtest2 = expM[prec];]; DateString[]

Print[MRBtest2]

MRBtest2 - MRBtest2M

_________________________________________________________________________.

 

I used a six core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz with 64 GB of RAM of which only 16 GB was used.

t2 From the computation was {1.961004112059*10^6, Null}.

 

 

 

for example i want to save the Square root of 2 to 1000000 decimal place to an ascii text file ...

i used the writeto command after evalf[100](sqrt(2)) for but it contains line breaks and \ character in output !

but i only need the pure continues 1000000 digits !

please guide me on this simple request ?

How can I change the decimal to be displayed in the whole spreadsheet. The default decimals to be displayed is 4 in my version. How can I change it to another value? Also I don't want to click on "properties" each time I execute my worksheet. I want it to be automatically display  the number of digits I want. 

1 2 3 Page 1 of 3