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-3 of 3 results.

A069754 Counts transitions between prime and nonprime to reach the number n.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 5, 6, 6, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 14, 14, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20, 20, 21, 22, 22, 22, 23, 24, 25, 26, 26, 26, 27, 28, 28, 28, 28, 28, 29, 30, 30, 30, 30, 30, 31, 32, 33, 34, 34, 34, 34, 34, 35, 36, 36, 36, 37, 38, 39
Offset: 1

Views

Author

T. D. Noe, May 02 2002

Keywords

Comments

The following sequences all appear to have the same parity (with an extra zero term at the start of A010051): A010051, A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002

Examples

			a(6) = 4 because there are 4 transitions: 1 to 2, 3 to 4, 4 to 5 and 5 to 6.
		

Crossrefs

Cf. A000720 (pi).
Cf. A211005 (run lengths).
Same parity: A010051, A061007, A035026, A071574.

Programs

  • Haskell
    a069754 1 = 0
    a069754 2 = 1
    a069754 n = 2 * a000720 n - 2 - (toInteger $ a010051 $ toInteger n)
    -- Reinhard Zumkeller, Dec 04 2012
  • Mathematica
    For[lst={0}; trans=0; n=2, n<100, n++, If[PrimeQ[n]!=PrimeQ[n-1], trans++ ]; AppendTo[lst, trans]]; lst
    (* Second program: *)
    pts[n_]:=Module[{c=2PrimePi[n]},If[PrimeQ[n],c-3,c-2]]; Join[{0,1},Array[ pts,80,3]] (* Harvey P. Dale, Nov 12 2011 *)
    Accumulate[If[Sort[PrimeQ[#]]=={False,True},1,0]&/@Partition[ Range[ 0,80],2,1]] (* Harvey P. Dale, May 06 2013 *)

Formula

When n is prime, a(n) = 2*pi(n) - 3. When n is composite, a(n) = 2*pi(n) - 2. pi(n) is the prime counting function A000720.
For n > 2: a(n) = 2*A000720(n) - 2 - A010051(n). - Reinhard Zumkeller, Dec 04 2012

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.

A211007 Surface area of the first n faces of the structure mentioned in A211006.

Original entry on oeis.org

1, 6, 10, 15, 21, 28, 55, 66, 78, 91, 136, 153, 171, 190, 253, 276, 406, 435, 465, 496, 666, 703, 820, 861, 903, 946, 1081, 1128, 1378, 1431, 1711, 1770, 1830, 1891, 2211, 2278, 2485, 2556, 2628, 2701, 3081, 3160, 3403, 3486, 3916, 4005, 4656, 4753, 5050
Offset: 1

Views

Author

Omar E. Pol, Aug 12 2012

Keywords

Comments

All members of this sequence are triangular numbers A000217.
It appears that this is the same as A147846 without 3.

Crossrefs

Partial sums of A211006.
Showing 1-3 of 3 results.