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

A040040 Average of twin prime pairs (A014574), divided by 2. Equivalently, 2*a(n)-1 and 2*a(n)+1 are primes.

Original entry on oeis.org

2, 3, 6, 9, 15, 21, 30, 36, 51, 54, 69, 75, 90, 96, 99, 114, 120, 135, 141, 156, 174, 210, 216, 231, 261, 285, 300, 309, 321, 330, 405, 411, 414, 429, 441, 510, 516, 525, 531, 546, 576, 615, 639, 645, 651, 660, 714, 726, 741, 744, 804, 810, 834, 849, 861, 894
Offset: 1

Views

Author

Keywords

Comments

Intersection of A005097 and A006254. - Zak Seidov, Mar 18 2005
The only possible pairs for 2a(n)+-1 are prime/prime (this sequence), not prime/not prime (A104278), prime/notprime (A104279) and not prime/prime (A104280), ... this sequence + A104280 + A104279 + A104278 = the odd numbers.
These numbers are never k mod (2k+1) or (k+1) mod (2k+1) with 2k+1 < a(n). - Jon Perry, Sep 04 2012
Excluding the first term, all remaining terms have digital root 3, 6 or 9. - J. W. Helkenberg, Jul 24 2013
Positive numbers x such that the difference between x^2 and adjacent squares are prime (both x^2-(x-1)^2 and (x+1)^2-x^2 are prime). - Doug Bell, Aug 21 2015

Crossrefs

Cf. A001359, A006512, A014574, A054735, A111046, A045753 (even terms halved), A002822 (terms divided by 3).
Cf. A221310.

Programs

  • Haskell
    a040040 = flip div 2 . a014574  -- Reinhard Zumkeller, Nov 17 2015
  • Maple
    P := select(isprime,[$1..1789]): map(p->(p+1)/2, select(p->member(p+2,P),P)); # Peter Luschny, Mar 03 2011
  • Mathematica
    Select[Range[900], And @@ PrimeQ[{-1, 1} + 2# ] &] (* Ray Chandler, Oct 12 2005 *)
  • PARI
    p=2; forprime(b=3, 1e4, if(b-p==2, print1((p+1)/2", ")); p=b) \\ Altug Alkan, Nov 10 2015
    

Formula

a(n) = A014574(n)/2 = A054735(n+1)/4 = A111046(n+1)/8.
For n > 1, a(n) = 3*A002822(n-1). - Jason Kimberley, Nov 06 2015
A260689(a(n),1) = A264526(a(n)) = 1. - Reinhard Zumkeller, Nov 17 2015
From Michael G. Kaarhus, Aug 19 2022: (Start)
a(n) = (A001359(n) + 1)/2.
a(n) = (A006512(n) - 1)/2.
For n > 1, a(n) = A167379(n-1) * 3/2. (End)

Extensions

More terms from Cino Hilliard, Oct 21 2002
Title corrected by Daniel Forgues, Jun 01 2009
Edited by Daniel Forgues, Jun 21 2009
Comment corrected by Daniel Forgues, Jul 12 2009

A069360 Number of prime pairs (p,q), p <= q, such that (p+q)/2 = 2*n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 15 2002

Keywords

Comments

The Goldbach conjecture, if true, would imply a(n) > 0.
Row lengths of table A260689, n > 1. - Reinhard Zumkeller, Nov 17 2015

Examples

			n=8: there are 16 pairs (i,j) with (i+j)/2=n*2=16; only two of them, (3,29) and (13,19), consist of primes, therefore a(8)=2.
		

Crossrefs

Bisection of A002375.
Cf. A082467 (least k such that n-k and n+k are both primes), A134677 (records), A134678 (where records occur), A135146 (index of first occurrence of n).

Programs

Formula

For n > 1: a(n) = #{k | 2*n-k and 2*n+k are prime, 1<=k<=2*n}.
a(n) = Sum_{i=3..2n} isprime(i) * isprime(4n-i) * (sign(4n-i) mod 4), n > 1. - Wesley Ivan Hurt, Dec 18 2016

Extensions

Edited by Klaus Brockhaus, Nov 20 2007
a(1)=1, thanks to Charles R Greathouse IV, who noticed this; b-file adjusted.

A088763 a(n) = A087695(n)/2.

Original entry on oeis.org

4, 5, 7, 8, 10, 13, 17, 20, 22, 25, 28, 32, 35, 38, 43, 50, 52, 53, 55, 67, 77, 80, 85, 88, 97, 98, 113, 115, 118, 127, 130, 133, 137, 140, 155, 157, 167, 175, 178, 185, 188, 193, 218, 223, 230, 232, 253, 272, 280, 283, 287, 295, 298, 302, 305, 308, 322, 325, 328, 340
Offset: 1

Views

Author

Ray Chandler, Oct 26 2003

Keywords

Comments

A260689(a(n),1) = A264526(a(n)) = 3. - Reinhard Zumkeller, Nov 17 2015

Crossrefs

Programs

  • Haskell
    a088763 = flip div 2 . a087695  -- Reinhard Zumkeller, Nov 17 2015
  • Maple
    ZL:=[]:for p from 1 to 700 do if (isprime(p) and isprime(p+6) ) then ZL:=[op(ZL),(p+(p+6))/4]; fi; od; print(ZL); # Zerinvary Lajos, Mar 07 2007
  • Mathematica
    f[n_]:=PrimeQ[n-3]&&PrimeQ[n+3]; lst={};Do[If[f[n],AppendTo[lst,n]],{n,2,8!,2}];lst/2 (* Vladimir Joseph Stephan Orlovsky, Oct 09 2009 *)

Extensions

Offset corrected by Reinhard Zumkeller, Nov 17 2015

A264526 Smallest number m such that both 2*n-m and 2*n+m are primes.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 3, 1, 3, 9, 5, 3, 9, 1, 9, 3, 5, 9, 3, 1, 3, 15, 5, 3, 9, 7, 3, 15, 1, 9, 3, 5, 15, 3, 1, 15, 3, 5, 9, 15, 5, 3, 9, 7, 9, 15, 7, 9, 3, 1, 3, 3, 1, 3, 15, 13, 15, 9, 7, 9, 15, 13, 21, 21, 5, 3, 27, 1, 9, 15, 5, 33, 9, 1, 15, 3, 7, 9, 3, 5
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Crossrefs

Programs

  • Haskell
    a264526 = head . a260689_row
    
  • Mathematica
    snm[n_]:=Module[{m=1},While[!PrimeQ[2n-m]||!PrimeQ[2n+m],m=m+2];m]; Array[ snm,90,2] (* Harvey P. Dale, Aug 13 2017, optimized by Ivan N. Ianakiev, Mar 16 2018 *)
  • PARI
    a(n) = {my(m=1); while(!(isprime(2*n-m) && isprime(2*n+m)), m+=2); m;} \\ Michel Marcus, Mar 18 2018

Formula

a(n) = A260689(n,1);
a(A040040(n)) = 1;
a(A014574(n)/2) = 1;
a(A088763(n)) = 3.
a(n) = A082467(2n). - Ivan N. Ianakiev, Oct 27 2021

A264527 Largest number m such that (2*n-m, 2*n+m) is a prime pair.

Original entry on oeis.org

1, 1, 5, 7, 7, 9, 13, 13, 17, 19, 19, 21, 25, 23, 29, 27, 31, 35, 33, 37, 39, 43, 41, 47, 49, 49, 53, 55, 53, 51, 45, 61, 63, 67, 67, 63, 73, 73, 77, 75, 79, 81, 85, 83, 89, 87, 85, 95, 97, 97, 93, 93, 103, 87, 99, 109, 113, 115, 113, 119, 117, 115, 123, 127
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Comments

a(n) = A260689(n,A069360(n)).

Crossrefs

Programs

  • Haskell
    a264527 = last . a260689_row
Showing 1-5 of 5 results.