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.

Showing 1-4 of 4 results.

A121238 a(n) = (-1)^(1+n+A088585(n)).

Original entry on oeis.org

1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 21 2006

Keywords

Comments

Apparently the partial products of this sequence form the Hankel transform of A023359: 1, 1*1 = 1, 1*1*1 = 1, 1*1*1*-1 = -1, 1*1*1*-1*1 = -1, ... and 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, ... is the Hankel transform of A023359.

Crossrefs

A088567 Number of "non-squashing" partitions of n into distinct parts.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 13, 14, 18, 19, 24, 25, 31, 32, 40, 41, 50, 51, 63, 64, 77, 78, 95, 96, 114, 115, 138, 139, 163, 164, 194, 195, 226, 227, 266, 267, 307, 308, 357, 358, 408, 409, 471, 472, 535, 536, 612, 613, 690, 691, 785, 786, 881, 882, 995, 996, 1110, 1111
Offset: 0

Views

Author

N. J. A. Sloane, Nov 30 2003

Keywords

Comments

"Non-squashing" refers to the property that p_1 + p_2 + ... + p_i <= p_{i+1} for all 1 <= i < k: if the parts are stacked in increasing size, at no point does the sum of the parts above a certain part exceed the size of that part.

Examples

			The partitions of n = 1 through 6 are: 1; 2; 3=1+2; 4=1+3; 5=1+4=2+3; 6=1+5=2+4=1+2+3.
		

Crossrefs

Cf. A000123, A088575, A088585, A088931, A089054. A090678 gives sequence mod 2.
Cf. A187821 (non-squashing partitions of n into odd parts).

Programs

  • Haskell
    import Data.List (transpose)
    a088567 n = a088567_list !! n
    a088567_list = 1 : tail xs where
       xs = 0 : 1 : zipWith (+) xs (tail $ concat $ transpose [xs, tail xs])
    -- Reinhard Zumkeller, Nov 15 2012
  • Maple
    f := proc(n) option remember; local t1,i; if n <= 2 then RETURN(1); fi; t1 := add(f(i),i=0..floor(n/2)); if n mod 2 = 0 then RETURN(t1-1); fi; t1; end;
    t1 := 1 + x/(1-x); t2 := add( x^(3*2^(k-1))/ mul( (1-x^(2^j)),j=0..k), k=1..10); series(t1+t2, x, 256); # increase 10 to get more terms
  • Mathematica
    max = 63; f = 1 + x/(1-x) + Sum[x^(3*2^(k-1))/Product[(1-x^(2^j)), {j, 0, k}], {k, 1, Log[2, max]}]; s = Series[f, {x, 0, max}] // Normal; a[n_] := Coefficient[s, x, n]; Table[a[n], {n, 0, max}] (* Jean-François Alcover, May 06 2014 *)

Formula

a(0)=1, a(1)=1; and for m >= 1, a(2m) = a(2m-1) + a(m) - 1, a(2m+1) = a(2m) + 1.
Or, a(0)=1, a(1)=1; and for m >= 1, a(2m) = a(0)+a(1)+...+a(m)-1; a(2m+1) = a(0)+a(1)+...+a(m).
G.f.: 1 + x/(1-x) + Sum_{k>=1} x^(3*2^(k-1))/Product_{j=0..k} (1-x^(2^j)).
G.f.: Product_{n>=0} 1/(1-x^(2^n)) - Sum_{n >= 1} ( x^(2^n)/ ((1+x^(2^(n-1)))*Product_{j=0..n-1} (1-x^(2^j)) ) ). (The two terms correspond to A000123 and A088931 respectively.)

A088575 Bisection of A088567.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 13, 18, 24, 31, 40, 50, 63, 77, 95, 114, 138, 163, 194, 226, 266, 307, 357, 408, 471, 535, 612, 690, 785, 881, 995, 1110, 1248, 1387, 1550, 1714, 1908, 2103, 2329, 2556, 2822, 3089, 3396, 3704, 4061, 4419, 4827, 5236, 5707, 6179, 6714, 7250, 7862
Offset: 0

Views

Author

N. J. A. Sloane, Nov 30 2003

Keywords

Comments

(1 + x^2 + x^3 + x^4 + x^5 + ...) * (1 + x + x^2 + 2x^3 + 3x^4 + ...) = (1 + x + 2x^2 + 4x^3 + 6x^4 + ...). - Gary W. Adamson, Jul 27 2010

Crossrefs

Formula

a(n) = A088585(n) - 1 for n >= 1.
a(n) = a(n-1) + a(floor(n/2)) + (1-(-1)^n)/2, n > 1. - Vladeta Jovovic, Dec 02 2003

A242634 G.f. A(x) satisfies A(x) = A(x^2) / (1 - x) + x / (1 - x^2).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 9, 10, 13, 14, 18, 19, 24, 25, 31, 32, 40, 41, 50, 51, 63, 64, 77, 78, 95, 96, 114, 115, 138, 139, 163, 164, 194, 195, 226, 227, 266, 267, 307, 308, 357, 358, 408, 409, 471, 472, 535, 536, 612, 613, 690, 691, 785, 786, 881, 882
Offset: 0

Views

Author

Michael Somos, May 19 2014

Keywords

Examples

			G.f. = x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 7*x^9 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, Module[{A = 0}, Do[A = (x + (1 + x) (A /. x -> x^2)) / (1 - x^2), {IntegerLength[ n, 2]}]; SeriesCoefficient[ A, {x, 0, n}]]];
  • PARI
    {a(n) = my(A = O(x)); if( n<0, 0, for(k=1, #binary(n), A = (x + (1 + x) * subst(A, x, x^2)) / (1 - x^2)); polcoeff(A, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=0, #binary(n\3), x^(2^k*3 \ 2) / prod(j=0, k, 1 - x^2^j), x * O(x^n)), n))};

Formula

G.f.: x / (1 - x) + Sum_{k>0} x^(3*2^(k-1)) / Product_{j=0..k} (1 - x^(2^j)).
a(n) = a(n-2) + a(floor(n/2)) unless n=1.
a(n) = A088585(n) - A088585(n-1) if n>=1.
a(n) = A088567(n) if n>0.
a(2*n + 1) = a(2*n) + 1 = A088585(n) if n>=0.
Showing 1-4 of 4 results.