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.

A134735 Primes followed by the difference from the next prime.

Original entry on oeis.org

2, 1, 3, 2, 5, 2, 7, 4, 11, 2, 13, 4, 17, 2, 19, 4, 23, 6, 29, 2, 31, 6, 37, 4, 41, 2, 43, 4, 47, 6, 53, 6, 59, 2, 61, 6, 67, 4, 71, 2, 73, 6, 79, 4, 83, 6, 89, 8, 97, 4, 101, 2, 103, 4, 107, 2, 109, 4, 113, 14, 127, 4, 131, 6, 137, 2
Offset: 1

Views

Author

Omar E. Pol, Nov 11 2007

Keywords

Crossrefs

Prime numbers: A000040. Differences between consecutive primes: A001223.
Cf. A219606.

Programs

  • Haskell
    import Data.List (transpose)
    a134735 n = a134735_list !! (n-1)
    a134735_list = concat $ transpose [a000040_list, a001223_list]
    -- Reinhard Zumkeller, Dec 12 2012
  • Mathematica
    With[{pr=Prime[Range[40]]},Riffle[pr,Differences[pr]]] (* Harvey P. Dale, Jul 17 2020 *)

Formula

If n is odd then a(n) = A000040((n+1)/2) else a(n) = A001223(n/2).

A340202 Primes followed by the difference from the next prime calculated by adding the digits of the lexicographically earliest distinct term.

Original entry on oeis.org

2, 1, 3, 20, 5, 110, 7, 4, 11, 200, 13, 22, 17, 1001, 19, 40, 23, 6, 29, 1010, 31, 15, 37, 112, 41, 1100, 43, 121, 47, 24, 53, 33, 59, 2000, 61, 42, 67, 130, 71, 10001, 73, 51, 79, 202, 83, 60, 89, 8, 97, 220, 101, 10010, 103, 301, 107, 10100, 109, 310, 113
Offset: 1

Views

Author

Carole Dubois, Dec 31 2020

Keywords

Examples

			Prime 2 + (1) = prime 3;
prime 3 + (2+0) = prime 5;
prime 5 + (1+1+0) = prime 7;
prime 7 + (4) = prime 11;
prime 11 + (2+0+0) = prime 13;
prime 13 + (2+2) = 17; etc.
		

Crossrefs

Cf. A000040 (primes), A219606.
Differences between consecutive primes: A001223, A134735, A340063.
Showing 1-2 of 2 results.