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.

A185871 (Even,even)-polka dot array in the natural number array A000027, by antidiagonals.

Original entry on oeis.org

5, 12, 14, 23, 25, 27, 38, 40, 42, 44, 57, 59, 61, 63, 65, 80, 82, 84, 86, 88, 90, 107, 109, 111, 113, 115, 117, 119, 138, 140, 142, 144, 146, 148, 150, 152, 173, 175, 177, 179, 181, 183, 185, 187, 189, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, 373, 375, 377, 408, 410, 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, 432, 434
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is the fourth of four polka dot arrays in the natural number array A000027. See A185868.
row 1: A096376
col 1: A014106
col 2: A071355
diag (5,25,...): A080856
diag (12,40,...): A033586
antidiagonal sums: A048395 (sums of consecutive squares)

Examples

			Northwest corner:
  5....12...23...38...57
  14...25...40...59...82
  27...42...61...84...111
  44...63...86...113..144
		

Crossrefs

Cf. A000027 (as an array), A185868, A185869, A185870.

Programs

  • Mathematica
    f[n_,k_]:=2n+(n+k-1)(2n+2k-1);
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
  • Python
    from math import comb, isqrt
    def A185871(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        x = n-comb(a,2)
        y = a-x+1
        return y*((y+(c:=x<<1)<<1)-3)+x*(c-1)+1 # Chai Wah Wu, Jun 18 2025

Formula

T(n,k) = 2*n + (n+k-1)*(2*n+2*k-1), k>=1, n>=1.