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-3 of 3 results.

A178670 Number of ways to express prime(n) as (prime(n+k) + prime(n-k))/2.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 1, 0, 0, 2, 1, 1, 2, 0, 0, 2, 1, 1, 1, 3, 0, 0, 1, 1, 2, 1, 1, 1, 0, 0, 2, 2, 2, 1, 0, 1, 3, 0, 1, 3, 2, 1, 4, 2, 1, 0, 4, 0, 0, 0, 2, 0, 0, 2, 1, 1, 0, 0, 1, 0, 0, 0, 3, 4, 0, 0, 1, 1, 1, 2, 3, 3, 2, 4, 2, 2, 1, 3, 4, 4, 1, 1, 1, 3, 2, 2, 2, 1, 1, 0, 0, 1, 2, 1, 0, 0, 0, 3, 0, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 04 2011

Keywords

Examples

			a(5) = 2 because the 5th prime (11) is half the sum of the 7th and 3rd prime (17+5) or half the sum of the 8th and 2nd prime (19+3).
a(8) = 0 because the 8th prime (19) cannot be expressed as (1/2)*(prime(8+k) + prime(8-k)) for any k.
		

Crossrefs

Programs

  • Mathematica
    nn=1000; p=Prime[Range[2*nn]]; Table[s=Take[p,n-1] + Reverse[Take[p, {n+1,2n-1}]]; Count[s,2*p[[n]]], {n,nn}]
  • PARI
    a(n)={s=2*prime(n);a=0;for(i=1,n-1,if(prime(n+i)+prime(n-i)==s,a=a+1));a}

A178953 Indices n such that 2*prime(n) cannot be written as a sum of two distinct prime(n-k) and prime(n+k).

Original entry on oeis.org

1, 2, 4, 8, 9, 14, 15, 21, 22, 29, 30, 35, 38, 46, 48, 49, 50, 52, 53, 57, 58, 60, 61, 62, 65, 66, 90, 91, 95, 96, 97, 99, 114, 120, 121, 122, 123, 124, 125, 128, 145, 146, 149, 153, 154, 163, 176, 179, 180, 186, 187, 189, 191, 192, 197
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 02 2011

Keywords

Comments

Snapshots: a(1000) = 6922, a(2000) = 16376, a(3000) = 25951, a(4000) = 37266, a(5000) = 51926, a(6000) = 69928. - R. J. Mathar, Jan 08 2011

Crossrefs

Programs

  • Haskell
    a178953 n = a178953_list !! (n-1)
    a178953_list = filter ((== 0) . a178609) [1..]
    -- Reinhard Zumkeller, Jan 30 2014
  • Maple
    A178609 := proc(n) for k from n-1 to 0 by -1 do if ithprime(n-k)+ithprime(n+k)=2*ithprime(n) then return k; end if; end do: end proc:
    for n from 1 to 200 do if A178609(n) = 0 then printf("%d,",n) ; end if; end do: # R. J. Mathar, Jan 05 2011
  • Mathematica
    A178609[n_] := For[k = n-1, k >= 0, k--, If[Prime[n-k] + Prime[n+k] == 2*Prime[n], Return[k]]]; Reap[For[n = 1, n <= 200, n++, If[A178609[n] == 0, Sow[n]]]][[2, 1]] (* Jean-François Alcover, Feb 13 2018, after R. J. Mathar *)

Formula

A178609(a(n))=0.

A127925 Primes p such that 2p < prime(k-i) + prime(k+i) for i=1..k-1, where p=prime(k).

Original entry on oeis.org

3, 7, 19, 23, 43, 47, 73, 109, 113, 199, 283, 293, 313, 317, 463, 467, 503, 509, 523, 619, 661, 683, 691, 887, 1063, 1069, 1109, 1129, 1303, 1307, 1321, 1327, 1613, 1621, 1627, 1637, 1669, 1789, 2143, 2161, 2383, 2393, 2399, 2477, 2731, 2753, 2803, 2861, 2971
Offset: 1

Views

Author

T. D. Noe, Feb 06 2007

Keywords

Comments

One of several sets of "good primes" in section A14 of Guy.
McNew calls these numbers "midpoint convex primes". - Peter Munn, Jul 04 2025

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed. Springer, 2004.

Crossrefs

Cf. A028388.
A246033 is a subset.
Subset of A124661, A178954.

Programs

  • Mathematica
    t={}; n=1; While[Length[t]<100, n++; p=Prime[n]; i=1; While[i
    				
Showing 1-3 of 3 results.