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.

A033638 Quarter-squares plus 1 (that is, a(n) = A002620(n) + 1).

This page as a plain text file.
%I A033638 #296 Jun 27 2025 04:20:28
%S A033638 1,1,2,3,5,7,10,13,17,21,26,31,37,43,50,57,65,73,82,91,101,111,122,
%T A033638 133,145,157,170,183,197,211,226,241,257,273,290,307,325,343,362,381,
%U A033638 401,421,442,463,485,507,530,553,577,601,626,651,677,703,730,757,785,813,842
%N A033638 Quarter-squares plus 1 (that is, a(n) = A002620(n) + 1).
%C A033638 Fill an infinity X infinity matrix with numbers so that 1..n^2 appear in the top left n X n corner for all n; write down the minimal elements in the rows and columns and sort into increasing order; maximize this list in the lexicographic order.
%C A033638 From _Donald S. McDonald_, Jan 09 2003: (Start)
%C A033638 Numbers of the form n^2 + 1 or n^2 + n + 1.
%C A033638 Locations of right angle turns in Ulam square spiral. (End)
%C A033638 a(n-1) (for n >= 1) is also the number u of unique Fibonacci/Lucas type sequences generated (the total number t of these sequences being a triangular number). Sum(n+1)=t. Then u=Sum((n+1/2) minus 0.5 for odd terms) except for the initial term. E.g., u=13: (n=6)+1 = 7; then 7/2 - 0.5 =3. So u = Sum(1, 1, 1, 2, 2, 3, 3) = 13. - _Marco Matosic_, Mar 11 2003
%C A033638 Number of (3412,123)-avoiding involutions in S_n.
%C A033638 Schur's Theorem (1905): the maximum number of mutually commuting linearly independent complex matrices of order n is floor((n^2)/4) + 1. - _Jonathan Vos Post_, Apr 03 2007
%C A033638 Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 2, A[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n >= 1, a(n)=(-1)^(n-1)*coeff(charpoly(A,x),x). - _Milan Janjic_, Jan 24 2010
%C A033638 Except for the initial two terms, A033638 gives iterates of the nonsquare function: c(n) = f(c(n-1)), where f(n) = A000037(n) = n + floor(1/2 + sqrt(n)) = n-th nonsquare, starting with c(1)=2. - _Clark Kimberling_, Dec 28 2010
%C A033638 For n >= 1: for all permutations of [0..n-1]: number of distinct values taken by Sum_{k=0..n-1} (k mod 2) * pi(k). - _Joerg Arndt_, Apr 22 2011
%C A033638 First differences are A110654. - _Jon Perry_, Sep 12 2012
%C A033638 Number of (weakly) unimodal compositions of n with maximal part <= 2, see example. - _Joerg Arndt_, May 10 2013
%C A033638 Construct an infinite triangular matrix with 1's in the leftmost column and the natural numbers in all other columns but shifted down twice. Square the triangle and the sequence is the leftmost column vector. - _Gary W. Adamson_, Jan 27 2014
%C A033638 Equals the sum of terms in upward sloping diagonals of an infinite lower triangle with 1's in the leftmost column and the natural numbers in all other columns. - _Gary W. Adamson_, Jan 29 2014
%C A033638 a(n) is the number of permutations of length n avoiding both 213 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - _Manda Riehl_, Aug 05 2014
%C A033638 Number of partitions of n with no more than 2 parts > 1. - _Wouter Meeussen_, Feb 22 2015, revised Apr 24 2023
%C A033638 Number of possible values for the area of a polyomino whose perimeter is 2n + 4. - _Luc Rousseau_, May 10 2018
%C A033638 a(n) is the number of 231-avoiding even Grassmannian permutations of size n+1. - _Juan B. Gil_, Mar 10 2023
%C A033638 For n > 0, a(n) is the smallest number that requires n iterations of the map k -> k - floor(sqrt(k)) to reach 0. - _Jon E. Schoenfield_, Jun 24 2023
%C A033638 a(n) agrees with the lower matching number of the (n + 1) X (n + 1) black bishop graph from n = 1 up to at least n = 14. - _Eric W. Weisstein_, Dec 23 2024
%C A033638 For n > 0, obtain a positive integer a(n+1) recursively from a(n) by minimizing a(n+1) > a(n) so that each gap between a(k) and a(k+1) for 1 <= k <= n is used at most twice. - _Gerold Jäger_, Jun 04 2025
%C A033638 From _Roger Ford_, May 19 2025: (Start)
%C A033638 a(n) = the number of different total arch lengths for the top arches of semi-meanders with n+2 arches.
%C A033638 Example: Each arch length equals 1 + the number of covered arches.
%C A033638          For semi-meanders with 5 top arches there are 3 different values.
%C A033638                        /\
%C A033638                       //\\               /\               /\
%C A033638                      ///\\\             //\\   /\        /  \
%C A033638                     ////\\\\ /\        ///\\\ //\\      //\/\\ /\ /\
%C A033638 Total arch lengths: 4+3+2+1  +1= 11    3+2+1   2+1= 9   3+1+1  +1 +1= 7, so a(3) = 3.
%C A033638 For semi-meanders with 6 top arches there are 5 values: 8, 10, 12, 14, 16, so a(4) = 5. (End)
%H A033638 Reinhard Zumkeller, <a href="/A033638/b033638.txt">Table of n, a(n) for n = 0..10000</a>
%H A033638 Kassie Archer and Aaron Geary, <a href="https://arxiv.org/abs/2406.09369">Descents in powers of permutations</a>, arXiv:2406.09369 [math.CO], 2024.
%H A033638 Jonathan Bloom and Nathan McNew, <a href="https://arxiv.org/abs/1908.03953">Counting pattern-avoiding integer partitions</a>, arXiv:1908.03953 [math.CO], 2019.
%H A033638 H. Cheballah, S. Giraudo, and R. Maurice, <a href="https://arxiv.org/abs/1306.6605">Combinatorial Hopf algebra structure on packed square matrices</a>, arXiv preprint arXiv:1306.6605 [math.CO], 2013.
%H A033638 E. S. Egge, <a href="https://arxiv.org/abs/math/0307050">Restricted 3412-Avoiding Involutions: Continued Fractions, Chebyshev Polynomials and Enumerations</a>, Thm. 6.6, arXiv:math/0307050 [math.CO], 2003.
%H A033638 D. C. Fielder and C. O. Alford, <a href="/A000108/a000108_19.pdf">An investigation of sequences derived from Hoggatt Sums and Hoggatt Triangles</a>, Application of Fibonacci Numbers, 3 (1990) 77-88. Proceedings of 'The Third Annual Conference on Fibonacci Numbers and Their Applications,' Pisa, Italy, July 25-29, 1988. (Annotated scanned copy)
%H A033638 Juan B. Gil and Jessica A. Tomasko, <a href="https://arxiv.org/abs/2112.03338">Restricted Grassmannian permutations</a>, arXiv:2112.03338 [math.CO], 2021. See Proposition 2.3 p. 4.
%H A033638 Juan B. Gil and Jessica A. Tomasko, <a href="https://arxiv.org/abs/2207.12617">Pattern-avoiding even and odd Grassmannian permutations</a>, arXiv:2207.12617 [math.CO], 2022.
%H A033638 Brian Hopkins and Aram Tangboonduangjit, <a href="https://arxiv.org/abs/2412.11528">Water Cells in Compositions of 1s and 2s</a>, arXiv:2412.11528 [math.CO], 2024. See p. 3.
%H A033638 Nathan Jacobson, <a href="http://dx.doi.org/10.1090/S0002-9904-1944-08169-X">Schur's theorems on commutative matrices</a>, Bull. Amer. Math. Soc. 50 (1944) 431-436.
%H A033638 Gerold Jäger and Tuomo Lehtilä, <a href="https://arxiv.org/abs/2504.03039">The Generalized Double Pouring Problem: Analysis, Bounds and Algorithms</a>, arXiv:2504.03039 [math.CO], 2025. See Definition 25(a), Lemma 26(a) and proof of Theorem 27. p. 9-12.
%H A033638 M. Mirzakhani, <a href="http://www.jstor.org/stable/2589084">A Simple Proof of a Theorem of Schur</a>, The American Mathematical Monthly, Vol. 105, No. 3 (Mar 1998), pp. 260-262.
%H A033638 D. Necas and I. Ohlidal, <a href="http://dx.doi.org/10.1364/OE.22.004499">Consolidated series for efficient calculation of the reflection and transmission in rough multilayers</a>, Optics Express, Vol. 22, 2014, No. 4; DOI:10.1364/OE.22.004499. See Table 1.
%H A033638 I. Schur, <a href="https://archive.org/stream/sitzungsberichte1905deutsch#page/406/mode/2up">Neue Begründung der Theorie der Gruppencharaktere</a>, Sitzungsberichte der Königlich Preussischen Akademie der Wissenschaften zu Berlin (1905), 406-432.
%H A033638 Harold N. Ward, <a href="https://arxiv.org/abs/2201.00389">A Normal Graph Algebra</a>, arXiv:2201.00389 [math.CO], 2022.
%H A033638 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BlackBishopGraph.html">Black Bishop Graph</a>.
%H A033638 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LowerMatchingNumber.html">Lower Matching Number</a>.
%H A033638 Julie Zhang, Noah A. Rosenberg, and Julia A. Palacios, <a href="https://arxiv.org/abs/2506.10856">The space of multifurcating ranked tree shapes: enumeration, lattice structure, and Markov chains</a>, arXiv:2506.10856 [math.PR], 2025. See p. 8.
%H A033638 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F A033638 a(n) = ceiling((n^2+3)/4) = ( (7 + (-1)^n)/2 + n^2 )/4.
%F A033638 a(n) = A001055(prime^n), number of factorizations. - _Reinhard Zumkeller_, Dec 29 2001
%F A033638 G.f.: (1-x+x^3)/((1-x)^2*(1-x^2)); a(n) = a(n-1) + a(n-2) - a(n-3) + 1. - _Jon Perry_, Jul 07 2004
%F A033638 a(n) = a(n-2) + n - 1. - _Paul Barry_, Jul 14 2004
%F A033638 a(0) = 1; a(1) = 1; for n > 1 a(n) = a(n-1) + round(sqrt(a(n-1))). - _Jonathan Vos Post_, Jan 19 2006
%F A033638 a(n) = floor((n^2)/4) + 1.
%F A033638 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 3. - _Philippe Deléham_, Nov 03 2008
%F A033638 a(0) = a(1) = 1, a(n) = a(n-1) + ceiling(sqrt(a(n-2))) for n > 1. - _Jonathan Vos Post_, Oct 08 2011
%F A033638 a(n) = floor(b(n)) with b(n) = b(n-1) + n/(1+e^(1/n)) and b(0)= 1. - _Richard R. Forberg_, Jun 08 2013
%F A033638 a(n) = a(n-1) + floor(n/2). - _Michel Lagneau_, Jul 11 2014
%F A033638 From _Ilya Gutkovskiy_, Oct 07 2016: (Start)
%F A033638 E.g.f.: (exp(-x) + (7 + 2*x + 2*x^2)*exp(x))/8.
%F A033638 a(n) = Sum_{k=0..n} A123108(k).
%F A033638 Convolution of A008619 and A179184. (End)
%F A033638 a(n) = (n^2 - n + 4)/2 - a(n-1) for n >= 1. - _Kritsada Moomuang_, Aug 03 2019
%e A033638 First 4 rows can be taken to be 1,2,5,10,17,...; 3,4,6,11,18,...; 7,8,9,12,19,...; 13,14,15,16,20,...
%e A033638 Ulam square spiral = 7 8 9 / 6 1 2 / 5 4 3 /...; changes of direction (right-angle) at 1 2 3 5 7 ...
%e A033638 From _Joerg Arndt_, May 10 2013: (Start)
%e A033638 The a(7)=13 unimodal compositions of 7 with maximal part <= 2 are
%e A033638   01:  [ 1 1 1 1 1 1 1 ]
%e A033638   02:  [ 1 1 1 1 1 2 ]
%e A033638   03:  [ 1 1 1 1 2 1 ]
%e A033638   04:  [ 1 1 1 2 1 1 ]
%e A033638   05:  [ 1 1 1 2 2 ]
%e A033638   06:  [ 1 1 2 1 1 1 ]
%e A033638   07:  [ 1 1 2 2 1 ]
%e A033638   08:  [ 1 2 1 1 1 1 ]
%e A033638   09:  [ 1 2 2 1 1 ]
%e A033638   10:  [ 1 2 2 2 ]
%e A033638   11:  [ 2 1 1 1 1 1 ]
%e A033638   12:  [ 2 2 1 1 1 ]
%e A033638   13:  [ 2 2 2 1 ]
%e A033638 (End)
%e A033638 G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 10*x^6 + 13*x^7 + 17*x^8 + ...
%p A033638 with(combstruct):ZL:=[st,{st=Prod(left,right),left=Set(U,card=r),right=Set(U,card<r),U=Sequence(Z,card>=3)}, unlabeled]: subs(r=1,stack): seq(count(subs(r=2,ZL),size=m),m=6..62); # _Zerinvary Lajos_, Mar 09 2007
%p A033638 A033638 := proc(n)
%p A033638         1+floor(n^2/4) ;
%p A033638 end proc: # _R. J. Mathar_, Jul 13 2012
%t A033638 a[n_] := a[n] = 2*a[n - 1] - 2*a[n - 3] + a[n - 4]; a[0] = a[1] = 1; a[2] = 2; a[3] = 3; Array[a, 54, 0] (* _Robert G. Wilson v_, Mar 28 2011 *)
%t A033638 LinearRecurrence[{2, 0, -2, 1}, {1, 1, 2, 3}, 60] (* _Robert G. Wilson v_, Sep 16 2012 *)
%o A033638 (PARI) {a(n) = n^2\4 + 1} /* _Michael Somos_, Apr 03 2007 */
%o A033638 (Haskell)
%o A033638 a033638 = (+ 1) . (`div` 4) . (^ 2)  -- _Reinhard Zumkeller_, Apr 06 2012
%o A033638 (Magma) [n^2 div 4 + 1: n in [0.. 50]]; // _Vincenzo Librandi_, Jul 31 2016
%o A033638 (Python)
%o A033638 def A033638(n): return (n**2>>2)+1 # _Chai Wah Wu_, Jul 27 2022
%Y A033638 Equals A002620 + 1.
%Y A033638 Cf. A002878, A004652, A002984, A083479, A080037 (complement, except 2).
%Y A033638 A002522 lists the even-indexed terms of this sequence.
%K A033638 easy,nonn
%O A033638 0,3
%A A033638 Tanya Y. Berger-Wolf (tanyabw(AT)uiuc.edu)