cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, 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, 1, 1, 5, 1, 5, 1, 3, 1, 5, 1, 5, 1, 1, 1, 9, 1, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Aug 11 2012

Keywords

Comments

Also number of consecutive occurrences of n-1 in A069754. - Reinhard Zumkeller, Dec 04 2012
Run lengths of A010051. - Paolo Xausa, Jan 17 2023

Examples

			----------------------------------------------------------
.     Array from              Number of   Number of
n      A000027                nonprimes    primes    a(n)
----------------------------------------------------------
1         1;                      1          0        1
2         2, 3;                   0          2        2
3         4;                      1          0        1
4         5;                      0          1        1
5         6;                      1          0        1
6         7;                      0          1        1
7         8, 9, 10;               3          0        3
8        11;                      0          1        1
9        12;                      1          0        1
10       13;                      0          1        1
11       14, 15, 16;              3          0        3
12       17;                      0          1        1
13       18;                      1          0        1
14       19;                      0          1        1
15       20, 21, 22;              3          0        3
16       23;                      0          1        1
17       24, 25, 26, 27, 28;      5          0        5
18       29;                      0          1        1
19       30;                      1          0        1
20       31;                      0          1        1
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a211005 n = a211005_list !! (n-1)
    a211005_list = map length $ group a069754_list
    -- Reinhard Zumkeller, Dec 04 2012
  • Mathematica
    A211005[upto_]:=Map[Length, Most[Split[PrimeQ[Range[upto]]]]];
    A211005[500] (* Paolo Xausa, Jan 17 2023 *)

Formula

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

A211006 Pair (n,p) where n is the sum of adjacent nonprimes and p is the sum of adjacent primes.

Original entry on oeis.org

1, 5, 4, 5, 6, 7, 27, 11, 12, 13, 45, 17, 18, 19, 63, 23, 130, 29, 30, 31, 170, 37, 117, 41, 42, 43, 135, 47, 250, 53, 280, 59, 60, 61, 320, 67, 207, 71, 72, 73, 380, 79, 243, 83, 430, 89, 651, 97, 297, 101, 102, 103, 315, 107, 108, 109, 333, 113, 1560, 127, 387, 131
Offset: 1

Views

Author

Omar E. Pol, Aug 11 2012

Keywords

Examples

			-----------------------------------------
.     Array from
n      A000027                      a(n)
-----------------------------------------
1         1;                          1
2         2, 3;                       5
3         4;                          4
4         5;                          5
5         6;                          6
6         7;                          7
7         8, 9, 10;                  27
8        11;                         11
9        12;                         12
10       13;                         13
11       14, 15, 16;                 45
12       17;                         17
13       18;                         18
14       19;                         19
15       20, 21, 22;                 63
16       23;                         23
17       24, 25, 26, 27, 28;        130
		

Crossrefs

Partial sums give A211007.
A variant of A109921.

Formula

a(n) = A109921(n+2), n >= 3.
Showing 1-2 of 2 results.