login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Ordered differences of primes.
70

%I #19 May 22 2016 00:03:12

%S 1,3,2,5,4,2,9,8,6,4,11,10,8,6,2,15,14,12,10,6,4,17,16,14,12,8,6,2,21,

%T 20,18,16,12,10,6,4,27,26,24,22,18,16,12,10,6,29,28,26,24,20,18,14,12,

%U 8,2,35,34,32,30,26,24,20,18,14,8,6,39,38,36,34,30,28,24,22

%N Ordered differences of primes.

%C For a guide to related sequences, see A204892.

%C A086800, zeros omitted. - _R. J. Mathar_, Sep 15 2012

%e a(1) = p(2)-p(1) = 3-2 = 1

%e a(2) = p(3)-p(1) = 5-2 = 3

%e a(3) = p(3)-p(2) = 5-3 = 2

%e a(4) = p(4)-p(1) = 7-2 = 5

%e a(5) = p(4)-p(2) = 7-3 = 4

%e a(6) = p(4)-p(3) = 7-5 = 2

%e From _Michel Marcus_, May 12 2016: (Start)

%e As a triangle, first rows are:

%e 1;

%e 3, 2;

%e 5, 4, 2;

%e 9, 8, 6, 4;

%e 11, 10, 8, 6, 2;

%e (End)

%t (See the program at A204892.)

%t With[{prs=Prime[Range[20]]},Flatten[Table[prs[[n]]-Take[prs,n-1], {n,2,Length[prs]}]]] (* _Harvey P. Dale_, Dec 01 2013 *)

%o (PARI) tabl(nn) = {for (n=2, nn, for (m=1, n-1, print1(prime(n) - prime(m), ", ");); print(););} \\ _Michel Marcus_, May 12 2016

%Y Cf. A204892, A090321.

%K nonn,tabl,easy

%O 1,2

%A _Clark Kimberling_, Jan 20 2012