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.

A112859 Primes such that the sum of the predecessor and successor primes is divisible by 29.

Original entry on oeis.org

149, 433, 463, 491, 839, 907, 929, 953, 1217, 1451, 1741, 2789, 2957, 3853, 3917, 4493, 4639, 4957, 5021, 5167, 5227, 5569, 6353, 6673, 6733, 6823, 7219, 7481, 7573, 7649, 7919, 8293, 8443, 8699, 9281, 9421, 9743, 9923, 10151, 10211, 10709, 11161
Offset: 1

Views

Author

Jonathan Vos Post, Jan 01 2006

Keywords

Comments

There is a trivial analogy to every prime beyond 3, but mod 2. A112681 is analogous to this, but mod 3. A112731 is analogous to this, but mod 7. A112789 is analogous to this, but mod 11.

Examples

			a(1) = 149 because prevprime(149) + nextprime(149) = 139 + 151 = 290 = 29 * 10.
a(2) = 433 because prevprime(433) + nextprime(433) = 431 + 439 = 870 = 29 * 30.
a(3) = 463 because prevprime(463) + nextprime(463) = 461 + 467 = 928 = 29 * 32.
a(4) = 491 because prevprime(491) + nextprime(491) = 487 + 499 = 986 = 29 * 34.
		

Crossrefs

Programs

  • Maple
    Primes:= select(isprime, [seq(i,i=3..20000,2)]):
    R:= select(t -> Primes[t-1]+Primes[t+1] mod 29 = 0, [$2..nops(Primes)-1]):
    Primes[R]; # Robert Israel, May 02 2017
  • Mathematica
    Prime@ Select[Range[2, 1372], Mod[Prime[ # - 1] + Prime[ # + 1], 29] == 0 &] (* Robert G. Wilson v, Jan 05 2006 *)
  • PARI
    list(lim)=my(v=List(),p=3,q=5); forprime(r=7,nextprime(lim\1+1), if((p+r)%29==0, listput(v,q)); p=q; q=r); Vec(v) \\ Charles R Greathouse IV, Apr 08 2025

Formula

a(n) = prime(i) is in this sequence iff prime(i-1)+prime(i+1) = 0 mod 29. a(n) = A000040(i) is in this sequence iff A000040(i-1)+A000040(i+1) = 0 mod 29.
Under the Hardy-Littlewood k-tuple conjecture, a(n) ~ 28*n log n. - Charles R Greathouse IV, Apr 08 2025

Extensions

More terms from Robert G. Wilson v, Jan 05 2006