A006140 Erroneous version of A003406.
1, 1, -2, 2, -2, 1, 0, 1, -2, 0, 2, 0, -1, -2, 2, 1, 0, -2, 2, -2
Offset: 0
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.
G.f. A(x) = 1 + x + 5*x^2 + 55*x^3 + 1073*x^4 + 32671*x^5 + 1431665*x^6 + ...
max = 14; se = Series[1 + Sum[ Product[1 - E^(-(2*k - 1)*t), {k, 1, n}], {n, 1, max}], {t, 0, max}]; CoefficientList[se, t]*Range[0, max]! (* Jean-François Alcover, Mar 06 2013 *)
{a(n)=n!*polcoeff(sum(m=0, n, prod(k=1, m, 1-exp(-(2*k-1)*x+x*O(x^n)))), n)} \\ Paul D. Hanna, Aug 01 2012
{a(n)=n!*polcoeff(sum(m=0, n, prod(k=1, m, exp(k*x+x*O(x^n))-1)), n)} \\ Paul D. Hanna, Aug 01 2012
a[n_] := Count[IntegerPartitions[n], q_ /; OddQ[First[q] - Length[q]] && Length[q] == Length[Union[q]]]; Array[a, 60] (* Jean-François Alcover, Oct 06 2021 *)
a[n_] := Count[IntegerPartitions[n], q_ /; EvenQ[First[q] - Length[q]] && Length[q] == Length[Union[q]]]; Array[a, 60] (* Jean-François Alcover, Oct 06 2021 *)
M:=201; add( mul( (1+q^j),j=1..M) - mul( (1+q^j),j=1..n), n=0..M); # second Maple program: b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`( n=0, 1, b(n,i-1)+`if`(i>n, 0, b(n-i, min(n-i,i-1))))) end: a:= n-> add(j*b(n-j, min(n-j,j-1)), j=1..n): seq(a(n), n=1..80); # Alois P. Heinz, Feb 03 2016
m = 46; f[q_] := Sum[ Product[ (1+q^j), {j, 1, m}] - Product[ (1+q^j), {j, 1, n}], {n, 0, m}]; CoefficientList[ f[q], q][[2 ;; m+1]] (* Jean-François Alcover, Apr 13 2012, after Maple *)
N=66; x='x+O('x^N); S=prod(k=1,N, 1+x^k); gf=sum(n=0,N, S-prod(k=1,n, 1+x^k)); /* alternative: Arndt's g.f.: */ /* gf=sum(k=0,N, (k+1)*x^(k+1) * prod(j=1,k, 1+x^j) ); */ Vec(gf) /* Joerg Arndt, Sep 17 2012 */
G.f. = x + x^2 + x^3 - x^7 - x^8 - x^10 - x^11 - x^13 + x^15 - x^16 + ...
P:=n->mul((1-q^(2*i+1)),i=0..n-1): t5:=add((-1)^(n+1)*q^(n^2)/P(n),n=1..40): t6:=series(t5,q,40); # Based on Patkowski, 2010, Eq. 3.1. - N. J. A. Sloane, Jun 29 2011
a[ n_] := SeriesCoefficient[ 1 - QHypergeometricPFQ[ {x^2}, {x}, x^2, x], {x, 0, n}]; (* Michael Somos, Feb 02 2015 *)
{a(n) = local(A, p, e, x, y); if( n<0, 0, n = 24*n-1; A = factor(n); prod(k=1, matsize(A)[1], if( p=A[k, 1], e=A[k, 2]; if( p<5, 0, if( p%24>1 && p%24<23, if( e%2, 0, if( p%24==7 || p%24==17, (-1)^(e/2), 1)), x=y=0; if( p%24==1, forstep(i=1, sqrtint(p), 2, if( issquare( (i^2 + p) / 2, &y), x=i; break)), for(i=1, sqrtint(p\2), if( issquare( 2*i^2 + p,&x), y=i; break))); (e+1) * (-1)^( (x + if((x-y)%6, y, -y)) / 6*e))))) / -2)}; /* Michael Somos, Aug 17 2006 */
{a(n) = local(A); if( n<1, 0, A = -1 + x * O(x^n); polcoeff( sum(k=1, sqrtint(n), A *= 1 / (1 - x^(1 - 2*k)) * (1 + x * O(x^(n - k^2)))), n))}; /* Michael Somos, Sep 16 2006 */
First few rows are: 1; 0, 1; 0, -1; 0, 1, 1; 0, -1, -1; 0, 1, 0; 0, -1, 0, 1; 0, 1, 1, -1; 0, -1, -1, 0; 0, 1, 0, -1; 0, -1, 0, 2, 1.
G.f. = x - x^2 + x^5 - x^7 + x^12 - x^15 + x^22 - x^26 + x^35 - x^40 + x^51 - ... G.f. = q^25 - q^49 + q^121 - q^169 + q^289 - q^361 + q^529 - q^625 + .. From _Peter Bala_, Feb 13 2020: (Start) G.f.s for the tails of A(x): Sum_{n >= 1} (-1)^(n+1) * x^(2*n+3)*Product_{k = 2..n} 1 + x^k = x^5 - x^7 + x^12 - x^15 + x^22 - .... Sum_{n >= 2} (-1)^n * x^(3*n+6)*Product_{k = 3..n} 1 + x^k = x^12 - x^15 + x^22 - x^26 + x^35 - .... Sum_{n >= 3} (-1)^(n+1) * x^(4*n+10)*Product_{k = 4..n} 1 + x^k = x^22 - x^26 + x^35 - x^40 + x^51 - .... (End)
N:= 1000: # to get a(0) to a(N) V:= Array(0..N): for k from 1 to floor((sqrt(1+24*N)-1)/6) do V[(3*k^2-k)/2]:= 1 od: for k from 1 to floor((sqrt(1+24*N)+1)/6) do V[(3*k^2+k)/2]:= -1 od: convert(V,list); # Robert Israel, Nov 24 2015
a[ n_] := Which[ n < 1, 0, SquaresR[ 1, 24 n + 1] == 2, -(-1)^Quotient[ Sqrt[24 n + 1], 3], True, 0]; (* Michael Somos, Jul 12 2015 *)
{a(n) = if( n<1, 0, if( issquare( 24*n + 1, &n), - kronecker( -12, n)))};
G.f. = x^3 + x^4 + 3*x^5 + 4*x^6 + 7*x^7 + 9*x^8 + 14*x^9 + 19*x^10 + ... - _Michael Somos_, Oct 21 2018
max = 48; f[n_, x_] := Product[ 1/(1-x^(2k+1)), {k, 0, n}]; g[x_] = Sum[ f[max/2, x] - f[n, x], {n, 0, max/2}]; CoefficientList[ Series[ g[x], {x, 0, max}], x] (* Jean-François Alcover, Nov 17 2011, after g.f. *) a[ n_] := With[{A = 1 / QPochhammer[ q, q^2]}, SeriesCoefficient[ Sum[A - 1 / QPochhammer[ q, q^2, k], {k, 1, n/2}], {q, 0, n}]]; (* Michael Somos, Oct 21 2018 *)
/* set maximum */ MM = 50; /* G.f. for partitions with odd parts: */ (Q(n, q) = prod(k=0, n, 1/(1 - q^(2*k+1)), 1 + q*O(q^MM))); /* G.f. for A000009: */ Sq = Q(MM/2, q); /* G.f. for A005896: */ Sq0 = sum(n=0, MM/2, Sq-Q(n, q)); for(n=0, 48, print1(polcoeff(Sq0, n)","));
Triangle begins: 1; -1; 1, 1; -1, -1; 1, 0; -1, 0, 1; 1, 1, -1; -1, -1, 0; 1, 0, -1; -1, 0, 2, 1; 1, 1, -1, -1; -1, -1, 1, 0; 1, 0, -2, -1; -1, 0, 2, 1; 1, 1, -2, 0, 1; -1, -1, 2, 1, -1; 1, 0, -2, -1, 0; -1, 0, 3, 1, -1; 1, 1, -3, -2, 1; -1, -1, 2, 1, -1; 1, 0, -3, -1, 2, 1; -1, 0, 4, 2, -1, -1; 1, 1, -3, -1, 2, 0; -1, -1, 3, 1, -3, -1; 1, 0, -4, -2, 2, 1; -1, 0, 4, 2, -3, -1; 1, 1, -4, -2, 3, 1; -1, -1, 4, 2, -3, 0, 1; 1, 0, -4, -2, 4, 2, -1; -1, 0, 5, 2, -4, -2, 0; 1, 1, -5, -2, 5, 1, -1; -1, -1, 4, 2, -5, -2, 1; 1, 0, -5, -2, 5, 2, -1; -1, 0, 6, 3, -6, -3, 1; 1, 1, -5, -3, 6, 2, -1; -1, -1, 5, 2, -7, -2, 3, 1; ...
{T(n, k)=if(n
/* Using generating formula for columns */ {tr(n) = floor((sqrt(1+8*n)-1)/2)} \\ number of terms in row n {T(n,k) = polcoeff( x^(k*(k+1)/2) / prod(j=1,k, 1 + x^j +x*O(x^n)), n)} {for(n=1,50, for(k=1, tr(n), print1(T(n,k),", "));print(""))} \\ Paul D. Hanna, Jan 28 2024
Comments