OFFSET
1,4
COMMENTS
A204164 represents the matrix M given by f(i,j) = floor((i+j)/2) for i >= 1 and j >= 1. See A204165 for characteristic polynomials of principal submatrices of M, with interlacing zeros. See A204016 for a guide to other choices of M.
k appears 4k-1 times, k > 0. - Boris Putievskiy, Jun 12 2024
Number of numbers of the form 2k^2+k+1 <= n, for k = 0,1,2,... - Wesley Ivan Hurt, Jun 19 2024
LINKS
Boris Putievskiy, Table of n, a(n) for n = 1..9870
Boris Putievskiy, Integer Sequences: Irregular Arrays and Intra-Block Permutations, arXiv:2310.18466 [math.CO], 2023.
FORMULA
a(n) = ceiling((sqrt(8*n+1)-1)/4). - Boris Putievskiy, Jun 12 2024
a(n) = Sum_{k=1..n} [c(k) = c(k-1)+1], where c(n) = floor(sqrt(2n)+1/2) mod 2 = A057211(n) and [] is the Iverson bracket. - Wesley Ivan Hurt, Jun 23 2024
EXAMPLE
Northwest corner:
1 1 2 2 3 3 4 4
1 2 2 3 3 4 4 5
2 2 3 3 4 4 5 5
2 3 3 4 4 5 5 6
3 3 4 4 5 5 6 6
MATHEMATICA
f[i_, j_] := Floor[(i + j)/2];
m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
TableForm[m[8]] (* 8 X 8 principal submatrix *)
Flatten[Table[f[i, n + 1 - i], {n, 1, 15}, {i, 1, n}]] (* this sequence *)
(* or *)
p[n_] := CharacteristicPolynomial[m[n], x];
c[n_] := CoefficientList[p[n], x]
TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
Table[c[n], {n, 1, 12}]
Flatten[%] (* A204165 *)
TableForm[Table[c[n], {n, 1, 10}]]
(* or *)
a[n_] = Ceiling[(Sqrt[8*n + 1] - 1)/4];
Nmax = 21; Table[a[n], {n, 1, Nmax}] (* Boris Putievskiy, Jun 12 2024 *)
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Jan 12 2012
STATUS
approved