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.

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

Original entry on oeis.org

3, 8, 10, 17, 19, 21, 30, 32, 34, 36, 47, 49, 51, 53, 55, 68, 70, 72, 74, 76, 78, 93, 95, 97, 99, 101, 103, 105, 122, 124, 126, 128, 130, 132, 134, 136, 155, 157, 159, 161, 163, 165, 167, 169, 171, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 327, 329, 331, 333, 335, 337, 339, 341, 343, 345, 347, 349, 351, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 406
Offset: 1

Views

Author

Clark Kimberling, Feb 05 2011

Keywords

Comments

This is the third of four polka dot arrays in the array A000027. See A185868.
row 1: A033816
col 1: A014105
col 2: -A168244
antidiagonal sums: A061317
antidiagonal sums: 3*(octahedral numbers) = 3*A005900.

Examples

			Northwest corner:
  3....8....17...30...47
  10...19...32...49...70
  21...34...51...72...97
  36...53...74...99...128
		

Crossrefs

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

Programs

  • Mathematica
    f[n_,k_]:=2n+(2n+2k-3)(n+k-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 A185870(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)-5)+x*(c-3)+3 # Chai Wah Wu, Jun 18 2025

Formula

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