login
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