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 A302347 #32 May 29 2024 12:25:29 %S A302347 0,0,1,1,3,4,10,13,25,34,59,80,127,172,260,349,505,673,946,1248,1711, %T A302347 2238,3010,3902,5162,6637,8663,11051,14253,18051,23047,28988,36677, %U A302347 45840,57538,71485,89082,110062,136269,167487,206138,252132,308640,375777,457698 %N A302347 a(n) = Sum of (Y(2,p)^2) over the partitions p of n, Y(2,p) = number of part sizes with multiplicity 2 or greater in p. %C A302347 This sequence is part of the contribution to the b^2 term of C_{1-b,2}(q) for(1-b,2)-colored partitions - partitions in which we can label parts any of an indeterminate 1-b colors, but are restricted to using only 2 of the colors per part size. This formula is known to match the Han/Nekrasov-Okounkov hooklength formula truncated at hooks of size two up to the linear term in b. %C A302347 It is of interest to enumerate and determine specific characteristics of partitions of n, considering each partition individually. %H A302347 Alois P. Heinz, <a href="/A302347/b302347.txt">Table of n, a(n) for n = 0..2000</a> %H A302347 Guo-Niu Han, <a href="https://arxiv.org/abs/0805.1398">The Nekrasov-Okounkov hook length formula: refinement, elementary proof, extension and applications</a>, arXiv:0805.1398 [math.CO], 2008. %H A302347 Guo-Niu Han, <a href="https://doi.org/10.5802/aif.2515">The Nekrasov-Okounkov hook length formula: refinement, elementary proof, extension and applications</a>, Annales de l'institut Fourier, Tome 60 (2010) no. 1, pp. 1-29. %H A302347 W. J. Keith, <a href="https://doi.org/10.1007/s11139-015-9704-x">Restricted k-color partitions</a>, Ramanujan Journal (2016) 40: 71. %F A302347 a(n) = Sum_{p in P(n)} (H(2,p)^2 + 2*A024786 - 2*A024788), where P(n) is the set of partitions of n, and H(2,p) is the hooks of length 2 in partition p. %F A302347 G.f: (q^2*(1+q^4))/((1-q^2)*(1-q^4))*Product_{j>=1} 1/(1-q^j). %F A302347 a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (8*Pi^2). - _Vaclav Kotesovec_, May 22 2018 %e A302347 For a(6), we sum over partitions of six. For each partition, we count 1 for each part which appears more than once, then square the total in each partition. %e A302347 6............0^2 = 0 %e A302347 5,1..........0^2 = 0 %e A302347 4,2..........0^2 = 0 %e A302347 4,1,1........1^2 = 1 %e A302347 3,3..........1^2 = 1 %e A302347 3,2,1........0^2 = 0 %e A302347 3,1,1,1......1^2 = 1 %e A302347 2,2,2........1^2 = 1 %e A302347 2,2,1,1......2^2 = 4 %e A302347 2,1,1,1,1....1^2 = 1 %e A302347 1,1,1,1,1,1..1^2 = 1 %e A302347 -------------------- %e A302347 Total.............10 %p A302347 b:= proc(n, i, p) option remember; `if`(n=0 or i=1, ( %p A302347 `if`(n>1, 1, 0)+p)^2, add(b(n-i*j, i-1, %p A302347 `if`(j>1, 1, 0)+p), j=0..n/i)) %p A302347 end: %p A302347 a:= n-> b(n$2, 0): %p A302347 seq(a(n), n=0..60); # _Alois P. Heinz_, Apr 05 2018 %t A302347 Array[Total[Count[Split@ #, _?(Length@ # > 1 &)]^2 & /@ IntegerPartitions[#]] &, 44] (* _Michael De Vlieger_, Apr 07 2018 *) %t A302347 b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, ( %t A302347 If[n > 1, 1, 0] + p)^2, Sum[b[n - i*j, i - 1, %t A302347 If[j > 1, 1, 0] + p], {j, 0, n/i}]]; %t A302347 a[n_] := b[n, n, 0]; %t A302347 a /@ Range[0, 60] (* _Jean-François Alcover_, Jun 06 2021, after _Alois P. Heinz_ *) %o A302347 (Python) %o A302347 def sum_square_freqs_greater_one(freq_list): %o A302347 tot = 0 %o A302347 for f in freq_list: %o A302347 count = 0 %o A302347 for i in f: %o A302347 if i > 1: %o A302347 count += 1 %o A302347 tot += count*count %o A302347 return tot %o A302347 def frequencies(partition, n): %o A302347 tot = 0 %o A302347 freq_list = [] %o A302347 i = 0 %o A302347 for p in partition: %o A302347 freq = [0 for i in range(n+1)] %o A302347 for i in p: %o A302347 freq[i] += 1 %o A302347 for f in freq: %o A302347 if f == 0: %o A302347 tot += 1 %o A302347 freq_list.append(freq) %o A302347 return freq_list %Y A302347 Cf. A024786, A024788, A302300. %K A302347 nonn %O A302347 0,5 %A A302347 _Emily Anible_, Apr 05 2018