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

A255274 From Goldbach conjecture: Consider the pairs (2n-+1, 3), (2n-1, 5), (2n-3, 7), ..., (3, 2n+1) of odd numbers having sum 2n+4; a(n) is the index of the first pair of primes (p, q) on the list.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 2, 1, 1, 2, 1, 2, 3, 1, 2, 3, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 9, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 6, 5, 6, 9, 1, 2, 1, 2, 3, 1, 1, 2, 3, 5, 5, 1, 1, 2, 3, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2
Offset: 1

Views

Author

Michel Lagneau, Feb 20 2015

Keywords

Comments

a(n) = A049847(n) for n = 1..46. The values of n such that a(n) is different from A049847(n) are 47, 59, 62, 72, 93, 102, 108, 123, 144, 149, 152, 161, 164, 171, 182, 197, 203, 207, 213, 227, ...
The corresponding pairs of primes are (3, 3), (3, 5), (3, 7), (5, 7), (3, 11), (3, 13), (5, 13), (3, 17), ... (A210957).

Examples

			a(13)=3 because 2*13 + 4 = 30 => 13 pairs (27,3), (25,5), (23,7), ..., (3,27) and the pair (23,7) is the third pair having prime elements.
		

Crossrefs

Programs

  • Maple
    nn:=100:for n from 6 by 2 to nn do:ii:=0:it:=1:for p from 3 by 2 to n while(ii=0) do:if type(n-p,prime)=true and type(p,prime)=true then ii:=1: printf(`%d, `,it):else it:=it+1:fi:od:od:
  • PARI
    a(n)=my(m=2*n+4); forprime(q=3, n+2, if(isprime(m-q), return(q\2))) \\ Charles R Greathouse IV, Jan 07 2022

Formula

a(n) = n + (3-A020482(n+2))/2 = (A020481(n+2)-1)/2 via the Maiga link. - Bill McEachen, Jan 02 2022

Extensions

Edited by N. J. A. Sloane, Sep 12 2017
Showing 1-1 of 1 results.