![]() |
|
|
#1398 |
|
Aug 2006
597910 Posts |
I just don't understand what you're saying. Let's start from the top. Without using any Pari terminology, what are you trying to accomplish?
|
|
|
|
|
|
#1399 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
1)read strings into an array
2)find a meaning if possible. 3)once the array is of n length move every string forward one in the array, 4)add a new word in the last index of the array |
|
|
|
|
|
#1400 | |
|
Aug 2006
597910 Posts |
You probably should take a string as an argument, rather than reading from the keyboard.
That's the hard part, of course. Quote:
Code:
shiftforward(v)=vector(#v+1,i,if(i==1,"initial value", v[i-1])) |
|
|
|
|
|
|
#1401 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
yeah this part is mis-ordered but it's one we'll have to cover the hard part is make the array I think I have away I'll try it. yeah I was thinking of using FaR for one part and replacing with another word. |
|
|
|
|
|
|
#1402 | |
|
Aug 2006
3·1,993 Posts |
Quote:
Method 1, "Initialization": v=vector(size_of_vector, i, vector_value_at(i)) Method 2, "Set in a Loop": v=vector(size_of_vector); for(i=1,#v,v[i]=vector_value_at(i)) Method 3, "Size Not Known Ahead of Time" v=[]; for(x=start_x,stop_x,if(stuff_involving(x), v=concat(v, vector_value_at_x(x)))) |
|
|
|
|
|
|
#1403 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I want an array of each word in sequence. into an array then i can check the array for groupings of words I think to denote what it means.
|
|
|
|
|
|
#1404 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
I couldn't get any ecm / aliquot stuff to work for me so I built my own code unfortunately it only looks to work for perfect numbers.
Code:
Aliquot(n)= v=vector(1,x,n);for(a=2,10,d=sumdiv(v[a-1],X,X=X)-v[a-1];v=concat(v,d)) Last fiddled with by science_man_88 on 2010-09-11 at 22:46 |
|
|
|
|
|
#1405 |
|
Aug 2006
10111010110112 Posts |
What is it trying to do?
|
|
|
|
|
|
#1406 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#1407 |
|
Aug 2006
3×1,993 Posts |
Return a vector of the aliquot parts? Return the sum of the aliquot parts? Loop over the aliquot parts? Something else?
|
|
|
|
|
|
#1408 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |