A073783 First differences of composite numbers.
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
Examples
a(7) = A002808(8) - A002808(7) = 15 - 14 = 1.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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
Comments