Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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, 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,4
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).
LINKS
Jon Maiga, Computer-generated formulas for A255274, Sequence Machine.
FORMULA
a(n) = n + (3-A020482(n+2))/2 = (A020481(n+2)-1)/2. - Bill McEachen, Jan 02 2022 [Should these formulas be credited to Jon Maiga? - N. J. A. Sloane, Feb 06 2022]
EXAMPLE
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.
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:
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Feb 20 2015
EXTENSIONS
Edited by N. J. A. Sloane, Sep 12 2017
STATUS
approved