0
$\begingroup$

I'm working on a personal project and I did a search for an integer sequence on the site listed below. I found the sequence I was looking for with a short description of the function defining the sequence. However, no matter how much I struggle to get the function to work, I cannot. If you could clarify the description at the link for me (maybe even provide an example or two) that would great. Thanks for any help!

Here is the link to the description: http://oeis.org/A039739

And here is the link to the sequence: http://oeis.org/A039739/list

  • 0
    $n$th odd prime, it appears.2012-11-04

1 Answers 1

0

"$a(n)=2q-p(n)$, where $q$ is the prime $\lt p(n)$ for which $p(n) \bmod q$ is maximal."

I think $p(n)$ is the $n$th (odd) prime. So to find, say, $a(5)$, you look at $p(5)$, the 5th odd prime, which is $13$, then you calculate $13\bmod q$ for $q=3,5,7,11$, getting $1,3,6,2$, of which the largest is the $6$ you get from $q=7$. So, $a(5)=2\times7-13=1$.

  • 0
    I don't know. At this point, my advice is try all the different interpretations that have been put forward, and go with the one that works, if any. And if it appears to contradict the numbering at oeis, drop them a note with your findings, so maybe they'll correct it.2012-11-04