User talk:Dana Jacobsen
Hi Dana. Would you please explain your program "(Perl) use theory ":all"; my $r = ramanujan_primes(1000); say "[@$r]"; #" in A104272? Is "ramanujan_primes" somehow a built-in function in Perl? Many thanks, Jonathan Sondow 15:20, 21 December 2015 (UTC)
- 'ntheory' is a module I wrote for Perl. It's on CPAN and comes standard with Strawberry Perl. It is mostly in C, though there are Pure Perl versions of everything (with various levels of efficiency vs. C). Github: https://github.com/danaj/Math-Prime-Util.
- Functions for Ramanujan primes:
- - is_ramanujan_prime(n)
- - ramanujan_prime_count(n)
- - ramanujan_prime_count(lo,hi)
- - nth_ramanujan_prime(n)
- - ramanujan_primes(n)
- - ramanujan_primes(lo,hi)
- I've been debating adding lower bound, upper bound, and approximation for the count and nth, as there are for standard and twin primes. They exist internally.
- Your 2011 paper was the inspiration for much of the work, and it uses Noe's algorithm for the work.
- With the latest code, the primes below 10^9 are returned in about 3 seconds. The count takes about 13 milliseconds. Returning the 10^9th Ramanujan prime takes about half a second. The count was added a few days ago to the development version (on github) and the nth_ function sped up for large values.
- Dana Jacobsen 17:51, 25 December 2015 (UTC)
Hi Dana, I too notice, as Jonathan did, the work you did. What I was wondering is if you can reproduce a graph of A182873 vs A190874 and extend it larger and into 3-D: https://oeis.org/plot2a?name1=A182873&name2=A190874&tform1=untransformed&tform2=untransformed&shift=0&radiop1=xy&drawpoints=true . The third D could be the count of times an intersection on the graph is used. In another direction, the third D can be how long since the intersection was first and last uses, with n=time. If you stop and think about the very first intersection at (9,4), with (x,y)=(A182873, A190874), this intersection will never be used again.