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!)
A251092 a(n) is the number of primes in the n-th group of consecutive primes among the odd numbers. 2
3, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Explanation:
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,... = Odd numbers
^ ^ ^ ^ ^ ^ ^ ^ = Prime numbers
<---3---> <--2--> <--2--> <-1-> = Primes beside other primes divided into groups of how many there are.
Note that the first group (3, 5 and 7) is the only group of 3. Therefore the rest of the sequence only consists of 1's and 2's.
Essentially the same as A175632. - Robert Israel, Mar 29 2015
LINKS
MAPLE
N:= 1000: # to use the first N+1 odd numbers
L:= map(t -> isprime(2*t+1), [$1..N]):
Starts:= [1, op(select(i -> L[i] and not L[i-1], [$2..N]))]:
Ends:= select(i -> L[i] and not L[i+1], [$1..N-1]):
seq(Ends[i]-Starts[i]+1, i=1..nops(Ends)); # Robert Israel, Mar 27 2015
MATHEMATICA
Length /@ Split[Select[2 Range@ 1200 - 1, PrimeQ], #2 - #1 == 2 &] (* Michael De Vlieger, Mar 20 2015 *)
Length/@DeleteCases[Split[Table[If[PrimeQ[n], 1, 0], {n, 3, 1001, 2}]], _?(FreeQ[ #, 1]&)] (* Harvey P. Dale, Jun 29 2021 *)
CROSSREFS
Cf. A000040 (prime numbers), A005408 (odd numbers), A001097 (twin primes), A175632.
Sequence in context: A152159 A341941 A090341 * A175632 A226481 A088435
KEYWORD
nonn
AUTHOR
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 7 03:17 EDT 2024. Contains 372300 sequences. (Running on oeis4.)