login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125505
Number of arithmetic progressions of primes (p,q,r) of length 3 with r <= prime(n).
1
0, 0, 0, 1, 2, 2, 3, 5, 7, 9, 11, 11, 13, 16, 17, 20, 23, 24, 26, 30, 32, 36, 40, 44, 46, 49, 53, 56, 59, 64, 69, 74, 78, 83, 87, 92, 95, 100, 105, 111, 115, 119, 126, 129, 135, 142, 148, 155, 160, 164, 169, 173, 179, 187, 194, 201, 208, 215, 218, 226, 235, 243, 248, 257
OFFSET
1,5
EXAMPLE
a(4)=1 counts the progression (3,5,7) with all 3 members less than or equal to prime(4)=7.
a(5)=2 counts (3,5,7) and (3,7,11). a(7)=3 counts (3,5,7), (3,7,11) and (5,11,17).
Progressions with length larger than 3 are defined to contribute with each of their sublists: The progression (5,11,17,23) counts twice in a(9), as (5,11,17) and as (11,17,23).
MAPLE
A125505 := proc(n, verb) local r, p, a, q, strid; a := 0 ; p := 2 ; while p+4 <= ithprime(n) do for strid from 2 do q := p+strid ; r := q+strid ; if r > ithprime(n) then break ; fi ; if isprime(q) and isprime(r) then if verb then print(n, p, q, r) ; fi ; a := a+1 ; fi ; od: p := nextprime(p) ; od: RETURN(a) ; end: seq(A125505(n, false), n=1..80) ; # R. J. Mathar, Nov 21 2007
CROSSREFS
Sequence in context: A133393 A126881 A290273 * A357381 A061565 A077075
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Jan 03 2007; definition corrected Jan 26 2007
EXTENSIONS
Corrected and extended by R. J. Mathar, Nov 21 2007
STATUS
approved