cp's OEIS Frontend

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.

A054843 Number of sequences of consecutive nonnegative integers (including sequences of length 1) that sum to n.

This page as a plain text file.
%I A054843 #32 Aug 05 2023 06:25:03
%S A054843 1,2,1,3,1,2,3,2,1,3,3,2,2,2,2,5,1,2,3,2,2,5,2,2,2,3,2,4,3,2,4,2,1,4,
%T A054843 2,4,4,2,2,4,2,2,4,2,2,7,2,2,2,3,3,4,2,2,4,5,2,4,2,2,4,2,2,6,1,4,5,2,
%U A054843 2,4,4,2,3,2,2,6,2,4,5,2,2,5,2,2,4,4,2,4,2,2,6,5,2,4,2,4,2,2,3,6,3,2,4,2,2,9
%N A054843 Number of sequences of consecutive nonnegative integers (including sequences of length 1) that sum to n.
%C A054843 Number of nonnegative integer solutions (x, y) to the equation (2*x + y)*(1 + y)/2 = n. - _Gionata Neri_, Nov 15 2015
%H A054843 Robert Israel, <a href="/A054843/b054843.txt">Table of n, a(n) for n = 0..10000</a>
%F A054843 From _Vladeta Jovovic_, Aug 10 2004: (Start)
%F A054843 G.f.: Sum_{k >= 1} x^(k*(k-1)/2)/(1-x^k).
%F A054843 a(n) = A001227(n) + A010054(n), for n>0. (End)
%F A054843 a(2^k) = 1 for k > 0. - _Daniel Castle_, Feb 09 2021
%e A054843 a(0) = 1 because 0 = 0;
%e A054843 a(1) = 2 because 1 = 0+1 or 1;
%e A054843 a(15) = 5 because 15 = 0+1+2+3+4+5 or 1+2+3+4+5 or 4+5+6 or 7+8 or 15.
%p A054843 N:= 1000:
%p A054843 G:= add(x^(k*(k-1)/2)/(1-x^k),k=1..floor((1+sqrt(1+8*N))/2)):
%p A054843 S:= series(G,x,N+1):
%p A054843 seq(coeff(S,x,j),j=0..N); # _Robert Israel_, Nov 15 2015
%o A054843 (PARI) vector(100, n, local(A); if( n<0, 0, A = x*O(x^n); polcoeff( eta(x^2+A)^2/eta(x+A), n)) + numdiv(n>>valuation(n, 2))) \\ _Altug Alkan_, Nov 15 2015
%Y A054843 Cf. A001227, A010054, A054844.
%K A054843 easy,nonn
%O A054843 0,2
%A A054843 _Henry Bottomley_, Apr 13 2000
%E A054843 a(0) = 1 added by _N. J. A. Sloane_, Dec 02 2020