Timeline for Counting function, comparing lists
Current License: CC BY-SA 3.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 17, 2013 at 9:45 | vote | accept | martin | ||
Oct 11, 2013 at 20:50 | comment | added | martin | Yes, I'll try to be more succinct and to the point with my line of questioning - still getting to grips with the whole thing! All of your time spent in answering is really much appreciated though - I have learnt a great deal on this forum just in the past couple of days - really, a great forum. Again, many thanks for your help so far. | |
Oct 11, 2013 at 15:27 | comment | added | Artes | @martin I'll update my answer this evening, I couldn't find time to do it yesterday. I think it's interesting but you should ask questions more clearly at the begining because it may save other's time. | |
Oct 10, 2013 at 15:42 | comment | added | martin | Many thanks - much appreciated. | |
Oct 10, 2013 at 15:01 | comment | added | martin | Just wondered if there was a way to express cf without using SquareFreeQ (see question update)? | |
Oct 10, 2013 at 13:59 | comment | added | martin | @ArtesGot it - yes - mcf = 500/Zeta[2]. - Great, thanks. | |
Oct 10, 2013 at 13:52 | comment | added | martin | Sorry - should be 500/Zeta[2] (what mean should be roughly anyway) - just wanted to replace mean line with 500/Zeta[2] & fill to that. | |
Oct 10, 2013 at 12:45 | comment | added | Artes |
@martin It depends on the context where it is going to be used. E.g. With[{mcf=1000000/Zeta[2]}, ... ] or expr/. mcfmcf->1000000/Zeta[2] or other ways like e.g. expr/. mcfmcf:>1000000/Zeta[2] . Look at e.g. answers to this question to get an idea of differences between -> and :> .
|
|
Oct 10, 2013 at 12:37 | comment | added | martin | Quick question - how do I substitute mcf for 500/Zeta[2]? | |
Oct 10, 2013 at 0:33 | comment | added | martin | I see what you have done though now ... very interesting! Many thanks for your interpretation! - The plot is most illuminating. | |
Oct 9, 2013 at 23:17 | comment | added | martin | Sorry, yes - was looking for this kind of thing: a = PrimeOmega[Range[1000]];b = PrimeNu[Range[1000]]; ListPlot[{Accumulate[ Flatten[Inner[If[#1 === #2, 1, 0] &, a, b, List]]], Accumulate[Flatten[Inner[If[#1 === #2 + 1, 1, 0] &, a, b, List]]], Accumulate[Flatten[Inner[If[#1 === #2 + 2, 1, 0] &, a, b, List]]]}] | |
Oct 9, 2013 at 23:10 | comment | added | Artes | @martin Could you explain what you mean by extension to non-squarefree numbers, and clarify what kind of plot you are looking for? | |
Oct 9, 2013 at 22:30 | history | edited | Artes | CC BY-SA 3.0 |
added 1178 characters in body
|
Oct 9, 2013 at 18:09 | comment | added | Artes |
@martin What do you mean by non-squarefree??? I've just provided what you've been looking for. The main problem is generating lists of PrimeOmega and PrimeNu , instead you can just play with SquareFreeQ . Did you miss anything?
|
|
Oct 9, 2013 at 18:02 | comment | added | Artes |
To ensure that mapping SquareFreeQ is better, try to find timings of generating lists a and b . It takes: AbsoluteTiming[a = PrimeOmega[Range[300000]]; b = PrimeNu[Range[300000]];] yields 19.615000 while AbsoluteTiming[Inner[...]] only 0.503000 .
|
|
Oct 9, 2013 at 18:01 | comment | added | martin | That's great, but I want to extend it to non squarefree also. | |
Oct 9, 2013 at 17:50 | history | answered | Artes | CC BY-SA 3.0 |