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.
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
Keywords
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.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
- Jon Maiga, Computer-generated formulas for A255274, Sequence Machine.
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
Extensions
Edited by N. J. A. Sloane, Sep 12 2017
Comments