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.
%I A014132 #109 Jan 05 2025 19:51:34 %S A014132 2,4,5,7,8,9,11,12,13,14,16,17,18,19,20,22,23,24,25,26,27,29,30,31,32, %T A014132 33,34,35,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,56,57,58, %U A014132 59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,79 %N A014132 Complement of triangular numbers (A000217); also array T(n,k) = ((n+k)^2 + n-k)/2, n, k > 0, read by antidiagonals. %C A014132 Numbers that are not triangular (nontriangular numbers). %C A014132 Also definable as follows: a(1)=2; for n>1, a(n) is smallest integer greater than a(n-1) such that the condition "n and a(a(n)) have opposite parities" can always be satisfied. - _Benoit Cloitre_ and _Matthew Vandermast_, Mar 10 2003 %C A014132 Record values in A256188 that are greater than 1. - _Reinhard Zumkeller_, Mar 26 2015 %C A014132 From _Daniel Forgues_, Apr 10 2015: (Start) %C A014132 With n >= 1, k >= 1: %C A014132 t(n+k) - k, 1 <= k <= n+k-1, n >= 1; %C A014132 t(n+k-1) + n, 1 <= n <= n+k-1, k >= 1; %C A014132 where t(n+k) = t(n+k-1) + (n+k) is the (n+k)-th triangular number, while the number of compositions of n+k into 2 parts is C(n+k-1, 2-1) = n+k-1, the number of nontriangular numbers between t(n+k-1) and t(n+k), just right! %C A014132 Related to Hilbert's Infinite Hotel: %C A014132 0) All rooms, numbered through the positive integers, are full; %C A014132 1) An infinite number of trains, each containing an infinite number of passengers, arrives: i.e., a 2-D lattice of pairs of positive integers; %C A014132 2) Move occupant of room m, m >= 1, to room t(m) = m*(m+1)/2, where t(m) is the m-th triangular number; %C A014132 3) Assign n-th passenger from k-th train to room t(n+k-1) + n, 1 <= n <= n+k-1, k >= 1; %C A014132 4) Everybody has his or her own room, no room is empty, for m >= 1. %C A014132 If situation 1 happens again, repeat steps 2 and 3, you're back to 4. %C A014132 (End) %C A014132 1711 + 2*a(n)*(58 + a(n)) is prime for n<=21. The terms that do not have this property start 29,32,34,43,47,58,59,60,62,63,65,68,70,73,... - _Benedict W. J. Irwin_, Nov 22 2016 %C A014132 Also numbers k with the property that in the symmetric representation of sigma(k) both Dyck paths have a central peak or both Dyck paths have a central valley. (Cf. A237593.) - _Omar E. Pol_, Aug 28 2018 %H A014132 T. D. Noe, <a href="/A014132/b014132.txt">Table of n, a(n) for n = 1..1000</a> %H A014132 Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Cloitre/cloitre2.html">Numerical analogues of Aronson's sequence</a>, J. Integer Seqs., Vol. 6 (2003), #03.2.2. %H A014132 Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, <a href="http://arXiv.org/abs/math.NT/0305308">Numerical analogues of Aronson's sequence</a> arXiv:math/0305308 [math.NT], 2003. %H A014132 Bakir Farhi, <a href="http://arxiv.org/abs/1105.1127">An explicit formula generating the non-Fibonacci numbers</a>, arXiv:1105.1127 [math.NT], May 05 2011. See Example 5 p. 456. %H A014132 J. Lambek and L. Moser, <a href="http://www.jstor.org/stable/2308078">Inverse and complementary sequences of natural numbers</a>, Amer. Math. Monthly, 61 (1954), 454-458. %H A014132 Cristinel Mortici, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/48-4/Mortici.pdf">Remarks on Complementary Sequences</a>, Fibonacci Quart. 48 (2010), no. 4, 343-347. %H A014132 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012. %F A014132 a(n) = n + round(sqrt(2*n)). %F A014132 a(a(n)) = n + 2*floor(1/2 + sqrt(2n)) + 1. %F A014132 a(n) = a(n-1) + A035214(n), a(1)=2. %F A014132 a(n) = A080036(n) - 1. %F A014132 a(n) = n + A002024(n). - _Vincenzo Librandi_, Jul 08 2010 %F A014132 A010054(a(n)) = 0. - _Reinhard Zumkeller_, Dec 10 2012 %F A014132 From _Boris Putievskiy_, Jan 14 2013: (Start) %F A014132 a(n) = A007401(n)+1. %F A014132 a(n) = A003057(n)^2 - A114327(n). %F A014132 a(n) = ((t+2)^2 + i - j)/2, where %F A014132 i = n-t*(t+1)/2, %F A014132 j = (t*t+3*t+4)/2-n, %F A014132 t = floor((-1+sqrt(8*n-7))/2). (End) %F A014132 A248952(a(n)) < 0. - _Reinhard Zumkeller_, Oct 20 2014 %F A014132 a(n) = A256188(A004202(n)). - _Reinhard Zumkeller_, Mar 26 2015 %F A014132 From _Robert Israel_, Apr 20 2015 (Start): %F A014132 a(n) = A118011(n) - n. %F A014132 G.f.: x/(1-x)^2 + x/(1-x) * Sum(j>=0, x^(j*(j+1)/2)) = x/(1-x)^2 + x^(7/8)/(2-2*x) * Theta2(0,sqrt(x)), where Theta2 is a Jacobi theta function. (End) %F A014132 G.f. as array: x*y*(2 - 2*y + x^2*y + y^2 - x*(1 + y))/((1 - x)^3*(1 - y)^3). - _Stefano Spezia_, Apr 22 2024 %e A014132 From _Boris Putievskiy_, Jan 14 2013: (Start) %e A014132 Start of the sequence as a table (read by antidiagonals, right to left), where the k-th row corresponds to the k-th column of the triangle (shown thereafter): %e A014132 2, 4, 7, 11, 16, 22, 29, ... %e A014132 5, 8, 12, 17, 23, 30, 38, ... %e A014132 9, 13, 18, 24, 31, 39, 48, ... %e A014132 14, 19, 25, 32, 40, 49, 59, ... %e A014132 20, 26, 33, 41, 50, 60, 71, ... %e A014132 27, 34, 42, 51, 61, 72, 84, ... %e A014132 35, 43, 52, 62, 73, 85, 98, ... %e A014132 (...) %e A014132 Start of the sequence as a triangle (read by rows), where the i elements of the i-th row are t(i) + 1 up to t(i+1) - 1, i >= 1: %e A014132 2; %e A014132 4, 5; %e A014132 7, 8, 9; %e A014132 11, 12, 13, 14; %e A014132 16, 17, 18, 19, 20; %e A014132 22, 23, 24, 25, 26, 27; %e A014132 29, 30, 31, 32, 33, 34, 35; %e A014132 (...) %e A014132 Row number i contains i numbers, where t(i) = i*(i+1)/2: %e A014132 t(i) + 1, t(i) + 2, ..., t(i) + i = t(i+1) - 1 %e A014132 (End) [Edited by _Daniel Forgues_, Apr 11 2015] %t A014132 f[n_] := n + Round[Sqrt[2n]]; Array[f, 71] (* or *) %t A014132 Complement[ Range[83], Array[ #(# + 1)/2 &, 13]] (* _Robert G. Wilson v_, Oct 21 2005 *) %t A014132 DeleteCases[Range[80],_?(OddQ[Sqrt[8#+1]]&)] (* _Harvey P. Dale_, Jul 24 2021 *) %o A014132 (PARI) a(n)=if(n<1,0,n+(sqrtint(8*n-7)+1)\2) %o A014132 (PARI) isok(n) = !ispolygonal(n,3); \\ _Michel Marcus_, Mar 01 2016 %o A014132 (Magma) IsTriangular:=func< n | exists{ k: k in [1..Isqrt(2*n)] | n eq (k*(k+1) div 2)} >; [ n: n in [1..90] | not IsTriangular(n) ]; // _Klaus Brockhaus_, Jan 04 2011 %o A014132 (Haskell) %o A014132 a014132 n = n + round (sqrt $ 2 * fromInteger n) %o A014132 a014132_list = filter ((== 0) . a010054) [0..] %o A014132 -- _Reinhard Zumkeller_, Dec 12 2012 %o A014132 (Python) %o A014132 from math import isqrt %o A014132 def A014132(n): return n+(isqrt((n<<3)-7)+1>>1) # _Chai Wah Wu_, Jun 17 2024 %Y A014132 Cf. A000217, A006002, A035214, A080036, A002024, A007401, A003057, A114327, A002260, A004736, A118011, A237593. %Y A014132 Cf. A000124 (left edge: quasi-triangular numbers), A000096 (right edge: almost-triangular numbers), A006002 (row sums), A001105 (central terms). %Y A014132 Cf. A242401 (subsequence). %Y A014132 Cf. A004202, A256188. %Y A014132 Cf. A145397 (the non-tetrahedral numbers). %K A014132 nonn,easy,nice,tabl %O A014132 1,1 %A A014132 _N. J. A. Sloane_ %E A014132 Following _Alford Arnold_'s comment: keyword tabl and correspondent crossrefs added by _Reinhard Zumkeller_, Dec 12 2012 %E A014132 I restored the original definition. - _N. J. A. Sloane_, Jan 27 2019