![]() |
|
|
#2355 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
251916 Posts |
It was sarcasm, man. I actually made a bet that it will go undetected.
Sarcasm is when adjectives are deliberately inverted. Example: "That movie? I simply loved* every bit of it. It is so bad that it's actually hilarious!" ____ *sarcasm detected. In plain speak, a person would say "hated it" |
|
|
|
|
|
#2356 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
|
|
|
|
|
|
|
#2357 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I can see why it might be hard to do though:
ex. 33191 Code:
? isprime(3) %25 = 1 ? isprime(331) %26 = 1 ? isprime(3319) %27 = 1 ? isprime(33191) %28 = 1 ? isprime(31) %29 = 1 ? isprime(319) %30 = 0 ? isprime(3191) %31 = 1 ? isprime(19) %32 = 1 ? isprime(191) %33 = 1 |
|
|
|
|
|
#2358 |
|
Aug 2006
3·1,993 Posts |
Code:
dp(n)={
if(n<12, return(if(isprime(n), [n], [])));
my(v=vecsort(select(isprime, eval(Vec(Str(n)))), , 8), t);
while(n>9,
if(gcd(n%10, 10)>1, n\=10; next);
t=10;
while((t*=10)<n*10,
if(isprime(n%t), v=concat(v, n%t))
);
v=vecsort(v, , 8);
n\=10
);
v
};
addhelp(dp, "dp(n): Distinct primes formed from substrings of n. Related to Sloane's A039997 and A093301.");
Code:
> dp(33191) %1 = [3, 19, 31, 191, 331, 3191, 3319, 33191] > #% %2 = 8 Last fiddled with by CRGreathouse on 2012-07-11 at 03:28 |
|
|
|
|
|
#2359 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
|
|
|
|
|
|
|
#2360 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I'll have to refocus on the backwards home prime stuff again but for some reason my brain is stuck in do things backwards mode:
Code:
reverse_collatz(n)=if(n%3==1&&((n-1)/3)%2==1,return([(n-1)/3,2*n]),return([2*n])) |
|
|
|
|
|
#2361 |
|
Aug 2006
3·1,993 Posts |
Code:
reverse_collatz(n)=if(n%6==4,[n\3,2*n],[2*n]) Last fiddled with by CRGreathouse on 2012-07-15 at 19:34 |
|
|
|
|
|
#2362 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
I clearly didn't think deep enough, maybe it would help in recall if it's mixed in with 2 element ones to check for repeating because 1,4,2,1 does exist even if you make it look for n%2==1 values.
edit: I messed up everything after 1,4,2,1 I think Last fiddled with by science_man_88 on 2012-07-15 at 19:44 |
|
|
|
|
|
#2363 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I just looked into it using modular arithmetic how can it work because I get:
Quote:
Last fiddled with by science_man_88 on 2012-07-15 at 21:25 |
|
|
|
|
|
|
#2364 |
|
Aug 2006
10111010110112 Posts |
If n is 1 mod 3 and (n-1)/3 is 2k+1 for some k then n-1 is 6k+3 and so n =6k+4 for some k, i.e., is 4 mod 6.
|
|
|
|
|
|
#2365 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
I get some of that and I see my error it's treating infinity as a limit and treating it like any positive number because there's no limit on the size of number to go through it can continue to stay true even with the 4 mod 6 outnumbered.
|
|
|
|
![]() |
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 |