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.

A073783 First differences of composite numbers.

Original entry on oeis.org

2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1
Offset: 1

Views

Author

Lior Manor, Aug 11 2002

Keywords

Comments

Also, the highest common factors of pair of successive composite numbers. - Amarnath Murthy, Jan 31 2003
All terms are 1 or 2. Runs of 1's may be of arbitrary lengths, while the lengths of runs of 2's are 1 or 2. - Zak Seidov, Mar 18 2013

Examples

			a(7) = A002808(8) - A002808(7) = 15 - 14 = 1.
		

Crossrefs

a(n) = A136527(n, n+1).
Cf. A073445 (first differences).

Programs

  • Haskell
    a073783 n = a073783_list !! (n-1)
    a073783_list = zipWith (-) (tail a002808_list) a002808_list
    -- Reinhard Zumkeller, Jan 10 2013
    
  • Mathematica
    c[x_] := FixedPoint[x + PrimePi[#] + 1 &, x]; Differences[c /@ Range[106]] (* Jayanta Basu, Jul 09 2013 *)
  • PARI
    m=4;forcomposite(n=6,1e3,print1(n-m", ");m=n) \\ Charles R Greathouse IV, Mar 20 2013

Formula

a(n) = A002808(n+1) - A002808(n).
a(n) = A073784(n) + 1.