cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A335139 a(n) = (prime(n + 1) +- k) / 2 where k is the smallest possible odd number such that a(n) is prime and a(n + 1) >= a(n).

Original entry on oeis.org

2, 3, 3, 5, 7, 7, 11, 11, 13, 17, 19, 19, 23, 23, 29, 29, 31, 31, 37, 37, 41, 41, 43, 47, 53, 53, 53, 53, 59, 61, 67, 67, 71, 73, 73, 79, 83, 83, 89, 89, 89, 97, 97, 97, 101, 107, 113, 113, 113, 113, 113, 127, 127, 127, 131, 137, 137, 139, 139, 139, 149
Offset: 1

Views

Author

Dimitris Valianatos, May 24 2020

Keywords

Comments

The sequence of k's begins {1, 1, -1, -1, 1, -3, 3, -1, -3, 3, 1, -3, 3, -1, ...}. I conjecture that the partial sums of the k's sequence change sign infinitely often and that their absolute value is less than the square root of n.

Crossrefs

Cf. A000040.

Programs

  • PARI
    forprime(n = 3, 300, forstep(j = 1, 999, 2, a = (n + j)/2; b =(n - j)/2; if(isprime(a), print1(a", "); break); if(isprime(b), print1(b", "); break)))