![]() |
|
|
#1090 | |
|
Aug 2006
3×1,993 Posts |
Quote:
|
|
|
|
|
|
|
#1091 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Code:
for(n=1, 33000, if(isprime(n^2+1)*isprime(n^4+1)*isprime(n+1)==1, print1(n, ", "))) |
|
|
|
|
|
#1092 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
This would only be true if the set of squares were all fourth powers as well. 25 is a square number and is not a 4th power. 625 is a square number and is a fourth power. 49 is a square number that is not in the set of fourth powers. 2401 is a square number that is in the set of fourth powers. Last fiddled with by 3.14159 on 2010-08-29 at 19:29 |
|
|
|
|
|
|
#1093 | |
|
Aug 2006
3×1,993 Posts |
Back on topic:
Quote:
|
|
|
|
|
|
|
#1094 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
Last fiddled with by 3.14159 on 2010-08-29 at 19:35 |
|
|
|
|
|
|
#1095 | |
|
"Forget I exist"
Jul 2009
Dumbassville
838410 Posts |
Quote:
mine uses 2 cmp operations the one shown uses 1 cmp and 3 mult() ? operations (not sure if this makes the difference though) as i don't know how much slower / faster multiplication is comparing it to a cmp() operation. |
|
|
|
|
|
|
#1096 |
|
Aug 2006
3×1,993 Posts |
Really? Please provide an example of a member of the set of fourth powers that is not a member of the set of squares and the set of fourth powers, or a member of the set of squares and the set of fourth powers, but not a member of the set of fourth powers.
|
|
|
|
|
|
#1097 |
|
Aug 2006
175B16 Posts |
What is "it"?
imul takes about 4 times as long as cmp. fmul is similar. For older CPUs, cmp was relatively better. |
|
|
|
|
|
#1098 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
Here's another example: 169 is a square number, and it is not a fourth power. 28561 is a square number, and it is also a fourth power. Or: 169 is in set x but is not in set y. 28561 is in set x and is in set y. All members of set y are in set x. Not all members of set x are in set y. Last fiddled with by 3.14159 on 2010-08-29 at 19:42 |
|
|
|
|
|
|
#1099 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
thanks I think if we want fast code in the OEIS the code shown should be changed for it= http://www.research.att.com/~njas/sequences/A070325 Last fiddled with by science_man_88 on 2010-08-29 at 19:40 |
|
|
|
|
|
|
#1100 | |
|
Aug 2006
135338 Posts |
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
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 |