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-6 of 6 results.

A110037 Signed version of A090678 and congruent to A088567 mod 2.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jul 09 2005

Keywords

Comments

a(n) = (-1)^[n/2]*A090678(n) = A088567(n) mod 2, where A088567(n) equals the number of "non-squashing" partitions of n. a(n) = -A110036(n)/2 for n>=2, where the A110036 gives the partial quotients of the continued fraction expansion of 1 + Sum_{n>=0} 1/x^(2^n).

Crossrefs

Programs

  • PARI
    {a(n)=polcoeff(A=1+x-x^2*(1+x)/(1+x^2)+ sum(k=1,#binary(n),x^(3*2^(k-1))/prod(j=0,k,1+x^(2^j)+x*O(x^n))),n)}

Formula

G.f.: A(x) = 1+x - x^2*(1+x)/(1+x^2) + Sum_{k>=1} x^(3*2^(k-1))/Product_{j=0..k} (1+x^(2^j)).
Conjecture: a(n) = A073089(n) - A073089(n+1) for n >= 2. - Alan Michael Gómez Calderón, Aug 19 2025

A121241 Change 0 to -1 in A090678.

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, 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 22 2006

Keywords

Formula

a(n) = (-1)^(1+A088567(n)).

A209229 Characteristic function of powers of 2, cf. A000079.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 06 2012

Keywords

Comments

Essentially the same as A036987 (the Fredholm-Rueppel sequence).
Completely multiplicative with a(2^e) = 1, a(p^e) = 0 for odd primes p. - Mitch Harris, Apr 19 2005
Moebius transform of A001511. - R. J. Mathar, Jun 20 2014

Examples

			x + x^2 + x^4 + x^8 + x^16 + x^32 + x^64 + x^128 + x^256 + x^512 + x^1024 + ...
		

References

  • Michel Dekking, Michel Mendes France and Alf van der Poorten, "Folds", The Mathematical Intelligencer, Vol. 4, No. 3 (1982), pp. 130-138 & front cover, and Vol. 4, No. 4 (1982), pp. 173-181 (printed in two parts).
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A001511, A029837 (partial sums), A087003 (moebius transform), A090678, A104977, A154955 (Dirichlet inverse).

Programs

  • C
    int a (unsigned long n) { return n & !(n & (n-1)); } /* Charles R Greathouse IV, Sep 15 2012 */
    
  • Haskell
    a209229 n | n < 2 = n
              | n > 1 = if m > 0 then 0 else a209229 n'
              where (n',m) = divMod n 2
    
  • Maple
    A209229 := proc(n)
        if n <= 0 then
            0 ;
        elif n = 1 then
            1;
        elif type (n,'odd') or A001221(n) > 1 then
            0 ;
        else
            1;
        end if;
    end proc:
    seq(A209229(n),n=0..40) ; # R. J. Mathar, Jan 07 2021
  • Mathematica
    a[n_] := Boole[n == 2^IntegerExponent[n, 2]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 06 2014 *)
    Table[If[IntegerQ[Log[2,n]],1,0],{n,0,100}] (* Harvey P. Dale, Jun 24 2018 *)
  • PARI
    a(n)=n==1<Charles R Greathouse IV, Mar 07 2012
    
  • PARI
    {a(n) = if( n<2 || n%2, n==1, isprimepower(n) > 0)} \\ Michael Somos, Jan 03 2013
    
  • Python
    def A209229(n): return int(not(n&-n)^n) if n else 0 # Chai Wah Wu, Jul 08 2022

Formula

a(A000079(n)) = 1; a(A057716(n)) = 0.
a(n+1) = A036987(n).
a(n) = if n < 2 then n else (if n is even then a(n/2) else 0).
The generating function g(x) satisfies g(x) - g(x^2) = x. - Joerg Arndt, May 11 2010
Dirichlet g.f.: 1/(1 - 2^(-s)). - R. J. Mathar, Mar 07 2012
G.f.: x / (1 - x / (1 + x / (1 + x / (1 - x / (1 + x / (1 - x / ...)))))) = x / (1 + b(1) * x / (1 + b(2) * x / (1 + b(3) * x / ...))) where b(n) = (-1)^ A090678(n+1). - Michael Somos, Jan 03 2013
With a(0) = 0 removed is convolution inverse of A104977. - Michael Somos, Jan 03 2013
From Antti Karttunen, Nov 19 2017: (Start)
a(n) = abs(A154269(n)).
For n > 1, a(n) = A069517(n)/2 = 2 - A201219(n). (End)
a(n) = A048298(n)/n. - R. J. Mathar, Jan 07 2021
a(n) = floor((2^n)/n) - floor((2^n - 1)/n), for n>=1. - Ridouane Oudra, Oct 15 2021

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.)

A104977 Defining sequence for an inverse Fredholm-Rueppel triangle.

Original entry on oeis.org

1, -1, 1, -2, 3, -4, 6, -10, 15, -22, 34, -52, 78, -118, 180, -274, 415, -630, 958, -1454, 2206, -3350, 5088, -7724, 11726, -17806, 27036, -41046, 62320, -94624, 143668, -218130, 331191, -502854, 763486, -1159206, 1760038, -2672286, 4057356, -6160326, 9353294, -14201206, 21561836
Offset: 0

Views

Author

Paul Barry, Mar 30 2005

Keywords

Comments

A104975 is the sequence array for this sequence.
abs(a(n)) is the numbers of compositions of n into parts of the form 2^k-1, see example. [Joerg Arndt, Jan 06 2013]

Examples

			G.f. = 1 - x + x^2 - 2*x^3 + 3*x^4 - 4*x^5 + 6*x^6 - 10*x^7 + 15*x^8 - 22*x^9 + 34*x^10 + ...
From _Joerg Arndt_, Jan 06 2013: (Start)
There are abs(a(8)) = 15 compositions of 8 into parts 2^k-1:
[ 1]  [ 1 1 1 1 1 1 1 1 ]
[ 2]  [ 1 1 1 1 1 3 ]
[ 3]  [ 1 1 1 1 3 1 ]
[ 4]  [ 1 1 1 3 1 1 ]
[ 5]  [ 1 1 3 1 1 1 ]
[ 6]  [ 1 1 3 3 ]
[ 7]  [ 1 3 1 1 1 1 ]
[ 8]  [ 1 3 1 3 ]
[ 9]  [ 1 3 3 1 ]
[10]  [ 1 7 ]
[11]  [ 3 1 1 1 1 1 ]
[12]  [ 3 1 1 3 ]
[13]  [ 3 1 3 1 ]
[14]  [ 3 3 1 1 ]
[15]  [ 7 1 ]
(End)
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    S:= series(x/add(x^(2^k),k=0..ilog2(N+1)),x,N+2):
    [seq](coeff(S, x, j), j = 0 .. N); # Robert Israel, Feb 07 2018
  • Mathematica
    T[n_, n_] = 1; T[n_, m_] := T[n, m] =(1 + (-1)^(n-m))/2 Sum[Binomial[m, k]* T[(n-m)/2, k], {k, 1, (n-m)/2}];
    a[n_] := Sum[T[n, m] (-1)^m, {m, 0, n}];
    Array[a, 50, 0] (* Jean-François Alcover, Jul 21 2018, after Vladimir Kruchinin *)
  • Maxima
    T(n,m):=if n=m then 1 else (1+(-1)^(n-m))/2*sum(binomial(m,k)*T((n-m)/2,k),k,1,(n-m)/2); makelist(sum(T(n,m)*(-1)^(m),m,0,n),n,0,20); /* Vladimir Kruchinin, Mar 18 2015 */
  • PARI
    N = 66;  q = 'q + O('q^N);  L = 2+ceil(log(N)/log(2));
    gf = q / sum(n=0, L, q^(2^n) );
    /* gf = 1 / (1 + sum(n=1, L, q^(2^n-1) ) ); */  /* same */
    v = Vec(gf)
    /* Joerg Arndt, Jan 06 2013 */
    

Formula

G.f.: x / (sum_{k>=0} x^(2^k)). (corrected by Joerg Arndt, Jan 06 2013)
G.f.: 1 / (1 + sum(n>=1, x^(2^n-1) ) ), replace the '+' by '-' to obtain the g.f. for compositions into parts 2^k-1. [Joerg Arndt, Jan 06 2013]
G.f.: 1 - x / (1 + x / (1 + x / (1 - x / (1 + x / (1 - x / ...))))) = 1 + b(1) * x / (1 + b(2) * x / (1 + b(3) * x / ...)) where b(n) = (-1)^ A090678(n+1) [Conjecture]. - Michael Somos, Jan 03 2013
Convolution inverse is A209229 with 0 preprended. - Michael Somos, Jan 03 2013
a(n) = sum(m=0..n, T(n,m)*(-1)^(m)), where T(n,m)=(1+(-1)^(n-m))/2 *sum(k=1..(n-m)/2, binomial(m,k)*T((n-m)/2,k)), T(n,n)=1. - Vladimir Kruchinin, Mar 18 2015

Extensions

Added more terms, Joerg Arndt, Jan 06 2013

A110036 Constant terms of the partial quotients of the continued fraction expansion of 1 + Sum_{n>=0} 1/x^(2^n), where each partial quotient has the form {x + a(n)} after the initial constant term of 1.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jul 08 2005

Keywords

Comments

Suggested by Ralf Stephan.
For n>1, |a(n)| = 2*A090678(n) where A090678(n) = A088567(n) mod 2 and A088567(n) = number of "non-squashing" partitions of n into distinct parts.

Examples

			1 + 1/x + 1/x^2 + 1/x^4 + 1/x^8 + 1/x^16 + ... =
[1; x - 1, x + 2, x, x, x - 2, x, x + 2, x, x - 2, ...].
		

Crossrefs

Programs

  • PARI
    contfrac(1+sum(n=0,10,1/x^(2^n)))
    
  • PARI
    a(n)=polcoeff((1-x+3*x^2+x^3)/(1+x^2)- 2*sum(k=1,#binary(n),x^(3*2^(k-1))/prod(j=0,k,1+x^(2^j)+x*O(x^n))),n)
    
  • PARI
    a(n)=subst(contfrac(1+sum(k=0,#binary(n+1),1/x^(2^k)))[n+1],x,0)

Formula

G.f. (1-x+3*x^2+x^3)/(1+x^2) - 2*Sum_{k>=1} x^(3*2^(k-1))/Product_{j=0..k} (1+x^(2^j)).
Showing 1-6 of 6 results.