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”).

A262138
Interleaved first and second differences of the prime numbers.
2
1, 1, 2, 0, 2, 2, 4, -2, 2, 2, 4, -2, 2, 2, 4, 2, 6, -4, 2, 4, 6, -2, 4, -2, 2, 2, 4, 2, 6, 0, 6, -4, 2, 4, 6, -2, 4, -2, 2, 4, 6, -2, 4, 2, 6, 2, 8, -4, 4, -2, 2, 2, 4, -2, 2, 2, 4, 10, 14, -10, 4, 2, 6, -4, 2, 8, 10, -8, 2, 4, 6, 0, 6, -2, 4, 2, 6, 0, 6
OFFSET
1,3
COMMENTS
a(2*n-1) = A001223(n); a(2*n) = A036263(n+2);
a(2*n-1) = prime(n+1) - prime(n);
a(2*n) = prime(n+2) - 2*prime(n+1) + prime(n);
a(2*A064113(n)) = 0.
LINKS
EXAMPLE
A000040: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53
A001223: 1 2 2 4 2 4 2 4 6 2 6 4 2 4 6
A036263: 1 0 2 -2 2 -2 2 2 -4 4 -2 -2 2 2 0
A262138: 1 1 2 0 2 2 4 -2 2 2 4 -2 2 2 4 2 6 -4 2 4 6 -2 4 -2 2 2 4 2 6 0
MATHEMATICA
With[{nn=50}, Riffle[Differences[Prime[Range[nn]]], Differences[ Prime[ Range[ nn]], 2]]] (* Harvey P. Dale, Nov 01 2015 *)
PROG
(Haskell)
import Data.List (transpose)
a262138 n = a262138_list !! (n-1)
a262138_list = concat $ transpose [a001223_list, a036263_list]
CROSSREFS
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Sep 12 2015
STATUS
approved