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 A240871 #20 Jan 14 2025 08:37:24 %S A240871 0,0,0,0,0,1,0,2,1,1,2,2,0,2,2,1,1,2,1,2,1,1,2,2,0,2,2,1,1,2,1,2,1,1, %T A240871 2,2,0,2,2,1,1,2,1,2,1,1,2,2,0,2,2,1,1,2,1,2,1,1,2,2,0,2,2,1,1,2,1,2, %U A240871 1,1,2,2,0,2,2,1,1,2,1,2,1,1,2,2,0,2,2,1,1,2,1,2,1,1,2,2,0,2,2,1,1,2,1,2,1,1,2,2,0 %N A240871 Number of partitions p of n into distinct parts such that max(p) = 3 + min(p). %H A240871 Antti Karttunen, <a href="/A240871/b240871.txt">Table of n, a(n) for n = 0..20000</a> %H A240871 <a href="/index/Par#part">Index entries for sequences related to partitions</a> %H A240871 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,0,1,1,1). %F A240871 From _Alois P. Heinz_, Jan 13 2025: (Start) %F A240871 G.f.: -x^5*(x^7+2*x^6+3*x^5+3*x^4+3*x^3+3*x^2+x+1)/((x-1)*(x+1)*(x^2+1)*(x^2+x+1)). %F A240871 a(n) = a(n-12) for n>=19. (End) %e A240871 a(7) counts these 2 partitions: 5+2, 4+2+1. %t A240871 z = 40; f[n_] := f[n] = Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 &]; Table[Count[f[n], p_ /; Max[p] == 2 + Min[p]], {n, 0, z}] (* A171182 *) %t A240871 Table[Count[f[n], p_ /; Max[p] == 3 + Min[p]], {n, 0, z}] (* A240871 *) %t A240871 Table[Count[f[n], p_ /; Max[p] == 4 + Min[p]], {n, 0, z}] (* A240872 *) %t A240871 Table[Count[f[n], p_ /; Max[p] == 5 + Min[p]], {n, 0, z}] (* A240873 *) %o A240871 (PARI) %o A240871 A240871aux(n, minp=0, maxp=0) = if(0==n, (minp>0 && (maxp==3+minp)), sum(i=1+maxp, min(n,3+minp), A240871aux(n-i, if(!minp,i,minp), i))); %o A240871 A240871(n) = sum(i=1,floor(n/2),A240871aux(n-i,i,i)); \\ _Antti Karttunen_, Jan 13 2025 %Y A240871 Cf. A128508, A171182, A240872, A240873. %K A240871 nonn,easy %O A240871 0,8 %A A240871 _Clark Kimberling_, Apr 15 2014 %E A240871 More terms from _Antti Karttunen_, Jan 13 2025