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 133 results. Next

A277905 Irregular table: Each row n (n >= 0) lists in ascending order all A018819(n) numbers k for which A048675(k) = n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 9, 12, 16, 10, 18, 24, 32, 15, 20, 27, 36, 48, 64, 30, 40, 54, 72, 96, 128, 7, 25, 45, 60, 80, 81, 108, 144, 192, 256, 14, 50, 90, 120, 160, 162, 216, 288, 384, 512, 21, 28, 75, 100, 135, 180, 240, 243, 320, 324, 432, 576, 768, 1024, 42, 56, 150, 200, 270, 360, 480, 486, 640, 648, 864, 1152, 1536, 2048, 35, 63, 84, 112, 125, 225, 300, 400
Offset: 1

Views

Author

Antti Karttunen, Nov 14 2016

Keywords

Comments

Each row beginning with an odd number (rows with even index) is followed by a row of the same length, with the same terms, but multiplied by 2. See also comments in the Formula section of A018819.
Note that although the indexing of rows start from zero, the indexing of this sequence starts from 1, with a(1) = 1.
Also Heinz numbers of integer partitions whose binary rank is n, where the binary rank of a partition y is given by Sum_i 2^(y_i-1). For example, row n = 6 is 15, 20, 27, 36, 48, 64, corresponding to the partitions (3,2), (3,1,1), (2,2,2), (2,2,1,1), (2,1,1,1,1), (1,1,1,1,1,1). - Gus Wiseman, May 25 2024
Also, row n lists in ascending order all A018819(n) numbers k for which A097248(k) = A019565(n). - Flávio V. Fernandes, Jul 19 2025

Examples

			The irregular table begins as:
  row terms
   0   1;
   1   2;
   2   3,  4;
   3   6,  8;
   4   5,  9,  12,  16;
   5  10, 18,  24,  32;
   6  15, 20,  27,  36,  48,  64;
   7  30, 40,  54,  72,  96, 128;
   8   7, 25,  45,  60,  80,  81, 108, 144, 192, 256;
   9  14, 50,  90, 120, 160, 162, 216, 288, 384, 512;
  10  21, 28,  75, 100, 135, 180, 240, 243, 320, 324, 432,  576,  768, 1024;
  11  42, 56, 150, 200, 270, 360, 480, 486, 640, 648, 864, 1152, 1536, 2048;
...
		

Crossrefs

Cf. A019565 (the left edge, the only terms that are squarefree).
Cf. A000079 (the trailing edge).
Row lengths are A018819 (number of partitions of binary rank n).
A000009 counts strict partitions, ranks A005117.
A029837 stc_sum or A070939 bin_len, opposite A070940 binexp_lastpos_1.
A048675 gives binary rank of prime indices, distinct A087207.
A048793 lists binary indices, product A096111, reverse A272020.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, cf. A001222, A003963, A056239, A296150.
A372890 adds up binary ranks of partitions, strict A372888.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Select[Range[0,2^k],Total[2^(prix[#]-1)]==k&],{k,0,10}] (* Gus Wiseman, May 25 2024 *)
  • Scheme
    (definec (A277905 n) (A277905bi (A277903 n) (A277904 n)))
    (define (A277905bi row col) (let outloop ((k (A019565 row)) (col col)) (if (zero? col) k (let inloop ((j (+ 1 k))) (if (= (A048675 j) row) (outloop j (- col 1)) (inloop (+ 1 j))))))) ;; Very slow implementation.
    ;; Implementation based on a naive recurrence:
    (definec (A277905 n) (if (= 1 n) n (let ((maybe_next (A277896 (A277905 (- n 1))))) (if (not (zero? maybe_next)) maybe_next (A019565 (A277903 n))))))

Formula

a(1) = 1; for n > 1, if A277896(a(n-1)) > 0, then a(n) = A277896(a(n-1)), otherwise a(n) = A019565(A277903(n)). [A naive recurrence for a one-dimensional version.]
Other identities. For all n >= 1:
A048675(a(n)) = A277903(n).

A089292 G.f.: Product_{m>=1} 1/(1-x^m)^A018819(m).

Original entry on oeis.org

1, 1, 3, 5, 12, 20, 41, 69, 132, 222, 399, 665, 1156, 1904, 3212, 5234, 8645, 13925, 22596, 36008, 57590, 90862, 143508, 224316, 350505, 543159, 840623, 1292317, 1983094, 3026178, 4608061, 6983663, 10559800, 15901698, 23889722, 35760786, 53405395, 79498207
Offset: 0

Views

Author

N. J. A. Sloane, Dec 24 2003

Keywords

Comments

Number of 2-dimensional partitions of n where each row is non-squashing.

Examples

			a(4) = 12:
4.31.3.22.2.211.21.2..2.11.11.1
.....1....2.....1..11.1.11.1..1
......................1....1..1
..............................1
211 and 1111 for example are excluded because they would squash.
		

Crossrefs

Programs

  • Mathematica
    maxm = 38;
    b[0] = b[1] = 1; b[n_] := b[n] = If[OddQ[n], b[n-1], b[n-1] + b[n/2]];
    Product[1/(1-x^m)^b[m], {m, 1, maxm}] + O[x]^maxm // CoefficientList[#, x]&
    (* Jean-François Alcover, Oct 02 2018 *)

A277904 Irregular table: row n (n >= 0) is obtained by listing numbers 0 .. A018819(n)-1.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
Offset: 1

Views

Author

Antti Karttunen, Nov 14 2016

Keywords

Examples

			A018819 -> range -> terms on row n
  1        [0,0]:    0;
  1        [0,0]:    0;
  2        [0,1]:    0, 1;
  2        [0,1]:    0, 1;
  4        [0,3]:    0, 1, 2, 3;
  4        [0,3]:    0, 1, 2, 3;
  6        [0,5]:    0, 1, 2, 3, 4, 5;
etc.
		

Crossrefs

Used for constructing A277905.
Retaining only every second row gives A278164.

Programs

Formula

a(1) = 0; for n > 1, a(n) = n - A000123(A277903(n)-1) - 1.

A089300 Number of planar partitions of n (A000219) that are non-squashing along rows and down columns (cf. A018819).

Original entry on oeis.org

1, 1, 3, 4, 9, 13, 25, 33, 56, 76, 122, 170, 264, 360, 538, 707, 1002, 1332, 1853, 2409, 3294
Offset: 0

Views

Author

N. J. A. Sloane, Dec 25 2003

Keywords

Examples

			E.g. a(4) = 9:
4.31.3.22.2.211.21..2..11
.....1....2.....1...1..11
....................1....
		

Crossrefs

Extensions

More terms from Wouter Meeussen, Dec 30 2003

A168261 Triangle read by rows, A115361 * the diagonalized variant of A018819.

Original entry on oeis.org

1, 1, 1, 0, 0, 2, 1, 1, 0, 2, 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 0, 0, 6, 1, 1, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 4, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20
Offset: 1

Views

Author

Gary W. Adamson, Nov 21 2009

Keywords

Comments

Row sums = A018819 starting with offset 1; (1, 2, 2, 4, 4, 6, 6, 10, 10,...).
Equals the eigensequence of triangle A115361.
Rightmost diagonal = A018819.
Sum of n-th row terms = rightmost term of next row.

Examples

			First few rows of the triangle =
1;
1, 1;
0, 0, 2;
1, 1, 0, 2;
0, 0, 0, 0, 4;
0, 0, 2, 0, 0, 4;
0, 0, 0, 0, 0 0, 6;
1, 1, 0, 2, 0, 0, 0, 6;
0, 0, 0, 0, 0, 0, 0, 0, 10;
0, 0, 0, 0, 4, 0, 0, 0, 0, 10;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14;
0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 0, 14;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20;
0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 20;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26;
1, 1, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 26;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36;
...
		

Crossrefs

Formula

Equals M*Q as infinite lower triangular matrices, where M = triangle A115361, and Q = the diagonalized variant of A018819 such that (1, 1, 2, 2, 4, 4, 6, 6,...) = rightmost diagonal with the rest zeros.

A048675 If n = p_i^e_i * ... * p_k^e_k, p_i < ... < p_k primes (with p_i = prime(i)), then a(n) = (1/2) * (e_i * 2^i + ... + e_k * 2^k).

Original entry on oeis.org

0, 1, 2, 2, 4, 3, 8, 3, 4, 5, 16, 4, 32, 9, 6, 4, 64, 5, 128, 6, 10, 17, 256, 5, 8, 33, 6, 10, 512, 7, 1024, 5, 18, 65, 12, 6, 2048, 129, 34, 7, 4096, 11, 8192, 18, 8, 257, 16384, 6, 16, 9, 66, 34, 32768, 7, 20, 11, 130, 513, 65536, 8, 131072, 1025, 12, 6, 36, 19
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

The original motivation for this sequence was to encode the prime factorization of n in the binary representation of a(n), each such representation being unique as long as this map is restricted to A005117 (squarefree numbers, resulting a permutation of nonnegative integers A048672) or any of its subsequence, resulting an injective function like A048623 and A048639.
However, also the restriction to A260443 (not all terms of which are squarefree) results a permutation of nonnegative integers, namely A001477, the identity permutation.
When a polynomial with nonnegative integer coefficients is encoded with the prime factorization of n (e.g., as in A206296, A260443), then a(n) gives the evaluation of that polynomial at x=2.
The primitive completely additive integer sequence that satisfies a(n) = a(A225546(n)), n >= 1. By primitive, we mean that if b is another such sequence, then there is an integer k such that b(n) = k * a(n) for all n >= 1. - Peter Munn, Feb 03 2020
If the binary rank of an integer partition y is given by Sum_i 2^(y_i-1), and the Heinz number is Product_i prime(y_i), then a(n) is the binary rank of the integer partition with Heinz number n. Note the function taking a set s to Sum_i 2^(s_i-1) is the inverse of A048793 (binary indices), and the function taking a multiset m to Product_i prime(m_i) is the inverse of A112798 (prime indices). - Gus Wiseman, May 22 2024

Examples

			From _Gus Wiseman_, May 22 2024: (Start)
The A018819(7) = 6 cases of binary rank 7 are the following, together with their prime indices:
   30: {1,2,3}
   40: {1,1,1,3}
   54: {1,2,2,2}
   72: {1,1,1,2,2}
   96: {1,1,1,1,1,2}
  128: {1,1,1,1,1,1,1}
(End)
		

Crossrefs

Row 2 of A104244.
Similar logarithmic functions: A001414, A056239, A090880, A289506, A293447.
Left inverse of the following sequences: A000079, A019565, A038754, A068911, A134683, A260443, A332824.
A003961, A028234, A032742, A055396, A064989, A067029, A225546, A297845 are used to express relationship between terms of this sequence.
Cf. also A048623, A048676, A099884, A277896 and tables A277905, A285325.
Cf. A297108 (Möbius transform), A332813 and A332823 [= a(n) mod 3].
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (A000203,A331750), (A005940,A087808), (A007913,A248663), (A007947,A087207), (A097248,A048675), (A206296,A000129), (A248692,A056239), (A283477,A005187), (A284003,A006068), (A285101,A028362), (A285102,A068052), (A293214,A001065), (A318834,A051953), (A319991,A293897), (A319992,A293898), (A320017,A318674), (A329352,A069359), (A332461,A156552), (A332462,A156552), (A332825,A000010) and apparently (A163511,A135529).
See comments/formulas in A277333, A331591, A331740 giving their relationship to this sequence.
The formula section details how the sequence maps the terms of A329050, A329332.
A277892, A322812, A322869, A324573, A324575 give properties of the n-th term of this sequence.
The term k appears A018819(k) times.
The inverse transformation is A019565 (Heinz number of binary indices).
The version for distinct prime indices is A087207.
Numbers k such that a(k) is prime are A277319, counts A372688.
Grouping by image gives A277905.
A014499 lists binary indices of prime numbers.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices:
- listed A048793, sum A029931
- reversed A272020
- opposite A371572, sum A230877
- length A000120, complement A023416
- min A001511, opposite A000012
- max A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359

Programs

  • Maple
    nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc. - this is also A049084.
    A048675 := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end;
    # simpler alternative
    f:= n -> add(2^(numtheory:-pi(t[1])-1)*t[2], t=ifactors(n)[2]):
    map(f, [$1..100]); # Robert Israel, Oct 10 2016
  • Mathematica
    a[1] = 0; a[n_] := Total[ #[[2]]*2^(PrimePi[#[[1]]]-1)& /@ FactorInteger[n] ]; Array[a, 100] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    a(n) = my(f = factor(n)); sum(k=1, #f~, f[k,2]*2^primepi(f[k,1]))/2; \\ Michel Marcus, Oct 10 2016
    
  • PARI
    \\ The following program reconstructs terms (e.g. for checking purposes) from the factorization file prepared by Hans Havermann:
    v048675sigs = readvec("a048675.txt");
    A048675(n) = if(n<=2,n-1,my(prsig=v048675sigs[n],ps=prsig[1],es=prsig[2]); prod(i=1,#ps,ps[i]^es[i])); \\ Antti Karttunen, Feb 02 2020
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        if n==1: return 0
        f=factorint(n)
        return sum([f[i]*2**(primepi(i) - 1) for i in f])
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 19 2017

Formula

a(1) = 0, a(n) = 1/2 * (e1*2^i1 + e2*2^i2 + ... + ez*2^iz) if n = p_{i1}^e1*p_{i2}^e2*...*p_{iz}^ez, where p_i is the i-th prime. (e.g. p_1 = 2, p_2 = 3).
Totally additive with a(p^e) = e * 2^(PrimePi(p)-1), where PrimePi(n) = A000720(n). [Missing factor e added to the comment by Antti Karttunen, Jul 29 2015]
From Antti Karttunen, Jul 29 2015: (Start)
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A032742(n)). [Where A055396(n) gives the index of the smallest prime dividing n and A032742(n) gives the largest proper divisor of n.]
a(1) = 0; for n > 1, a(n) = (A067029(n) * (2^(A055396(n)-1))) + a(A028234(n)).
Other identities. For all n >= 0:
a(A019565(n)) = n.
a(A260443(n)) = n.
a(A206296(n)) = A000129(n).
a(A005940(n+1)) = A087808(n).
a(A007913(n)) = A248663(n).
a(A007947(n)) = A087207(n).
a(A283477(n)) = A005187(n).
a(A284003(n)) = A006068(n).
a(A285101(n)) = A028362(1+n).
a(A285102(n)) = A068052(n).
Also, it seems that a(A163511(n)) = A135529(n) for n >= 1. (End)
a(1) = 0, a(2n) = 1+a(n), a(2n+1) = 2*a(A064989(2n+1)). - Antti Karttunen, Oct 11 2016
From Peter Munn, Jan 31 2020: (Start)
a(n^2) = a(A003961(n)) = 2 * a(n).
a(A297845(n,k)) = a(n) * a(k).
a(n) = a(A225546(n)).
a(A329332(n,k)) = n * k.
a(A329050(n,k)) = 2^(n+k).
(End)
From Antti Karttunen, Feb 02-25 2020, Feb 01 2021: (Start)
a(n) = Sum_{d|n} A297108(d) = Sum_{d|A225546(n)} A297108(d).
a(n) = a(A097248(n)).
For n >= 2:
A001221(a(n)) = A322812(n), A001222(a(n)) = A277892(n).
A000203(a(n)) = A324573(n), A033879(a(n)) = A324575(n).
For n >= 1, A331750(n) = a(A000203(n)).
For n >= 1, the following chains hold:
A293447(n) >= a(n) >= A331740(n) >= A331591(n).
a(n) >= A087207(n) >= A248663(n).
(End)
a(n) = A087207(A097248(n)). - Flávio V. Fernandes, Jul 16 2025

Extensions

Entry revised by Antti Karttunen, Jul 29 2015
More linking formulas added by Antti Karttunen, Apr 18 2017

A003238 Number of rooted trees with n vertices in which vertices at the same level have the same degree.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 27, 40, 41, 53, 61, 77, 78, 104, 105, 134, 147, 175, 176, 227, 233, 275, 294, 350, 351, 438, 439, 516, 545, 624, 640, 774, 775, 881, 924, 1069, 1070, 1265, 1266, 1444, 1521, 1698, 1699
Offset: 1

Views

Author

Keywords

Comments

Also, number of sequences of positive integers b_1, b_2, ..., b_k such that 1 + b_1*(1 + b_2*(...(1 + b_k) ... )) = n. If you take mu(b_1)*mu(b_2)*...*mu(b_k) for each sequence you get 1's 0's and -1's. Add them up and you get the terms for A007554. - Christian G. Bower, Oct 15 1998
Note that this applies also to planar rooted trees and other similar objects (mountain ranges, parenthesizations) encoded by A014486. - Antti Karttunen, Sep 07 2000
Equals sum of (n-1)-th row terms of triangle A152434. - Gary W. Adamson, Dec 04 2008
Equals the eigensequence of A051731, the inverse binomial transform. - Gary W. Adamson, Dec 26 2008
From Emeric Deutsch, Aug 18 2012: (Start)
The considered rooted trees are called generalized Bethe trees; in the Goldberg-Livshitz reference they are called uniform trees.
Also, a(n) = number of partitions of n-1 in which each part is divisible by the next. Example: a(5)=5 because we have 4, 31, 22, 211, and 1111.
There is a simple bijection between generalized Bethe trees with n+1 vertices and partitions of n in which each part is divisible by the next (the parts are given by the number of edges at the successive levels). We have the correspondences: number of edges --- sum of parts; root degree --- last part; number of leaves --- first part; height --- number of parts. (End)
a(n+1) = a(n) + 1 if and only if n is prime. - Jon Perry, Nov 24 2012
According to the MathOverflow link, log(a(n)) ~ log(4)*log(n)^2, and a more precise asymptotic expansion is similar to that of A018819 and hence A000123, so the conjecture in the Formula section is partly correct. - Andrey Zabolotskiy, Jan 22 2017

Examples

			a(4) = 3 because we have the path P(4), the tree Y, and the star \|/ . - _Emeric Deutsch_, Aug 18 2012
The planted achiral trees with up to 7 nodes are:
 1  -
 1  (-)
 2  (--),     ((-))
 3  (---),    ((--)),      (((-)))
 5  (----),   ((-)(-)),    ((---)),    (((--))),     ((((-))))
 6  (-----),  ((----)),    (((-)(-))), (((---))),    ((((--)))), (((((-)))))
10 (------), ((-)(-)(-)), ((--)(--)), (((-))((-))), ((-----)),  (((----))), ((((-)(-)))), ((((---)))), (((((--))))), ((((((-)))))). - _Gus Wiseman_, Jan 12 2017
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A122934 (offset by 1).

Programs

  • Haskell
    a003238 n = a003238_list !! (n-1)
    a003238_list = 1 : f 1 where
       f x = (sum (map a003238 $ a027750_row x)) : f (x + 1)
    -- Reinhard Zumkeller, Dec 20 2014
    
  • JavaScript
    a = new Array();
    for (i = 1; i < 50; i++) a[i] = 1;
    for (i = 3; i < 50; i++) for (j = 2; j < i; j++) if (i % j == 1) a[i] += a[j];
    document.write(a + "
    "); // Jon Perry, Nov 20 2012
  • Maple
    with(numtheory): aa := proc (n) if n = 0 then 1 else add(aa(divisors(n)[i]-1), i = 1 .. tau(n)) end if end proc: a := proc (n) options operator, arrow: aa(n-1) end proc: seq(a(n), n = 1 .. 48); # Emeric Deutsch, Aug 18 2012
    A003238:= proc(n) option remember; uses numtheory; add(A003238(m),m=divisors(n-1)) end proc;
    A003238(1):= 1;
    [seq(A003238(n),n=1..48)]; # Robert Israel, Mar 10 2014
  • Mathematica
    (* b = A068336 *) b[1] = 1; b[n_] := b[n] = 1 + Sum[b[k], {k, Divisors[n-1]}]; a[n_] := b[n]/2; a[1] = 1; Table[ a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 20 2011, after Ralf Stephan *)
    achi[n_]:=If[n===1,1,Total[achi/@Divisors[n-1]]];Array[achi,50] (* Gus Wiseman, Jan 12 2017 *)
  • PARI
    seq(n) = {my(v=vector(n)); v[1]=1; for(i=2, n, v[i]=sumdiv(i-1, d, v[d])); v} \\ Andrew Howroyd, Jun 08 2025

Formula

Shifts one place left under inverse Moebius transform: a(n+1) = Sum_{k|n} a(k).
Conjecture: log(a(n)) is asymptotic to c*log(n)^2 where 0.4 < c < 0.5 - Benoit Cloitre, Apr 13 2004
For n > 1, a(n) = (1/2) * A068336(n) and Sum_{k = 1..n} a(k) = A003318(n). - Ralf Stephan, Mar 27 2004
Generating function P(x) for the sequence with offset 2 obeys P(x) = x^2*(1 + Sum_{n >= 1} P(x^n)/x^n). [Harary & Robinson]. - R. J. Mathar, Sep 28 2011
a(n) = 1 + sum of a(i) such that n == 1 (mod i). - Jon Perry, Nov 20 2012
From Ilya Gutkovskiy, Apr 28 2019: (Start)
G.f.: x * (1 + Sum_{n>=1} a(n)*x^n/(1 - x^n)).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n)/n)) = Sum_{n>=1} a(n+1)*x^n/n. (End)

Extensions

Description improved by Christian G. Bower, Oct 15 1998

A000123 Number of binary partitions: number of partitions of 2n into powers of 2.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 20, 26, 36, 46, 60, 74, 94, 114, 140, 166, 202, 238, 284, 330, 390, 450, 524, 598, 692, 786, 900, 1014, 1154, 1294, 1460, 1626, 1828, 2030, 2268, 2506, 2790, 3074, 3404, 3734, 4124, 4514, 4964, 5414, 5938, 6462, 7060, 7658, 8350, 9042, 9828
Offset: 0

Views

Author

Keywords

Comments

Also, a(n) = number of "non-squashing" partitions of 2n (or 2n+1), that is, partitions 2n = p_1 + p_2 + ... + p_k with 1 <= p_1 <= p_2 <= ... <= p_k and p_1 + p_2 + ... + p_i <= p_{i+1} for all 1 <= i < k [Hirschhorn and Sellers].
Row sums of A101566. - Paul Barry, Jan 03 2005
Equals infinite convolution product of [1,2,2,2,2,2,2,2,2] aerated A000079 - 1 times, i.e., [1,2,2,2,2,2,2,2,2] * [1,0,2,0,2,0,2,0,2] * [1,0,0,0,2,0,0,0,2]. - Mats Granvik and Gary W. Adamson, Aug 04 2009
Which can be further decomposed to the infinite convolution product of finally supported sequences, namely [1,1] aerated A000079 - 1 times with multiplicity A000027 + 1 times, i.e., [1,1] * [1,1] * [1,0,1] * [1,0,1] * [1,0,1] * ... (next terms are [1,0,0,0,1] 4 times, etc.). - Eitan Y. Levine, Jun 18 2023
Given A018819 = A000123 with repeats, polcoeff (1, 1, 2, 2, 4, 4, ...) * (1, 1, 1, ...) = (1, 2, 4, 6, 10, ...) = (1, 0, 2, 0, 4, 0, 6, ...) * (1, 2, 2, 2, ...). - Gary W. Adamson, Dec 16 2009
Let M = an infinite lower triangular matrix with (1, 2, 2, 2, ...) in every column shifted down twice. A000123 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. Replacing (1, 2, 2, 2, ...) with (1, 3, 3, 3, ...) and following the same procedure, we obtain A171370: (1, 3, 6, 12, 18, 30, 42, 66, 84, 120, ...). - Gary W. Adamson, Dec 06 2009
First differences of the sequence are (1, 2, 2, 4, 4, 6, 6, 10, ...), A018819, i.e., the sequence itself with each term duplicated except for the first one (unless a 0 is prefixed before taking the first differences), as shown by the formula a(n) - a(n-1) = a(floor(n/2)), valid for all n including n = 0 if we let a(-1) = 0. - M. F. Hasler, Feb 19 2019
Sum over k <= n of number of partitions of k into powers of 2, A018819. - Peter Munn, Feb 21 2020

Examples

			For non-squashing partitions and binary partitions see the example in A018819.
For n=3, the a(3)=6 admitted partitions of 2n=6 are 1+1+1+1+1+1, 1+1+1+1+2, 1+1+2+2, 2+2+2, 1+1+4 and 2+4. - _R. J. Mathar_, Aug 11 2021
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.
  • R. F. Churchhouse, Binary partitions, pp. 397-400 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • N. G. de Bruijn, On Mahler's partition problem, Indagationes Mathematicae, vol. X (1948), 210-220.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • H. Gupta, A simple proof of the Churchhouse conjecture concerning binary partitions, Indian J. Pure Appl. Math. 3 (1972), 791-794.
  • H. Gupta, A direct proof of the Churchhouse conjecture concerning binary partitions, Indian J. Math. 18 (1976), 1-5.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000041, A002033, A002487, A002577, A005704-A005706, A023359, A040039, A100529. Partial sums and bisection of A018819.
A column of A072170. Row sums of A089177. Twice A033485.
Cf. A145515. - Alois P. Heinz, Apr 16 2009
Cf. A171370. - Gary W. Adamson, Dec 06 2009

Programs

  • Haskell
    import Data.List (transpose)
    a000123 n = a000123_list !! n
    a000123_list = 1 : zipWith (+)
       a000123_list (tail $ concat $ transpose [a000123_list, a000123_list])
    -- Reinhard Zumkeller, Nov 15 2012, Aug 01 2011
    
  • Magma
    [1] cat [n eq 1 select n+1 else Self(n-1) + Self(n div 2): n in [1..70]]; // Vincenzo Librandi, Dec 17 2016
    
  • Maple
    A000123 := proc(n) option remember; if n=0 then 1 else A000123(n-1)+A000123(floor(n/2)); fi; end; [ seq(A000123(i),i=0..50) ];
    # second Maple program: more efficient for large n; try: a( 10^25 );
    g:= proc(b, n) option remember; `if`(b<0, 0, `if`(b=0 or
          n=0, 1, `if`(b>=n, add((-1)^(t+1)*binomial(n+1, t)
          *g(b-t, n), t=1..n+1), g(b-1, n)+g(2*b, n-1))))
        end:
    a:= n-> (t-> g(n/2^(t-1), t))(max(ilog2(2*n), 1)):
    seq(a(n), n=0..60); # Alois P. Heinz, Apr 16 2009, revised Apr 14 2016
  • Mathematica
    a[0] = 1; a[n_] := a[n] = a[Floor[n/2]] + a[n-1]; Array[a,49,0] (* Jean-François Alcover, Apr 11 2011, after M. F. Hasler *)
    Fold[Append[#1, Total[Take[Flatten[Transpose[{#1, #1}]], #2]]] &, {1}, Range[2, 49]] (* Birkas Gyorgy, Apr 18 2011 *)
  • PARI
    {a(n) = my(A, m); if( n<1, n==0, m=1; A = 1 + O(x); while(m<=n, m*=2; A = subst(A, x, x^2) * (1+x) / (1-x)); polcoeff(A, n))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, a(n\2) + a(n-1))}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    A123=[];A000123(n)={ n<3 && return(2^n); if( n<=#A123, A123[n] && return(A123[n]); A123[n-1] && return( A123[n] = A123[n-1]+A000123(n\2) ), n>2*#A123 && A123=concat(A123,vector((n-#A123)\2))); A123[if(n>#A123,1,n)]=2*sum(k=1,n\2-1,A000123(k),1)+(n%2+1)*A000123(n\2)} \\ Stores results in global vector A123 dynamically resized to at most 3n/4 when size is less than n/2. Gives a(n*10^6) in ~ n sec. - M. F. Hasler, Apr 30 2009
    
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n,2^valuation(2*m,2)*x^m/m)+x*O(x^n)),n)} \\ Paul D. Hanna, Oct 30 2012
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A000123(n): return 1 if n == 0 else A000123(n-1) + A000123(n//2) # Chai Wah Wu, Jan 18 2022

Formula

a(n) = A018819(2*n).
a(n) = a(n-1) + a(floor(n/2)). For proof see A018819.
2 * a(n) = a(n+1) + a(n-1) if n is even. - Michael Somos, Jan 07 2011
G.f.: (1-x)^(-1) Product_{n>=0} (1 - x^(2^n))^(-1).
a(n) = Sum_{i=0..n} a(floor(i/2)) [O'Shea].
a(n) = (1/n)*Sum_{k=1..n} (A038712(k)+1)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Aug 22 2002
Conjecture: Limit_{n ->infinity} (log(n)*a(2n))/(n*a(n)) = c = 1.63... - Benoit Cloitre, Jan 26 2003 [The constant c is equal to 2*log(2) = 1.38629436... =A016627. - Vaclav Kotesovec, Aug 07 2019]
G.f. A(x) satisfies A(x^2) = ((1-x)/(1+x)) * A(x). - Michael Somos, Aug 25 2003
G.f.: Product_{k>=0} (1+x^(2^k))/(1-x^(2^k)) = (Product_{k>=0} (1+x^(2^k))^(k+1) )/(1-x) = Product_{k>=0} (1+x^(2^k))^(k+2). - Joerg Arndt, Apr 24 2005
From Philippe Flajolet, Sep 06 2008: (Start)
The asymptotic rate of growth is known precisely - see De Bruijn's paper. With p(n) the number of partitions of n into powers of two, the asymptotic formula of de Bruijn is: log(p(2*n)) = 1/(2*L2)*(log(n/log(n)))^2 + (1/2 + 1/L2 + LL2/L2)*log(n) - (1 + LL2/L2)*log(log(n)) + Phi(log(n/log(n))/L2), where L2=log(2), LL2=log(log(2)) and Phi(x) is a certain periodic function with period 1 and a tiny amplitude.
Numerically, Phi(x) appears to have a mean value around 0.66. An expansion up to O(1) term had been obtained earlier by Kurt Mahler. (End)
G.f.: exp( Sum_{n>=1} 2^A001511(n) * x^n/n ), where 2^A001511(n) is the highest power of 2 that divides 2*n. - Paul D. Hanna, Oct 30 2012
(n/2)*a(n) = Sum_{k = 0..n-1} (n-k)/A000265(n-k)*a(k). - Peter Bala, Mar 03 2019
Conjectures from Mikhail Kurkov, May 04 2025: (Start)
Sum_{k=0..n} a(2^m*k)*A106400(n-k) = A125790(m,2*n) for m >= 0, n >= 0.
Sum_{k=0..n} a(2^m*(2*k+1))*A106400(n-k) = A125790(m+1,2*n+1) for m >= 0, n >= 0.
More generally, if we define b(n,m,p,q) = Sum_{k=0..n} a(2^m*(2*p*k+2*q+1))*A106400(n-k) for m >= 0, p > 0, q >= 0, n >= 0, then it also looks like that we have b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,(q-1)/2), b(n,m,p,q) = Sum_{k=0..m+1} A078121(m+1,k)*b(n,k,p/2,q/2)*(-1)^(m+k+1) for m >= 0, p > 0, q >= 0, n >= 0. (End)
Conjecture: Sum_{i>=0} a(2^m*i + k)*x^i = f(k,x) / Product_{q>=0} (1 - x^(2^q)) for m > 0, 2^(m-1) <= k < 2^m where f(k,x) is g.f. for k-th row of A381810. - Mikhail Kurkov, May 17 2025

Extensions

More terms from Robin Trew (trew(AT)hcs.harvard.edu)
Values up to a(10^4) checked with given PARI code by M. F. Hasler, Apr 30 2009

A023893 Number of partitions of n into prime power parts (1 included); number of nonisomorphic Abelian subgroups of symmetric group S_n.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 14, 20, 27, 36, 48, 63, 82, 105, 134, 171, 215, 269, 335, 415, 511, 626, 764, 929, 1125, 1356, 1631, 1953, 2333, 2776, 3296, 3903, 4608, 5427, 6377, 7476, 8744, 10205, 11886, 13818, 16032, 18565, 21463, 24768, 28536
Offset: 0

Views

Author

Keywords

Examples

			From _Gus Wiseman_, Jul 28 2022: (Start)
The a(0) = 1 through a(6) = 10 partitions:
  ()  (1)  (2)   (3)    (4)     (5)      (33)
           (11)  (21)   (22)    (32)     (42)
                 (111)  (31)    (41)     (51)
                        (211)   (221)    (222)
                        (1111)  (311)    (321)
                                (2111)   (411)
                                (11111)  (2211)
                                         (3111)
                                         (21111)
                                         (111111)
(End)
		

Crossrefs

Cf. A009490, A023894 (first differences), A062297 (number of Abelian subgroups).
The multiplicative version (factorizations) is A000688.
Not allowing 1's gives A023894, strict A054685, ranked by A355743.
The version for just primes (not prime-powers) is A034891, strict A036497.
The strict version is A106244.
These partitions are ranked by A302492.
A000041 counts partitions, strict A000009.
A001222 counts prime-power divisors.
A072233 counts partitions by sum and length.
A246655 lists the prime-powers (A000961 includes 1), towers A164336.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[Map[Length,FactorInteger[#]], 1] == Length[#] &]], {n, 0, 35}] (* Geoffrey Critzer, Oct 25 2015 *)
    nmax = 50; Clear[P]; P[m_] := P[m] = Product[Product[1/(1-x^(p^k)), {k, 1, m}], {p, Prime[Range[PrimePi[nmax]]]}]/(1-x)+O[x]^nmax // CoefficientList[ #, x]&; P[1]; P[m=2]; While[P[m] != P[m-1], m++]; P[m] (* Jean-François Alcover, Aug 31 2016 *)
  • PARI
    lista(m) = {x = t + t*O(t^m); gf = prod(k=1, m, if (isprimepower(k), 1/(1-x^k), 1))/(1-x); for (n=0, m, print1(polcoeff(gf, n, t), ", "));} \\ Michel Marcus, Mar 09 2013
    
  • Python
    from functools import lru_cache
    from sympy import factorint
    @lru_cache(maxsize=None)
    def A023893(n):
        @lru_cache(maxsize=None)
        def c(n): return sum((p**(e+1)-p)//(p-1) for p,e in factorint(n).items())+1
        return (c(n)+sum(c(k)*A023893(n-k) for k in range(1,n)))//n if n else 1 # Chai Wah Wu, Jul 15 2024

Formula

G.f.: (Product_{p prime} Product_{k>=1} 1/(1-x^(p^k))) / (1-x).

A000929 Dimension of n-th degree part of Steenrod algebra.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 20, 22, 23, 26, 28, 29, 32, 35, 37, 41, 45, 47, 51, 55, 58, 63, 68, 72, 77, 82, 86, 92, 98, 103, 111, 118, 123, 131, 139, 145, 154, 164, 171, 180, 190, 198, 208, 219, 229, 241, 253, 264, 278, 291
Offset: 0

Views

Author

J. Daniel Christensen, Mar 15 1996

Keywords

Comments

Number of partitions p(1)+p(2)+...+p(m) = n (into positive parts) such that 2*p(k) <= p(k-1).
Number of partitions of n into parts of the form 2^j-1, j=1,2,... (called s-partitions). Example: a(7)=4 because we have [7], [3,3,1], [3,1,1,1,1] and [1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 06 2006
One direction of a bijection between both sorts of partitions, as an algorithm: take a partition P (p(1)+p(2)+...+p(m) such that 2*p(k) <= p(k-1), m is the number of parts), subtract 1 from p(m), 2 from p(m-1), 4 from p(m-2), etc. (this gives a valid partition of the same type), add the part 2^m-1 to the other (initially empty) partition P', repeat until P is empty. The other direction goes by splitting parts 2^k-1 (uniquely) into distinct powers of 2 that are (in decreasing order) added at the left. - Joerg Arndt, Jan 06 2013

Examples

			From _Joerg Arndt_, Dec 28 2012: (Start)
There are a(17)=13 partitions of 17 into Mersenne numbers:
[ 1]  [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
[ 2]  [ 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
[ 3]  [ 3 3 1 1 1 1 1 1 1 1 1 1 1 ]
[ 4]  [ 3 3 3 1 1 1 1 1 1 1 1 ]
[ 5]  [ 3 3 3 3 1 1 1 1 1 ]
[ 6]  [ 3 3 3 3 3 1 1 ]
[ 7]  [ 7 1 1 1 1 1 1 1 1 1 1 ]
[ 8]  [ 7 3 1 1 1 1 1 1 1 ]
[ 9]  [ 7 3 3 1 1 1 1 ]
[10]  [ 7 3 3 3 1 ]
[11]  [ 7 7 1 1 1 ]
[12]  [ 7 7 3 ]
[13]  [ 15 1 1 ]
There are a(17)=13 partitions p(1)+p(2)+...+p(m) = 17 such that 2*p(k) <= p(k-1):
[ 1]  [ 10 4 2 1 ]
[ 2]  [ 10 5 2 ]
[ 3]  [ 11 4 2 ]
[ 4]  [ 11 5 1 ]
[ 5]  [ 12 4 1 ]
[ 6]  [ 12 5 ]
[ 7]  [ 13 3 1 ]
[ 8]  [ 13 4 ]
[ 9]  [ 14 2 1 ]
[10]  [ 14 3 ]
[11]  [ 15 2 ]
[12]  [ 16 1 ]
[13]  [ 17 ]
(End)
		

References

  • Steenrod, N. and Epstein, D., Cohomology Operations, Princeton Univ. Press, 1962.

Crossrefs

Programs

  • Maple
    The sequence is C(n,n) where C := proc(m,n) option remember; local k, a; if m = 0 then if n = 0 then 1 else 0 fi; elif m > n then C(n,n); else a := 0; for k from 0 to m do a := a + C(floor(k/2), n-k) od; a; fi end;
    g:=1/product(1-x^(2^k-1),k=1..10): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..64); # Emeric Deutsch, Mar 06 2006
    # alternative Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, min(n-j, iquo(j, 2))), j=1..i))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..80);  # Alois P. Heinz, Mar 14 2021
  • Mathematica
    nn = 63; CoefficientList[
    Series[Product[1/(1 - x^(2^i - 1)), {i, 1, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, Jul 09 2013 *)
  • PARI
    N=166; q='q+O('q^N);
    gf=1/prod(n=1,1+ceil(log(N)/log(2)), 1-q^(2^n - 1) );
    Vec(gf)
    /* Joerg Arndt, Oct 06 2012 */

Formula

G.f.: 1/Product_{i>=1} (1 - x^(2^i-1)). - Simon Plouffe (corrected by Joerg Arndt, Dec 28 2012)
a(n) = p(n,1) with p(n,k) = if k <= n then p(n-k,k) + p(n,2*k+1), otherwise 0^n. - Reinhard Zumkeller, Mar 18 2009
G.f.: Sum_{i>=0} x^(2^i-1) / Product_{j=1..i} (1 - x^(2^j-1)). - Ilya Gutkovskiy, Jun 05 2017
Showing 1-10 of 133 results. Next