login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122669 Number of nontrivial arithmetic progressions of primes between n and 2n. 1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 5, 5, 5, 8, 8, 8, 8, 7, 8, 8, 8, 5, 6, 6, 6, 6, 6, 7, 8, 8, 10, 10, 10, 8, 8, 5, 5, 7, 7, 9, 9, 7, 8, 9, 9, 7, 7, 7, 8, 11, 11, 11, 12, 9, 9, 12, 12, 14, 14, 14, 16, 16, 16, 14, 15, 15, 15, 15, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,27
COMMENTS
Count of subsets of at least 3 primes in range that are arithmetic progressions.
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..135
EXAMPLE
a(15)=1 because primes between 15 and 30 are {17, 19, 23, 29} and {17, 23, 29} is an arithmetic progression.
a(27)=a(28)=a(29)=3 because {29, 31, 37, 41, 43, 47, 53} includes {29, 41, 53}, {31, 37, 43}, {41, 47, 53}.
a(30)=4 because {31, 37, 41, 43, 47, 53, 59} includes {31, 37, 43}, {41, 47, 53}, {47, 53, 59}, {41, 47, 53,
59}.
MATHEMATICA
a[n_] := a[n] = Module[{pp, S}, pp = Select[Range[n, 2 n], PrimeQ]; S = Subsets[pp, {3, Length[pp]}]; Select[S, 1 == Length[Union[Differences[#] ]]&] // Length];
Reap[For[n = 1, n <= 135, n++, Print[n, " ", a[n]]; Sow[a[n]]]][[2, 1]] (* Jean-François Alcover, Sep 29 2020 *)
CROSSREFS
Sequence in context: A165605 A230194 A128112 * A071942 A289189 A134849
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Sep 24 2006
EXTENSIONS
Edited and extended by Ray Chandler, Sep 26 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 17:43 EDT 2024. Contains 372175 sequences. (Running on oeis4.)