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.

Showing 1-4 of 4 results.

A071681 Number of ways to represent the n-th prime as arithmetic mean of two other primes.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 1, 3, 3, 2, 4, 4, 4, 4, 5, 5, 3, 5, 7, 5, 4, 5, 6, 6, 8, 6, 7, 6, 6, 8, 8, 10, 6, 10, 8, 8, 6, 10, 8, 9, 7, 9, 11, 10, 6, 10, 11, 11, 8, 12, 10, 10, 14, 13, 14, 13, 9, 10, 13, 12, 12, 14, 16, 11, 13, 13, 14, 18, 13, 18, 14, 14, 17, 14, 16, 14, 16, 15, 16, 16, 17, 16, 16
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2002

Keywords

Comments

Conjecture: a(n)>0 for n>2.
a(A137700(n))=n and a(m)<>n for m < A137700(n), A000040(A137700(n))=A126204(n). - Reinhard Zumkeller, Feb 07 2008
The conjecture follows from a slightly strengthened version of Goldbach's conjecture: that every even number > 6 is the sum of two distinct primes. - T. D. Noe, Jan 10 2011 [Corrected by Barry Cherkas and Robert Israel, May 21 2015]
a(n) = A116619(n) + 1. - Reinhard Zumkeller, Mar 27 2015
Number of primes q < prime(n), such that 2*prime(n) - q is prime. - Dmitry Kamenetsky, May 27 2023

Examples

			a(7)=3 as prime(7) = 17 = (3+31)/2 = (5+29)/2 = (11+23)/2 and 2*17-p is not prime for the other primes p < 17: {2,7,13}.
		

Crossrefs

Programs

  • Haskell
    a071681 n = sum $ map a010051' $
       takeWhile (> 0) $ map (2 * a000040 n -) $ drop n a000040_list
    -- Reinhard Zumkeller, Mar 27 2015
  • Mathematica
    f[n_] := Block[{c = 0, k = PrimePi@n - 1}, While[k > 0, If[ PrimeQ[2n - Prime@k], c++ ]; k-- ]; c]; Table[ f@ Prime@n, {n, 84}] (* Robert G. Wilson v, Mar 22 2007 *)
  • PARI
    A071681(n)={s=2*prime(n);a=0;for(i=1,n-1,a=a+isprime(s-prime(i)));a}
    

A085704 Primes of the form prime(k)*2 - prime(k-1), k>1.

Original entry on oeis.org

7, 43, 59, 73, 163, 179, 223, 263, 269, 283, 379, 491, 569, 599, 613, 619, 643, 659, 739, 821, 953, 983, 1021, 1109, 1129, 1193, 1229, 1303, 1373, 1483, 1523, 1613, 1669, 1733, 1753, 1759, 1789, 1873, 1913, 1913, 1949, 1999, 2143, 2293, 2383
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 18 2003

Keywords

Crossrefs

A341284 a(n) is the least prime == -prime(n) (mod 2*prime(n+1)).

Original entry on oeis.org

7, 23, 37, 41, 89, 59, 73, 151, 157, 43, 127, 131, 239, 59, 419, 307, 73, 359, 367, 401, 419, 1163, 881, 307, 311, 967, 547, 569, 3697, 397, 691, 419, 457, 757, 163, 821, 839, 179, 1259, 907, 2111, 967, 1777, 599, 223, 3803, 3863, 2063, 3499, 1201, 3617, 2269, 263, 269, 1889, 2441, 283, 1409
Offset: 2

Views

Author

J. M. Bergot and Robert Israel, Feb 25 2021

Keywords

Comments

a(k) is the least odd prime == -prime(k) (mod prime(k+1)).
a(k) = A163981(k) if and only if k is not in A029707.
a(k) = 2*prime(k+1)-prime(k) if and only if prime(k+1) is in A071680.

Examples

			a(3) = 23 is the least prime == -5 (mod 14), where prime(3) = 5 and prime(4) = 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      for k from 2*ithprime(n+1)-ithprime(n) by 2*ithprime(n+1)  do
        if isprime(k) then return k fi
      od;
    end proc:
    map(f, [$2..100]);
  • PARI
    a(n) = forprime(p=2,, if (Mod(p, 2*prime(n+1)) == -prime(n), return (p))); \\ Michel Marcus, Feb 25 2021

Formula

(a(k) + prime(k)) mod (2*prime(k+1)) = 0.

A244374 Primes which are the arithmetic mean of two consecutive primes of the form 4n+3.

Original entry on oeis.org

5, 37, 53, 157, 173, 233, 257, 277, 353, 373, 401, 593, 613, 653, 733, 769, 977, 1097, 1297, 1433, 1493, 1613, 1753, 1993, 2137, 2161, 2377, 2417, 2677, 2693, 2749, 2797, 3313, 3533, 3637, 3733, 4013, 4133, 4457, 4513
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2014

Keywords

Comments

All terms must necessarily be primes of form 4n+1. - Jens Kruse Andersen, Jul 15 2014

Examples

			5 is in this sequence because (A002145(1) + A002145(2))/2 = (3 + 7)/2 = 5 and 5 is prime.
		

Crossrefs

Programs

  • Maple
    N:= 10000; # get all entries <= N
    P3:= select(isprime,[seq(4*i+3,i=0..floor((N-3)/4))]):
    select(isprime,[seq((P3[i]+P3[i+1])/2, i=1..nops(P3)-1)]); # Robert Israel, Jul 15 2014
  • PARI
    p=[]; forstep(n=3, 5000, 4, if(isprime(n), p=concat(p, n))); p;
    s=[]; for(k=1, #p-1, if(isprime(q=(p[k]+p[k+1])\2), s=concat(s, q))); s \\ Colin Barker, Jun 27 2014

Extensions

One term deleted and another term inserted by Colin Barker, Jun 27 2014
Showing 1-4 of 4 results.