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.

A123640 a(n) = A065120(n) modulo 2.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Oct 04 2006

Keywords

Comments

Previous name was: Consider the 2^n compositions of n per row and mark only those ending in an odd part.

Examples

			A065120 begins 0, 1, 2, 1, 3, 2, 1, 1, 4, 3, 2, 2, 1, 1, 1, 1, ...
Therefore this sequence begins 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, ...
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v = vector(nn)); v[1] = 1; for (i=2, nn, v[i] = mg(i-1)*v[(i+1)\2];); for (i=1, nn, print1(valuation(v[i], 2) % 2, ", "););} \\ Michel Marcus, Feb 09 2014

Extensions

More terms from Nathaniel Johnston, Apr 30 2011
New name using given formula, Joerg Arndt, Jan 24 2024

A123639 Consider the 2^n compositions of n and count only those ending in an even part.

Original entry on oeis.org

0, 1, 2, 6, 18, 61, 224, 890, 3784, 17113, 81950, 414230, 2204110, 12314109, 72049548, 440379770, 2805266692, 18584809833, 127812870474, 910990458022, 6719535098378, 51223251471453, 403044829472760, 3269538955148698, 27314067026782976, 234749040898160153
Offset: 1

Views

Author

Alford Arnold, Oct 04 2006

Keywords

Comments

Compositions ending in an even part yield sequence 0 1 2 6 18 ... (this sequence). and A123638(n)+a(n) = A047970(n). Ending parity of compositions can be detected using mod(A065120,2)

Examples

			4
31 32 33
211 221 222
1111
Consider the above multisets- permute and note the parity of the ending part of each of the 14 compositions.
4
31 13 32 23 33
211 121 112 221 212 122 222
1111
4 is even
31 13 23 and 33 are odd
32 is even
etc
there are 1+1+4+0 even compositions therefore a(4)=6.
		

Crossrefs

Programs

  • Maple
    g:= proc(b,t,l,m) option remember; if t=0 then b*(1-l) else add (g(b, t-1, irem(k, 2), m), k=1..m-1) +g(1, t-1, irem(m, 2), m) fi end: a:= n-> add (g(0, k, 0, n+1-k), k=1..n): seq (a(n), n=1..30); # Alois P. Heinz, Nov 06 2009
  • Mathematica
    g[b_, t_, l_, m_] := g[b, t, l, m] = If[ t == 0 , b*(1-l), Sum[g[b, t-1, Mod[k, 2], m], {k, 1, m-1}] + g[1, t-1, Mod[m, 2], m]]; a[n_] := Sum[g[0, k, 0, n+1-k], {k, 1, n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 04 2013, translated from Alois P. Heinz's Maple program *)

Extensions

More terms from Alois P. Heinz, Nov 06 2009

A123638 Consider the 2^n compositions of n and count only those ending in an odd part with row sum A001045.

Original entry on oeis.org

1, 1, 3, 8, 25, 83, 299, 1158, 4813, 21373, 100955, 504916, 2662761, 14754311, 85643459, 519493938, 3285790317, 21628225041, 147887079907, 1048634836288, 7698589399833, 58432476430139, 457901993065915, 3700291495531166
Offset: 1

Views

Author

Alford Arnold, Oct 04 2006

Keywords

Comments

Compositions ending in an even part yield sequence 0 1 2 6 18 ... A123639. and a(n)+A123639(n) = A047970(n). Ending parity of compositions can be detected using mod(A065120,2)

Examples

			4
31 32 33
211 221 222
1111
Consider the above multisets: permute and note the parity of the ending part of each of the 14 compositions.
4
31 13 32 23 33
211 121 112 221 212 122 222
1111
4 is even
31 13 23 and 33 are odd
32 is even
etc
there are 0 + 4 + 3 + 1 = 8 odd compositions therefore a(4)=8.
		

Crossrefs

Programs

  • Maple
    g:= proc(b,t,l,m) option remember; if t=0 then b*l else add (g(b, t-1, irem(k, 2), m), k=1..m-1) +g(1, t-1, irem(m, 2), m) fi end: a:= n-> add (g(0, k, 0, n+1-k), k=1..n): seq (a(n), n=1..30);
  • Mathematica
    g[b_, t_, l_, m_] := g[b, t, l, m] = If[t == 0 , b*l , Sum[g[b, t-1, Mod[k, 2], m], {k, 1, m-1}] + g[1, t-1, Mod[m, 2], m]]; a[n_] := Sum[g[0, k, 0, n+1-k], {k, 1, n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 04 2013, translated from Alois P. Heinz's Maple program *)

Extensions

Offset corrected, Maple program and more terms added by Alois P. Heinz, Nov 06 2009

A134317 Triangle, A128174 * A134309 as infinite lower triangular matrices.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 1, 0, 4, 1, 0, 2, 0, 8, 0, 1, 0, 4, 0, 16, 1, 0, 2, 0, 8, 0, 32, 0, 1, 0, 4, 0, 16, 0, 64, 1, 0, 2, 0, 8, 0, 32, 0, 128, 0, 1, 0, 4, 0, 16, 0, 64, 0, 256
Offset: 1

Views

Author

Gary W. Adamson, Oct 19 2007

Keywords

Comments

Is this the same as A123641? - R. J. Mathar, Mar 28 2012

Examples

			First few rows of the triangle are:
1;
0, 1;
1, 0, 2;
0, 1, 0, 4;
1, 0, 2, 0, 8;
0, 1, 0, 4, 0, 16;
1, 0, 2, 0, 8, 0, 32;
0, 1, 0, 4, 0, 16, 0, 64;
...
		

Crossrefs

Cf. A128174, A134309, A001045 (row sums).

Formula

T(n,k) = 0 if n+k odd, else T(n,1) =1, T(n,k)=2^(k-2) if k>=2. - R. J. Mathar, Sep 01 2024
Showing 1-4 of 4 results.