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!)
A211005 Pair (i, j) where i = number of adjacent nonprimes and j = number of adjacent primes. 4

%I #36 Feb 10 2023 16:09:20

%S 1,2,1,1,1,1,3,1,1,1,3,1,1,1,3,1,5,1,1,1,5,1,3,1,1,1,3,1,5,1,5,1,1,1,

%T 5,1,3,1,1,1,5,1,3,1,5,1,7,1,3,1,1,1,3,1,1,1,3,1,13,1,3,1,5,1,1,1,9,1,

%U 1,1,5,1,5,1,3,1,5,1,5,1,1,1,9,1,1,1

%N Pair (i, j) where i = number of adjacent nonprimes and j = number of adjacent primes.

%C Also number of consecutive occurrences of n-1 in A069754. - _Reinhard Zumkeller_, Dec 04 2012

%C Run lengths of A010051. - _Paolo Xausa_, Jan 17 2023

%H Reinhard Zumkeller, <a href="/A211005/b211005.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A162154(n-1), n >= 2.

%e ----------------------------------------------------------

%e . Array from Number of Number of

%e n A000027 nonprimes primes a(n)

%e ----------------------------------------------------------

%e 1 1; 1 0 1

%e 2 2, 3; 0 2 2

%e 3 4; 1 0 1

%e 4 5; 0 1 1

%e 5 6; 1 0 1

%e 6 7; 0 1 1

%e 7 8, 9, 10; 3 0 3

%e 8 11; 0 1 1

%e 9 12; 1 0 1

%e 10 13; 0 1 1

%e 11 14, 15, 16; 3 0 3

%e 12 17; 0 1 1

%e 13 18; 1 0 1

%e 14 19; 0 1 1

%e 15 20, 21, 22; 3 0 3

%e 16 23; 0 1 1

%e 17 24, 25, 26, 27, 28; 5 0 5

%e 18 29; 0 1 1

%e 19 30; 1 0 1

%e 20 31; 0 1 1

%t A211005[upto_]:=Map[Length, Most[Split[PrimeQ[Range[upto]]]]];

%t A211005[500] (* _Paolo Xausa_, Jan 17 2023 *)

%o (Haskell)

%o import Data.List (group)

%o a211005 n = a211005_list !! (n-1)

%o a211005_list = map length $ group a069754_list

%o -- _Reinhard Zumkeller_, Dec 04 2012

%Y 1 together with A162154.

%Y Cf. A000040, A001223, A010051, A018252, A046933, A211006, A211007.

%K nonn

%O 1,2

%A _Omar E. Pol_, Aug 11 2012

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 6 18:59 EDT 2024. Contains 372297 sequences. (Running on oeis4.)