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.

This page as a plain text file.
%I A112859 #17 Apr 08 2025 15:44:41
%S A112859 149,433,463,491,839,907,929,953,1217,1451,1741,2789,2957,3853,3917,
%T A112859 4493,4639,4957,5021,5167,5227,5569,6353,6673,6733,6823,7219,7481,
%U A112859 7573,7649,7919,8293,8443,8699,9281,9421,9743,9923,10151,10211,10709,11161
%N A112859 Primes such that the sum of the predecessor and successor primes is divisible by 29.
%C A112859 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.
%H A112859 Robert Israel, <a href="/A112859/b112859.txt">Table of n, a(n) for n = 1..10000</a>
%F A112859 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.
%F A112859 Under the Hardy-Littlewood k-tuple conjecture, a(n) ~ 28*n log n. - _Charles R Greathouse IV_, Apr 08 2025
%e A112859 a(1) = 149 because prevprime(149) + nextprime(149) = 139 + 151 = 290 = 29 * 10.
%e A112859 a(2) = 433 because prevprime(433) + nextprime(433) = 431 + 439 = 870 = 29 * 30.
%e A112859 a(3) = 463 because prevprime(463) + nextprime(463) = 461 + 467 = 928 = 29 * 32.
%e A112859 a(4) = 491 because prevprime(491) + nextprime(491) = 487 + 499 = 986 = 29 * 34.
%p A112859 Primes:= select(isprime, [seq(i,i=3..20000,2)]):
%p A112859 R:= select(t -> Primes[t-1]+Primes[t+1] mod 29 = 0, [$2..nops(Primes)-1]):
%p A112859 Primes[R]; # _Robert Israel_, May 02 2017
%t A112859 Prime@ Select[Range[2, 1372], Mod[Prime[ # - 1] + Prime[ # + 1], 29] == 0 &] (* _Robert G. Wilson v_, Jan 05 2006 *)
%o A112859 (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
%Y A112859 Cf. A000040, A112681, A112794, A112731, A112789, A112795, A112796, A112804, A112847, A112859, A113155, A113156, A113157, A113158.
%K A112859 easy,nonn
%O A112859 1,1
%A A112859 _Jonathan Vos Post_, Jan 01 2006
%E A112859 More terms from _Robert G. Wilson v_, Jan 05 2006