This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A295746 Distinct second differences in the sequence of primes in order of appearance. 4
 1, 0, 2, -2, -4, 4, 10, -10, 8, -8, 6, 16, -12, -16, 12, -14, -20, 28, -28, -6, 22, 14, 20, 26, -26, -22, -24, 24, -18, 18, 32, -32, -30, 40, -40, 30, -38, -34, 46, 38, 50, -46, 34, 68, -64, -44, 58, -58, -48, -50, 48, 52, -54, 44, -52, 36, -42, 56 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS A036263 excluding repeated terms. - Iain Fox, Nov 30 2017 LINKS Robert G. Wilson v, Table of n, a(n) for n = 1..358 (first 97 terms from Edward Bernstein) EXAMPLE From Jon E. Schoenfield, Jan 15 2018: (Start) The first several primes and their 1st and 2nd differences are as follows: .    k prime(k)  1st difference    2nd difference   -- --------  --------------  -------------------    1     2                  3 -  2 = 1    2     3                     2 - 1 =  1 (new)                  5 -  3 = 2    3     5                     2 - 2 =  0 (new)                  7 -  5 = 2    4     7                     4 - 2 =  2 (new)                 11 -  7 = 4    5    11                     2 - 4 = -2 (new)                 13 - 11 = 2    6    13                     4 - 2 =  2 (repeat)                 17 - 13 = 4    7    17                     2 - 4 = -2 (repeat)                 19 - 17 = 2    8    19                     4 - 2 =  2 (repeat)                 23 - 19 = 4    9    23                     6 - 4 =  2 (repeat)                 29 - 23 = 6   10    29                     2 - 6 = -4 (new)                 31 - 29 = 2   11    31 . and the 2nd differences that are not repeats of 2nd differences encountered earlier are, in order of appearance, 1, 0, 2, -2, -4, ..., i.e., the terms of this sequence. (End) MAPLE P:= select(isprime, [2, seq(i, i=3..10^6, 2)]): DP:= P[2..-1]-P[1..-2]: DDP:= DP[2..-1]-DP[1..-2]: ListTools:-MakeUnique(DDP); # Robert Israel, Jan 15 2018 MATHEMATICA DeleteDuplicates@ Differences[Prime@ Range[10^4], 2] (* Michael De Vlieger, Dec 09 2017 *) PROG (PARI) first(n) = { my(res = vector(n), i=3, j=3); res[1]=1; res[2]=0; while(i<=n, my(d=prime(j+2)+prime(j)-2*prime(j+1)); if(!setsearch(Set(res), d), res[i]=d; i++); j++); res; } \\ Iain Fox, Nov 30 2017 CROSSREFS Cf. A036263. A295973 are the primes associated with the new second differences. Sequence in context: A170831 A133406 A240381 * A272104 A285436 A286088 Adjacent sequences:  A295743 A295744 A295745 * A295747 A295748 A295749 KEYWORD sign AUTHOR Edward Bernstein, Nov 29 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 22 14:23 EDT 2019. Contains 322349 sequences. (Running on oeis4.)