![]() |
|
|
#738 |
|
Aug 2006
135338 Posts |
|
|
|
|
|
|
#739 | |
|
May 2010
Prime hunting commission.
32208 Posts |
Quote:
|
|
|
|
|
|
|
#740 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
Code:
y=Vec(input());if(lex(y,"yes"),print("no"))
|
|
|
|
|
|
|
#741 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
oh one thing I forgot is maybe using vecextract to another vector may help comparison. as if the input is longer than the text to check against then it can never be equal so maybe extraction of the first #try[x] characters to a new vector and if we want to reuse the input we can concat() /// to the end or something then place that other vector concat() on the end then take the next until we hit out end symbol. then check the next string to check for.
|
|
|
|
|
|
#742 |
|
"Forget I exist"
Jul 2009
Dumbassville
20C016 Posts |
Code:
y=Vec(input());t=vecextract(y,"1..10");return(t) |
|
|
|
|
|
#743 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
well i got it working for 1 but I get a vector of numbers back not a string. got it working for a character but I needed quotes around the whole thing which is better than quotes around every phrase I guess. now I think i figured it out lol. well i can search for it now to replace it I'll put the find code together soon.
Last fiddled with by science_man_88 on 2010-08-21 at 20:41 |
|
|
|
|
|
#744 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
Code:
(17:49) gp > y=Vec(input());for(i=1,#try,c=vecextract(y,[1,2,3,4,5,6]);if(lex(c,try[i]),print(c))) "string""suck""primes" ["s", "t", "r", "i", "n", "g"] ["s", "t", "r", "i", "n", "g"] |
|
|
|
|
|
#745 |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Okay: Returned from a camping trip.
Has there been any progress on the project I was working on? |
|
|
|
|
|
#746 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
A quick proposition:
Primes of the form k * b!n + 1, where k < b!n, and where n > 1. (If n were allowed to be 1, every odd prime of the form 6n + 1 would be a prime of the form k * b!n + 1.) Or: Simply that k * b!n must be divisible by a square number greater than 1. I'll see if all numbers that fit those conditions are present in the OEIS. (Smallest one is 5.) Oh, wait.. Those would be all the 4n + 1 numbers. Nevermind. Last fiddled with by 3.14159 on 2010-08-23 at 12:18 |
|
|
|
|
|
#747 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
|
|
|
|
|
|
#748 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Which means, every 4n + 1 number could not be expressed as k * b!n + 1, where k ≤ b!n Ex: 7 * 2!2 + 1 is not a valid number of this form, although it is prime (7 > 4) (7 * 2!2 + 1 = 29 = p.) Now, I need to hunt numbers of that form and fit them all into a sequence and see if it is already in the OEIS. Note: The n > 1 restriction was found to be unnecessary. The sequence begins: 3, 5, 7, 9, 13, 17, 19, 25, 33, 37, 41, 49, 65..(This is where only b! is allowed, as opposed to any integer b.) 3: 1 * 2!^1 + 1 5: 1 * 2!^2 + 1 (Fermat number) 7: 1 * 3!^1 + 1 9: 1 * 2!^3 + 1 13: 2 * 3!^1 + 1 17: 1 * 2!^4 + 1 (Fermat number) 19: 3 * 3!^1 + 1 25: 4!^1 + 1 33: 2 * 2!^4 + 1 37: 3!^2 + 1 41: 5 * 2!^3 + 1 49: 2 * 4!^1 + 1 65: 4 * 2!^4 + 1 Last fiddled with by 3.14159 on 2010-08-23 at 14:00 Reason: Skipped 9 in sequence. |
|
|
|
|
![]() |
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 |