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.

A185869 (Odd,even)-polka dot array in the natural number array A000027; read by antidiagonals.

This page as a plain text file.
%I A185869 #29 Jun 18 2025 11:55:18
%S A185869 2,7,9,16,18,20,29,31,33,35,46,48,50,52,54,67,69,71,73,75,77,92,94,96,
%T A185869 98,100,102,104,121,123,125,127,129,131,133,135,154,156,158,160,162,
%U A185869 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
%N A185869 (Odd,even)-polka dot array in the natural number array A000027; read by antidiagonals.
%C A185869 This is the second of four polka dot arrays; see A185868.
%C A185869 row 1: A130883;
%C A185869 row 2: A100037;
%C A185869 row 3: A100038;
%C A185869 row 4: A100039;
%C A185869 col 1: A014107;
%C A185869 col 2: A033537;
%C A185869 col 3: A100040;
%C A185869 col 4: A100041;
%C A185869 diag (2,18,...): A077591;
%C A185869 diag (7,31,...): A157914;
%C A185869 diag (16,48,...): A035008;
%C A185869 diag (29,69,...): A108928;
%C A185869 antidiagonal sums: A033431;
%C A185869 antidiagonal sums: 2*(1^3, 2^3, 3^3, 4^3,...) = 2*A000578.
%C A185869 A060432(n) + n is odd if and only if n is in this sequence. - _Peter Kagey_, Feb 03 2016
%H A185869 Peter Kagey, <a href="/A185869/b185869.txt">Table of n, a(n) for n = 1..10000</a>
%F A185869 T(n,k) = 2n-1+(n+k-1)*(2n+2k-3), k>=1, n>=1.
%e A185869 Northwest corner:
%e A185869   2....7....16...29...46
%e A185869   9....18...31...48...69
%e A185869   20...33...50...71...96
%e A185869   35...52...73...98...127
%t A185869 f[n_,k_]:=2n-1+(2n+2k-3)(n+k-1);
%t A185869 TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]
%t A185869 Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten
%o A185869 (Haskell)
%o A185869 a185869 n = a185869_list !! (n - 1)
%o A185869 a185869_list = scanl (+) 2 $ a' 1
%o A185869   where  a' n = 2 * n + 3 : replicate n 2 ++ a' (n + 1)
%o A185869 -- _Peter Kagey_, Sep 02 2016
%o A185869 (Python)
%o A185869 from math import isqrt, comb
%o A185869 def A185869(n):
%o A185869     a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
%o A185869     x = n-comb(a,2)
%o A185869     y = a-x+1
%o A185869     return y*((y+(c:=x<<1)<<1)-5)+x*(c-3)+2 # _Chai Wah Wu_, Jun 18 2025
%Y A185869 Cf. A000027 (as an array), A060432, A185868, A185870, A185871.
%K A185869 nonn,tabl
%O A185869 1,1
%A A185869 _Clark Kimberling_, Feb 05 2011