login
A376468
Triangle T read by rows: T(n, k) = (n^2 - 2*n + 3 - (-1)^n + n^2 mod 8) / 2 + 4*k.
0
1, 2, 6, 3, 7, 11, 4, 8, 12, 16, 5, 9, 13, 17, 21, 10, 14, 18, 22, 26, 30, 15, 19, 23, 27, 31, 35, 39, 20, 24, 28, 32, 36, 40, 44, 48, 25, 29, 33, 37, 41, 45, 49, 53, 57, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96
OFFSET
0,2
COMMENTS
This triangle seen as a sequence yields a permutation of the natural numbers. For similar triangles see A000027 (seen as a triangle), A074147, and A367844 (row reversed).
FORMULA
T(n, k) = T(n, k-1) + 4.
T(n+4, 0) = T(n, n) + 4 for n > 3.
T(2*n, n) = 2 * (n^2 + n + 1) - (-1)^n = A001844(n) + 1 - (-1)^n.
EXAMPLE
Triangle T(n, k) for 0 <= k <= n starts:
n \k : 0 1 2 3 4 5 6 7 8 9 10 11
======================================================
0 : 1
1 : 2 6
2 : 3 7 11
3 : 4 8 12 16
4 : 5 9 13 17 21
5 : 10 14 18 22 26 30
6 : 15 19 23 27 31 35 39
7 : 20 24 28 32 36 40 44 48
8 : 25 29 33 37 41 45 49 53 57
9 : 34 38 42 46 50 54 58 62 66 70
10 : 43 47 51 55 59 63 67 71 75 79 83
11 : 52 56 60 64 68 72 76 80 84 88 92 96
etc.
PROG
(PARI) T(n, k)=(n^2-2*n+3-(-1)^n+n^2%8)/2+4*k
CROSSREFS
Sequence in context: A154129 A176014 A011447 * A076041 A156816 A021383
KEYWORD
nonn,easy,tabl
AUTHOR
Werner Schulte, Sep 23 2024
STATUS
approved