A185869 (Odd,even)-polka dot array in the natural number array A000027; read by antidiagonals.
2, 7, 9, 16, 18, 20, 29, 31, 33, 35, 46, 48, 50, 52, 54, 67, 69, 71, 73, 75, 77, 92, 94, 96, 98, 100, 102, 104, 121, 123, 125, 127, 129, 131, 133, 135, 154, 156, 158, 160, 162, 164, 166, 168, 170, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 277, 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, 299, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 379, 381, 383, 385, 387, 389, 391, 393, 395, 397, 399, 401, 403, 405
Offset: 1
Examples
Northwest corner: 2....7....16...29...46 9....18...31...48...69 20...33...50...71...96 35...52...73...98...127
Links
- Peter Kagey, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a185869 n = a185869_list !! (n - 1) a185869_list = scanl (+) 2 $ a' 1 where a' n = 2 * n + 3 : replicate n 2 ++ a' (n + 1) -- Peter Kagey, Sep 02 2016
-
Mathematica
f[n_,k_]:=2n-1+(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 isqrt, comb def A185869(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)+2 # Chai Wah Wu, Jun 18 2025
Formula
T(n,k) = 2n-1+(n+k-1)*(2n+2k-3), k>=1, n>=1.
Comments