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.

This page as a plain text file.
%I A185871 #18 Jun 18 2025 18:04:16
%S A185871 5,12,14,23,25,27,38,40,42,44,57,59,61,63,65,80,82,84,86,88,90,107,
%T A185871 109,111,113,115,117,119,138,140,142,144,146,148,150,152,173,175,177,
%U A185871 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
%N A185871 (Even,even)-polka dot array in the natural number array A000027, by antidiagonals.
%C A185871 This is the fourth of four polka dot arrays in the natural number array A000027.  See A185868.
%C A185871 row 1: A096376
%C A185871 col 1: A014106
%C A185871 col 2: A071355
%C A185871 diag (5,25,...): A080856
%C A185871 diag (12,40,...): A033586
%C A185871 antidiagonal sums: A048395 (sums of consecutive squares)
%H A185871 G. C. Greubel, <a href="/A185871/b185871.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%F A185871 T(n,k) = 2*n + (n+k-1)*(2*n+2*k-1), k>=1, n>=1.
%e A185871 Northwest corner:
%e A185871   5....12...23...38...57
%e A185871   14...25...40...59...82
%e A185871   27...42...61...84...111
%e A185871   44...63...86...113..144
%t A185871 f[n_,k_]:=2n+(n+k-1)(2n+2k-1);
%t A185871 TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
%t A185871 Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
%o A185871 (Python)
%o A185871 from math import comb, isqrt
%o A185871 def A185871(n):
%o A185871     a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
%o A185871     x = n-comb(a,2)
%o A185871     y = a-x+1
%o A185871     return y*((y+(c:=x<<1)<<1)-3)+x*(c-1)+1 # _Chai Wah Wu_, Jun 18 2025
%Y A185871 Cf. A000027 (as an array), A185868, A185869, A185870.
%K A185871 nonn,tabl
%O A185871 1,1
%A A185871 _Clark Kimberling_, Feb 05 2011