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 A179080 #54 Nov 18 2024 16:14:24 %S A179080 1,1,1,2,1,3,2,4,2,6,4,7,5,9,8,12,10,14,15,17,19,22,26,26,32,32,42,40, %T A179080 52,48,66,59,79,73,98,89,118,108,143,133,170,160,204,194,241,236,286, %U A179080 283,336,339,396,407,464,483,544,575,634,681,740,803,862,944,1001,1110,1162,1296,1348,1512,1561,1760,1805 %N A179080 Number of partitions of n into distinct parts where all differences between consecutive parts are odd. %H A179080 Alois P. Heinz, <a href="/A179080/b179080.txt">Table of n, a(n) for n = 0..10000</a> %H A179080 Atul Dixit and Gaurav Kumar, <a href="https://arxiv.org/abs/2411.06412">The Rogers-Ramanujan dissection of a theta function</a>, arXiv:2411.06412 [math.NT], 2024. See pp. 16, 23. %F A179080 G.f.: sum(n>=0, x^(n*(n+1)/2) / prod(k=1..n+1, 1-x^(2*k) ) ). - _Joerg Arndt_, Jan 29 2011 %F A179080 a(n) = A179049(n) + A218355(n). - _Joerg Arndt_, Oct 27 2012 %e A179080 From _Joerg Arndt_, Oct 27 2012: (Start) %e A179080 The a(18) = 15 such partitions of 18 are: %e A179080 [ 1] 1 2 3 12 %e A179080 [ 2] 1 2 5 10 %e A179080 [ 3] 1 2 7 8 %e A179080 [ 4] 1 2 15 %e A179080 [ 5] 1 4 5 8 %e A179080 [ 6] 1 4 13 %e A179080 [ 7] 1 6 11 %e A179080 [ 8] 1 8 9 %e A179080 [ 9] 2 3 4 9 %e A179080 [10] 2 3 6 7 %e A179080 [11] 3 4 5 6 %e A179080 [12] 3 4 11 %e A179080 [13] 3 6 9 %e A179080 [14] 5 6 7 %e A179080 [15] 18 %e A179080 (End) %p A179080 b:= proc(n, i) option remember; `if`(n=0, 1, %p A179080 `if`(i>n, 0, b(n, i+2)+b(n-i, i+1))) %p A179080 end: %p A179080 a:= n-> `if`(n=0, 1, b(n, 1)+b(n, 2)): %p A179080 seq(a(n), n=0..100); # _Alois P. Heinz_, Nov 08 2012; revised Feb 24 2020 %t A179080 b[n_, i_, t_] := b[n, i, t] = If[n==0, 1, If[i<1, 0, b[n, i-1, t] + If[i <= n && Mod[i, 2] != t, b[n-i, i-1, Mod[i, 2]], 0]]]; a[n_] := If[n==0, 1, Sum[b[n-i, i-1, Mod[i, 2]], {i, 1, n}]]; Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Mar 24 2015, after _Alois P. Heinz_ *) %t A179080 Join[{1},Table[Length[Select[IntegerPartitions[n],Max[Length/@Split[#]]==1 && AllTrue[ Differences[#],OddQ]&]],{n,70}]] (* _Harvey P. Dale_, Jun 25 2022 *) %o A179080 (Sage) %o A179080 def A179080(n): %o A179080 odd_diffs = lambda x: all(abs(d) % 2 == 1 for d in differences(x)) %o A179080 satisfies = lambda p: not p or odd_diffs(p) %o A179080 def count(pred, iter): return sum(1 for item in iter if pred(item)) %o A179080 return count(satisfies, Partitions(n, max_slope=-1)) %o A179080 print([A179080(n) for n in range(0, 20)]) # show first terms %o A179080 (Sage) # Alternative after _Alois P. Heinz_: %o A179080 def A179080(n): %o A179080 @cached_function %o A179080 def h(n, k): %o A179080 if n == 0: return 1 %o A179080 if k > n: return 0 %o A179080 return h(n, k+2) + h(n-k, k+1) %o A179080 return h(n, 1) + h(n, 2) if n > 0 else 1 %o A179080 print([A179080(n) for n in range(71)]) # _Peter Luschny_, Feb 25 2020 %o A179080 (PARI) N=66; x='x+O('x^N); gf = sum(n=0,N, x^(n*(n+1)/2) / prod(k=1,n+1, 1-x^(2*k) ) ); Vec( gf ) /* _Joerg Arndt_, Jan 29 2011 */ %Y A179080 Cf. A179049 (odd differences and odd minimal part). %Y A179080 Cf. A189357 (even differences, distinct parts), A096441 (even differences). %Y A179080 Cf. A000009 (partitions of 2*n with even differences and even minimal part). %K A179080 nonn %O A179080 0,4 %A A179080 _Joerg Arndt_, Jan 04 2011