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 A331165 #23 Jan 06 2021 08:28:15 %S A331165 1,0,2,5,0,7,18,3,25,55,13,69,146,45,180,4,235,532,147,637,10,802, %T A331165 1804,549,2124,166,2602,5612,1894,6459,855,7697,16046,5903,18213,3330, %U A331165 21307,42944,16929,48114,10776,55359,2185,65446,140621,51487,157045,32291,179564 %N A331165 a(n) = a(n-1) + p(n) if p(n) > a(n-1), otherwise a(n) = a(n-1) - p(n), where p is the partition function A000041 (assuming a(n) = 0 for n < 0). %H A331165 Alois P. Heinz, <a href="/A331165/b331165.txt">Table of n, a(n) for n = 0..10000</a> %p A331165 a:= proc(n) option remember; `if`(n<0, 0, ((s, t)-> s+ %p A331165 `if`(s<t, t, -t))(a(n-1), combinat[numbpart](n))) %p A331165 end: %p A331165 seq(a(n), n=0..70); %t A331165 a[n_] := a[n] = If[n<0, 0, With[{a1 = a[n-1], p = PartitionsP[n]}, If[p>a1, a1 + p, a1 - p]]]; %t A331165 a /@ Range[0, 70] (* _Jean-François Alcover_, Jan 05 2021 *) %o A331165 (PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, my(p = numbpart(n-1)); va[n] = va[n-1] - p; if (va[n] < 0, va[n] += 2*p);); va;} \\ _Michel Marcus_, Jan 06 2021 %Y A331165 Cf. A000041, A008344, A008345, A008348, A076042, A111466, A126646, A327442, A330725. %K A331165 nonn %O A331165 0,3 %A A331165 _Alois P. Heinz_, Jan 11 2020