cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A204164 Symmetric matrix based on f(i,j) = floor((i+j)/2), by antidiagonals.

This page as a plain text file.
%I A204164 #36 Nov 15 2024 09:04:01
%S A204164 1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,
%T A204164 4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,
%U A204164 6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
%N A204164 Symmetric matrix based on f(i,j) = floor((i+j)/2), by antidiagonals.
%C A204164 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.
%C A204164 k appears 4k-1 times, k > 0. - _Boris Putievskiy_, Jun 12 2024
%C A204164 Number of numbers of the form 2k^2+k+1 <= n, for k = 0,1,2,... - _Wesley Ivan Hurt_, Jun 19 2024
%H A204164 Boris Putievskiy, <a href="/A204164/b204164.txt">Table of n, a(n) for n = 1..9870</a>
%H A204164 Boris Putievskiy, <a href="https://arxiv.org/abs/2310.18466">Integer Sequences: Irregular Arrays and Intra-Block Permutations</a>, arXiv:2310.18466 [math.CO], 2023.
%F A204164 a(n) = ceiling((sqrt(8*n+1)-1)/4). - _Boris Putievskiy_, Jun 12 2024
%F A204164 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
%F A204164 a(n) = m+1 if n>m(2m+1) and a(n) = m otherwise where m = floor(sqrt(n/2)). - _Chai Wah Wu_, Nov 14 2024
%e A204164 Northwest corner:
%e A204164   1 1 2 2 3 3 4 4
%e A204164   1 2 2 3 3 4 4 5
%e A204164   2 2 3 3 4 4 5 5
%e A204164   2 3 3 4 4 5 5 6
%e A204164   3 3 4 4 5 5 6 6
%t A204164 f[i_, j_] := Floor[(i + j)/2];
%t A204164 m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
%t A204164 TableForm[m[8]] (* 8 X 8 principal submatrix *)
%t A204164 Flatten[Table[f[i, n + 1 - i], {n, 1, 15}, {i, 1, n}]]  (* this sequence *)
%t A204164   (* or *)
%t A204164 p[n_] := CharacteristicPolynomial[m[n], x];
%t A204164 c[n_] := CoefficientList[p[n], x]
%t A204164 TableForm[Flatten[Table[p[n], {n, 1, 10}]]]
%t A204164 Table[c[n], {n, 1, 12}]
%t A204164 Flatten[%]                 (* A204165 *)
%t A204164 TableForm[Table[c[n], {n, 1, 10}]]
%t A204164   (* or *)
%t A204164 a[n_] = Ceiling[(Sqrt[8*n + 1] - 1)/4];
%t A204164 Nmax = 21; Table[a[n], {n, 1, Nmax}] (* _Boris Putievskiy_, Jun 12 2024 *)
%o A204164 (Python)
%o A204164 from math import isqrt
%o A204164 def A204164(n): return (m:=isqrt(n>>1))+(n>m*((m<<1)+1)) # _Chai Wah Wu_, Nov 14 2024
%Y A204164 Cf. A057211, A204165, A204016, A202453, A370655.
%K A204164 nonn,easy,tabl
%O A204164 1,4
%A A204164 _Clark Kimberling_, Jan 12 2012