# Array generalizing A031165

N. J. A. Sloane njas at research.att.com
Fri Aug 15 03:21:55 CEST 2008

```5 - 2 = 3.

So a(2,1) = 3, not 4.

And the n = 1 column is A040976.

In fact, the entire second row is off by one column; the 3 needs to be
inserted at the beginning of the row.

-----Original Message-----
From: Jonathan Post <jvospost3 at gmail.com>

Since I see that A031165 has just been (re)edited, and comments
already read: "This sequence is the k=3 case of the family of
sequences a(k,n) = prime(n+k) - prime(n). See A001223 and A031131 for
k = 1 and 2."  it seems to me worth looking at the array a(k,n) =
prime(n+k) - prime(n) by value (rather than just by reference). Is
there anbything worth saying about it, or worth entering it as a seq
by antidiagonals?

.......|n=1.|.n=2.|.n=3.|.n=4.|.n=5.|.n=6.|.n=7.|.n=8.|.n=9.|.n=10.|.n=11
.|.n=12.|.n=13.|.n=14.|.n=15.|.n=16.|.n=17.|.n=18.|.n=19.|.n=20.|.
k=1.|...1..|...2...|...2...|...4..|...2...|...4...|...2...|...4...|...6..
|.....2...|....6....|....4...|....2...|.....4...|....6...|...6.....|....2
...|....6....|....4...|...2..|.A001223
k=2.|...4..|...6...|...6...|...6..|...6...|...6...|..10..|...8...|...8...
|...10..|....6....|....6...|..10...|...12...|....8...|...8.....|..10...|.
....6....|....8...|..10..|.A031131
k=3.|...5..|...8...|...8...|..10.|...8...|..10..|..12...|..12..|..14..|..
.12..|..12....|...10...|..12..|...16...|...14..|...14...|...12..|...12...
..|...12...|..12..|.A031165
k=4.|...9..|..10..|..12...|..12..|.12..|..16..|..14..|...18..|..18..|...1
4..|..16...|....16...|..18..|...18...|...20..|...18...|...14..|...18.....
|...16...|..18..|.new
k=5.|..11.|..14..|..14...|..16..|.18..|..18..|..20...|..22..|..20...|..18
..|...22..|....22...|..20..|...24....|..24..|...20...|...20..|...22......
|..22...|..26..|.new
k=6.|..15.|..16..|..18...|..22..|.20.|...24..|..24...|..24..|..24...|..24
..|...28..|....24...|..26..|...28....|..26,.|...26...|...24..|..28.......
|..30...|..30.|.new

and so forth..
The n=1 column is 1,4,5,9,11,15,... which is not in OEIS..

```