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 A275332 #14 Mar 27 2020 12:11:30 %S A275332 0,0,0,0,0,1,0,1,0,1,1,2,2,2,1,1,0,1,1,1,2,2,1,1,1,0,1,2,3,5,7,8,9,9, %T A275332 8,7,5,3,2,1,0,1,1,2,2,4,4,5,4,5,4,4,2,2,1,1,0,1,2,4,6,10,14,19,23,28, %U A275332 31,34,34,34,31,28,23,19,14,10,6,4,2,1 %N A275332 Triangle read by rows: the major index statistic of the oscillating orbitals, also the q-analog of the oscillating orbitals A232500. %C A275332 The q-osc_orbitals are univariate polynomials over the integers with degree floor((n+1)/2)^2 - n mod 2. Evaluated at q=1 they give the oscillating orbitals A232500(n) for n>=2. %C A275332 Combinatorial interpretation: The definition of an orbital system is given in A232500 and in the link 'Orbitals'. The major index of an orbital is the sum of the positions of steps which are immediately followed by a step with strictly smaller value. The major index of the oscillating orbitals is the restriction of the major index of all orbitals (see A274888) to this subclass. %H A275332 Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/Orbitals">Orbitals</a> %F A275332 Let A(n,q) = q*alpha(n-2,q)/alpha(n,q) with alpha(n,q) = Sum_{j=0..n} q^j and B(n,q) = q*beta(n-1,q)/beta(n,q) with beta(n,q) = Sum_{j=0..n} q^(2*j). Then QOscOrbitals(n,q) = qSwing(n,q)*C(n,q) with C(n,q) = A(floor(n/2),q) if n mod 4 in {0, 1} else C(n,q) = B(floor(n/4),q). %e A275332 Some polynomials: %e A275332 [4] (q^2 + 1)*q %e A275332 [5] (q^4 + q^3 + q^2 + q + 1)*(q^2 + 1)*q %e A275332 [6] (q^4 + q^3 + q^2 + q + 1)*(q^2 - q + 1)*(q + 1)*q %e A275332 [7] (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1)*(q^4 + q^3 + q^2 + q + 1)*(q^2 - q + 1)*(q + 1)*q %e A275332 [8] (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1)*(q^4 + 1)*(q^2 + q + 1)*(q^2 - q + 1)*q %e A275332 [9] (q^6 + q^5 + q^4 + q^3 + q^2 + q + 1)*(q^6 + q^3 + 1)*(q^4 + 1)*(q^2 + q + 1)^2*(q^2 - q + 1)*q %e A275332 The triangle starts: %e A275332 [n] [k=0,1,2,...] [row sum] %e A275332 [0] [0] 0 %e A275332 [1] [0] 0 %e A275332 [2] [0] 0 %e A275332 [3] [0] 0 %e A275332 [4] [0, 1, 0, 1] 2 %e A275332 [5] [0, 1, 1, 2, 2, 2, 1, 1] 10 %e A275332 [6] [0, 1, 1, 1, 2, 2, 1, 1, 1] 10 %e A275332 [7] [0, 1, 2, 3, 5, 7, 8, 9, 9, 8, 7, 5, 3, 2, 1] 70 %e A275332 [8] [0, 1, 1, 2, 2, 4, 4, 5, 4, 5, 4, 4, 2, 2, 1, 1] 42 %e A275332 T(5,3) = 2 because A = [-1, 1, 1, -1, 0] and B = [1, 0, -1, -1, 1] are oscillating orbitals; A has downsteps at position 3 and B has downsteps at positions 1 and 2. %o A275332 (Sage) %o A275332 from sage.combinat.q_analogues import q_factorial %o A275332 def osc_orbitals_coeffs(n): %o A275332 q = var('q') %o A275332 if n < 4: return [0] %o A275332 a = lambda n,q: sum(q^j for j in (0..n)) %o A275332 b = lambda n,q: sum(q^(2*j) for j in (0..n)) %o A275332 A = lambda n,q: q*a(n-2,q)/a(n,q) %o A275332 B = lambda n,q: q*b(n-1,q)/b(n,q) %o A275332 Q = A(n//2,q) if n%4 == 0 or n%4 == 1 else B(n//4,q) %o A275332 qSwing = lambda n,q: q_factorial(n,q)/q_factorial(n//2,q)^2 %o A275332 return ((Q*qSwing(n,q)).factor()).list() %o A275332 for n in (0..10): print([n], osc_orbitals_coeffs(n)) %o A275332 (Sage) # uses[unit_orbitals from A274709] %o A275332 # Brute force counting %o A275332 def osc_orbitals_major_index(n): %o A275332 if n<4: return [0] %o A275332 S = [0]*(((n+1)//2)^2 - (n % 2)) %o A275332 for u in unit_orbitals(n): %o A275332 if all(x >= 0 for x in accumulate(u)): continue %o A275332 if all(x <= 0 for x in accumulate(u)): continue %o A275332 L = [i+1 if u[i+1] < u[i] else 0 for i in (0..n-2)] %o A275332 # i+1 because u is 0-based whereas convention assumes 1-base %o A275332 S[sum(L)] += 1 %o A275332 return S %o A275332 for n in (0..10): print(osc_orbitals_major_index(n)) %Y A275332 Cf. A056040 (row sums), A274887 (q-factorial), A274888 (q-swinging factorial), %Y A275332 A274884 (alternate description of oscillating orbitals). %K A275332 nonn,tabf %O A275332 0,12 %A A275332 _Peter Luschny_, Jul 26 2016