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-10 of 915 results. Next

A056823 Number of compositions minus number of partitions: A011782(n) - A000041(n).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 21, 49, 106, 226, 470, 968, 1971, 3995, 8057, 16208, 32537, 65239, 130687, 261654, 523661, 1047784, 2096150, 4193049, 8387033, 16775258, 33551996, 67105854, 134214010, 268430891, 536865308, 1073734982, 2147475299, 4294957153, 8589922282
Offset: 0

Views

Author

Alford Arnold, Aug 29 2000

Keywords

Comments

Previous name was: Counts members of A056808 by number of factors.
A056808 relates to least prime signatures (cf. A025487)
a(n) is also the number of compositions of n that are not partitions of n. - Omar E. Pol, Jan 31 2009, Oct 14 2013
a(n) is the number of compositions of n into positive parts containing pattern [1,2]. - Bob Selcoe, Jul 08 2014

Examples

			A011782 begins     1 1 2 4 8 16 32 64 128 256 ...;
A000041 begins     1 1 2 3 5  7 11 15  22  30 ...;
so sequence begins 0 0 0 1 3  9 21 49 106 226 ... .
For n = 3 the factorizations are 8=2*2*2, 12=2*2*3, 18=2*3*3 and 30=2*3*5.
a(5) = 9: {[1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,2,2], [1,3,1], [1,4], [2,1,2], [2,3]}. - _Bob Selcoe_, Jul 08 2014
		

Crossrefs

The version for patterns is A002051.
(1,2)-avoiding compositions are just partitions A000041.
The (1,1)-matching version is A261982.
The version for prime indices is A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns matched by compositions are counted by A335456.

Programs

  • Maple
    a:= n-> ceil(2^(n-1))-combinat[numbpart](n):
    seq(a(n), n=0..37);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!GreaterEqual@@#&]],{n,0,10}] (* Gus Wiseman, Jun 24 2020 *)
    a[n_] := If[n == 0, 0, 2^(n-1) - PartitionsP[n]];
    a /@ Range[0, 37] (* Jean-François Alcover, May 23 2021 *)

Formula

a(n) = A011782(n) - A000041(n).
a(n) = 2*a(n-1) + A117989(n-1). - Bob Selcoe, Apr 11 2014
G.f.: (1 - x) / (1 - 2*x) - Product_{k>=1} 1 / (1 - x^k). - Ilya Gutkovskiy, Jan 30 2020

Extensions

More terms from James Sellers, Aug 31 2000
New name from Joerg Arndt, Sep 02 2013

A158780 a(2n) = A131577(n), a(2n+1) = A011782(n).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64, 64, 128, 128, 256, 256, 512, 512, 1024, 1024, 2048, 2048, 4096, 4096, 8192, 8192, 16384, 16384, 32768, 32768, 65536, 65536, 131072, 131072, 262144, 262144, 524288, 524288, 1048576, 1048576, 2097152, 2097152, 4194304
Offset: 0

Views

Author

Paul Curtz, Mar 26 2009

Keywords

Comments

This construction combines the 2 basic sequences which equal their first differences in the same way as A138635 does for sequences which equal their 3rd differences and A137171 does for sequences which equal their fourth differences.
Essentially the same as A016116, A060546, and A131572. - R. J. Mathar, Apr 08 2009
Dropping a(0), this is the inverse binomial transform of A024537. - R. J. Mathar, Apr 08 2009

Crossrefs

The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Magma
    [0,1] cat [2^Floor((n-2)/2): n in [2..50]]; // G. C. Greubel, Apr 19 2023
    
  • Mathematica
    Table[(2^Floor[n/2] +Boole[n==1] -Boole[n==0])/2, {n,0,50}] (* or *) LinearRecurrence[{0,2}, {0,1,1,1}, 51] (* G. C. Greubel, Apr 19 2023 *)
  • PARI
    a(n)=if(n>3,([0,1; 2,0]^n*[1;1])[1,1]/2,n>0) \\ Charles R Greathouse IV, Oct 18 2022
    
  • SageMath
    def A158780(n): return (2^(n//2) + int(n==1) - int(n==0))/2
    [A158780(n) for n in range(51)] # G. C. Greubel, Apr 19 2023

Formula

a(2n) + a(2n+1) = A000079(n).
G.f.: x*(1+x-x^2)/(1-2*x^2). - R. J. Mathar, Apr 08 2009
a(n) = (1/2)*(2^floor(n/2) + [n=1] - [n=0]). - G. C. Greubel, Apr 19 2023
E.g.f.: (2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x) + 2*x - 2)/4. - Stefano Spezia, May 13 2023

Extensions

Edited by R. J. Mathar, Apr 08 2009

A349452 Dirichlet inverse of A011782, 2^(n-1).

Original entry on oeis.org

1, -2, -4, -4, -16, -16, -64, -104, -240, -448, -1024, -1904, -4096, -7936, -16256, -32272, -65536, -129888, -262144, -522176, -1048064, -2093056, -4194304, -8379520, -16776960, -33538048, -67106880, -134184704, -268435456, -536801024, -1073741824, -2147352224, -4294959104, -8589672448, -17179867136, -34359197184
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = -DivisorSum[n, a[#] * 2^(n/# - 1) &, # < n &]; Array[a, 36] (* Amiram Eldar, Nov 22 2021 *)
  • PARI
    A011782(n) = (2^(n-1));
    memoA349452 = Map();
    A349452(n) = if(1==n,1,my(v); if(mapisdefined(memoA349452,n,&v), v, v = -sumdiv(n,d,if(dA011782(n/d)*A349452(d),0)); mapput(memoA349452,n,v); (v)));

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A011782(n/d) * a(d).
G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} 2^(k-1) * A(x^k). - Ilya Gutkovskiy, Feb 23 2022

A256263 Triangle read by rows: T(j,k) = 2*k-1 if k is a power of 2, otherwise, between positions that are powers of 2 we have the initial terms of A016969, with j>=0, 1<=k<=A011782(j) and T(0,1) = 0.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 5, 11, 17, 15, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 23, 29, 35, 41, 31, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 23, 29, 35, 41, 31, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89, 63, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 23, 29, 35, 41, 31, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

Partial sums give A256264.
First differs from A160552 at a(27).
Appears to be a canonical sequence partially related to the cellular automata of A139250, A147562, A162795, A169707, A255366, A256250. See also A256264 and A256260.

Examples

			Written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
0;
1;
1,3;
1,3,5,7;
1,3,5,7,5,11,17,15;
1,3,5,7,5,11,17,15,5,11,17,23,29,35,41,31;
1,3,5,7,5,11,17,15,5,11,17,23,29,35,41,31,5,11,17,23,29,35,41,47,53,59,65,71,77,83,89,63;
...
Right border gives A000225.
Apart from the initial 0 the row sums give A000302.
Rows converge to A256258.
.
Illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n   a(n)                 Compact diagram
---------------------------------------------------------------------------
0    0     _
1    1    |_|_ _
2    1      |_| |
3    3      |_ _|_ _ _ _
4    1          |_| | | |
5    3          |_ _| | |
6    5          |_ _ _| |
7    7          |_ _ _ _|_ _ _ _ _ _ _ _
8    1                  |_| | | |_ _  | |
9    3                  |_ _| | |_  | | |
10   5                  |_ _ _| | | | | |
11   7                  |_ _ _ _| | | | |
12   5                  | | |_ _ _| | | |
13  11                  | |_ _ _ _ _| | |
14  17                  |_ _ _ _ _ _ _| |
15  15                  |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
16   1                                  |_| | | |_ _  | |_ _ _ _ _ _  | |
17   3                                  |_ _| | |_  | | |_ _ _ _ _  | | |
18   5                                  |_ _ _| | | | | |_ _ _ _  | | | |
19   7                                  |_ _ _ _| | | | |_ _ _  | | | | |
20   5                                  | | |_ _ _| | | |_ _  | | | | | |
21  11                                  | |_ _ _ _ _| | |_  | | | | | | |
22  17                                  |_ _ _ _ _ _ _| | | | | | | | | |
23  15                                  |_ _ _ _ _ _ _ _| | | | | | | | |
24   5                                  | | | | | | |_ _ _| | | | | | | |
25  11                                  | | | | | |_ _ _ _ _| | | | | | |
26  17                                  | | | | |_ _ _ _ _ _ _| | | | | |
27  23                                  | | | |_ _ _ _ _ _ _ _ _| | | | |
28  29                                  | | |_ _ _ _ _ _ _ _ _ _ _| | | |
29  35                                  | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
30  41                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
31  31                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
a(n) is also the number of cells in the n-th region of the diagram.
A256264(n) gives the total number of cells after n-th stage.
		

Crossrefs

Programs

  • Mathematica
    Flatten@Join[{0}, NestList[Join[#, Range[Length[#] - 1]*6 - 1, {2 #[[-1]] + 1}] &, {1}, 6]] (* Ivan Neretin, Feb 14 2017 *)

Extensions

Terms a(95) to a(98) fixed by Ivan Neretin, Feb 14 2017

A324939 Triangle T(n,k) read by rows in which n-th row lists in increasing order all compositions [c_1, c_2, ..., c_q] of n encoded as Product_{i=1..q} prime(i)^(c_i); n>=0, 1<=k<=A011782(n).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 30, 16, 24, 36, 54, 60, 90, 150, 210, 32, 48, 72, 108, 120, 162, 180, 270, 300, 420, 450, 630, 750, 1050, 1470, 2310, 64, 96, 144, 216, 240, 324, 360, 486, 540, 600, 810, 840, 900, 1260, 1350, 1500, 1890, 2100, 2250, 2940, 3150, 3750, 4410, 4620, 5250, 6930, 7350, 10290, 11550, 16170, 25410, 30030
Offset: 0

Views

Author

Alois P. Heinz, Sep 04 2019

Keywords

Comments

All terms sorted give A055932.
All terms first sorted by number of factors give A057335.

Examples

			Triangle T(n,k) begins:
   1;
   2;
   4,  6;
   8, 12, 18,  30;
  16, 24, 36,  54,  60,  90, 150, 210;
  32, 48, 72, 108, 120, 162, 180, 270, 300, 420, 450, 630, 750, 1050, 1470, 2310;
  ...
		

Crossrefs

Column k=1 gives A000079.
Last elements of rows give A002110.
Row sums give A325054.
Row lengths give A011782.

Programs

  • Maple
    b:= n-> `if`(n=0, [[]], [seq(map(x-> [j, x[]], b(n-j))[], j=1..n)]):
    T:= n-> sort(map(x-> mul(ithprime(i)^x[i], i=1..nops(x)), b(n)))[]:
    seq(T(n), n=0..7);

A256258 Triangle read by rows in which the row lengths are the terms of A011782 and row n lists the terms of A016969 except for the right border which gives the positive terms of A000225.

Original entry on oeis.org

1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 23, 29, 35, 41, 31, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89, 63, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 155, 161, 167, 173, 179, 185, 127, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131, 137
Offset: 1

Views

Author

Omar E. Pol, Apr 04 2015

Keywords

Comments

Row sums give A002001.
The sum of all terms of first n rows gives A000302(n-1).
The rows of triangle A256263 converge to this sequence.
Rows converge to A016969.
First 11 terms agree with A151548.

Examples

			Written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
1;
3;
5,7;
5,11,17,15;
5,11,17,23,29,35,41,31;
5,11,17,23,29,35,41,47,53,59,65,71,77,83,89,63;
5,11,17,23,29,35,41,47,53,59,65,71,77,83,89,95,101,107,113,119,125,131,137,143,149,155,161,167,173,179,185,127;
...
Illustration of initial terms in the fourth quadrant of the square grid:
------------------------------------------------------------------------
n   a(n)             Compact diagram
------------------------------------------------------------------------
.            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1    1      |_| | | |_ _  | |_ _ _ _ _ _  | |
2    3      |_ _| | |_  | | |_ _ _ _ _  | | |
3    5      |_ _ _| | | | | |_ _ _ _  | | | |
4    7      |_ _ _ _| | | | |_ _ _  | | | | |
5    5      | | |_ _ _| | | |_ _  | | | | | |
6   11      | |_ _ _ _ _| | |_  | | | | | | |
7   17      |_ _ _ _ _ _ _| | | | | | | | | |
8   15      |_ _ _ _ _ _ _ _| | | | | | | | |
9    5      | | | | | | |_ _ _| | | | | | | |
10  11      | | | | | |_ _ _ _ _| | | | | | |
11  17      | | | | |_ _ _ _ _ _ _| | | | | |
12  23      | | | |_ _ _ _ _ _ _ _ _| | | | |
13  29      | | |_ _ _ _ _ _ _ _ _ _ _| | | |
14  35      | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
15  41      |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
16  31      |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
a(n) is also the number of cells in the n-th region of the diagram.
It appears that A241717 can be represented by a similar diagram.
		

Crossrefs

Programs

  • Mathematica
    Nest[Join[#, Range[Length[#] - 1]*6 - 1, {2 #[[-1]] + 1}] &, {1}, 7] (* Ivan Neretin, Feb 14 2017 *)

A332977 Triangle T(n,k) read by rows in which n-th row lists in increasing order all integers m satisfying Omega(m) + pi(gpf(m)) - [m<>1] = n; n>=0, 1<=k<=A011782(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 7, 10, 12, 15, 16, 18, 25, 27, 11, 14, 20, 21, 24, 30, 32, 35, 36, 45, 49, 50, 54, 75, 81, 125, 13, 22, 28, 33, 40, 42, 48, 55, 60, 63, 64, 70, 72, 77, 90, 98, 100, 105, 108, 121, 135, 147, 150, 162, 175, 225, 243, 245, 250, 343, 375, 625
Offset: 0

Views

Author

Alois P. Heinz, Mar 04 2020

Keywords

Comments

Integer m > 0 is listed in row n if the index of the largest prime factor of m (or 0 for empty prime factor set) plus the cardinality of the other prime factors of m (counted with multiplicity) equals n.
Row n+k-1 contains prime(n)^k (for all n, k >= 1).
The concatenation of all rows (with offset 1) gives a permutation of the natural numbers A000027 with fixed points 1, 2, 3, 4, 5, 6, 10, ... and inverse permutation A332990.
This is a variant with sorted rows of A005940 (offset differs) or A163511.

Examples

			Triangle T(n,k) begins:
   1;
   2;
   3,  4;
   5,  6,  8,  9;
   7, 10, 12, 15, 16, 18, 25, 27;
  11, 14, 20, 21, 24, 30, 32, 35, 36, 45, 49, 50, 54, 75, 81, 125;
  ...
		

Crossrefs

Columns k=1-2 give: A008578(n+1), A100484(n-1) for n>1.
Last elements of rows give A332979.
Row sums give A252737.
Product of row elements give A252738.
Row lengths give A011782.
Cf. A000027, A000040, A000720 (pi), A001222 (Omega), A006530 (GPF), A060576 ([n<>1]), A061395 (pi(gpf(n))), A215366, A332990.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1], sort([seq(map(x-> x*
          ithprime(j), b(n-`if`(i=0, j, 1), j))[], j=1..`if`(i=0, n, i))]))
        end:
    T:= n-> b(n, 0)[]:
    seq(T(n), n=0..7);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {1}, Sort[Flatten[Table[#*
        Prime[j]& /@ b[n-If[i == 0, j, 1], j], {j, 1, If[i == 0, n, i]}]]]];
    T[n_] := b[n, 0];
    T /@ Range[0, 7] // Flatten (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)

A349563 Dirichlet convolution of right-shifted Catalan numbers with A349452 (Dirichlet inverse of A011782, 2^(n-1)).

Original entry on oeis.org

1, -1, -2, -1, -2, 18, 68, 311, 1182, 4370, 15772, 56754, 203916, 734636, 2658096, 9661591, 35292134, 129511602, 477376556, 1766730706, 6563071700, 24464139348, 91478369336, 343051112482, 1289887370140, 4861912443284, 18367285959072, 69533415236716, 263747683314904, 1002241674463968, 3814985428350480, 14544633872450487
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2021

Keywords

Comments

Dirichlet convolution with A034729 gives A034731.

Crossrefs

Cf. A000108, A011782, A349452, A349564 (Dirichlet inverse).

Programs

  • Mathematica
    s[1] = 1; s[n_] := s[n] = -DivisorSum[n, s[#] * 2^(n/# - 1) &, # < n &]; a[n_] := DivisorSum[n, CatalanNumber[# - 1] * s[n/#] &]; Array[a, 32] (* Amiram Eldar, Nov 22 2021 *)
  • PARI
    A000108(n) = (binomial(2*n, n)/(n+1));
    A011782(n) = (2^(n-1));
    memoA349452 = Map();
    A349452(n) = if(1==n,1,my(v); if(mapisdefined(memoA349452,n,&v), v, v = -sumdiv(n,d,if(dA011782(n/d)*A349452(d),0)); mapput(memoA349452,n,v); (v)));
    A349563(n) = sumdiv(n,d,A000108(d-1)*A349452(n/d));

Formula

a(n) = Sum_{d|n} A000108(d-1) * A349452(n/d).

A349565 Dirichlet convolution of Fibonacci numbers with A349452 (Dirichlet inverse of A011782, 2^(n-1)).

Original entry on oeis.org

1, -1, -2, -3, -11, -16, -51, -93, -214, -419, -935, -1812, -3863, -7649, -15698, -31443, -63939, -127676, -257963, -516037, -1037298, -2076547, -4165647, -8335716, -16702015, -33421217, -66911078, -133875827, -267921227, -535987784, -1072395555, -2145208557, -4291436930, -8584038291, -17170640199, -34344407256
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2021

Keywords

Comments

Dirichlet convolution of this sequence with A034738 produces A034748.

Crossrefs

Cf. A000045, A011782, A349452, A349566 (Dirichlet inverse).

Programs

  • Mathematica
    s[1] = 1; s[n_] := s[n] = -DivisorSum[n, s[#] * 2^(n/# - 1) &, # < n &]; a[n_] := DivisorSum[n, Fibonacci[#] * s[n/#] &]; Array[a, 36] (* Amiram Eldar, Nov 22 2021 *)
  • PARI
    A011782(n) = (2^(n-1));
    memoA349452 = Map();
    A349452(n) = if(1==n,1,my(v); if(mapisdefined(memoA349452,n,&v), v, v = -sumdiv(n,d,if(dA011782(n/d)*A349452(d),0)); mapput(memoA349452,n,v); (v)));
    A349565(n) = sumdiv(n,d,fibonacci(d)*A349452(n/d));

Formula

a(n) = Sum_{d|n} A000045(d) * A349452(n/d).

A349566 Dirichlet convolution of A011782 (2^(n-1)) with A349451 (Dirichlet inverse of Fibonacci numbers).

Original entry on oeis.org

1, 1, 2, 4, 11, 20, 51, 100, 218, 441, 935, 1862, 3863, 7751, 15742, 31648, 63939, 128180, 257963, 516974, 1037502, 2078417, 4165647, 8339900, 16702136, 33428943, 66911942, 133891584, 267921227, 536021340, 1072395555, 2145272320, 4291440670, 8584166169, 17170641321, 34344672290, 68695318919, 137399603159, 274814652766
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2021

Keywords

Comments

Dirichlet convolution of this sequence with A034748 produces A034738.

Crossrefs

Cf. A000045, A011782, A349451, A349565 (Dirichlet inverse).

Programs

  • Mathematica
    s[1] = 1; s[n_] := s[n] = -DivisorSum[n, s[#] * Fibonacci[n/#] &, # < n &]; a[n_] := DivisorSum[n, 2^(# - 1) * s[n/#] &]; Array[a, 40] (* Amiram Eldar, Nov 22 2021 *)
  • PARI
    memoA349451 = Map();
    A349451(n) = if(1==n,1,my(v); if(mapisdefined(memoA349451,n,&v), v, v = -sumdiv(n,d,if(dA349451(d),0)); mapput(memoA349451,n,v); (v)));
    A349566(n) = sumdiv(n,d,(2^(d-1)) * A349451(n/d));

Formula

a(n) = Sum_{d|n} 2^(d-1) * A349451(n/d).
Showing 1-10 of 915 results. Next