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

A305936 Irregular triangle whose n-th row is the multiset spanning an initial interval of positive integers with multiplicities equal to the n-th row of A296150 (the prime indices of n in weakly decreasing order).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2018

Keywords

Examples

			Row 90 is {1,1,1,2,2,3,3,4} because 90 = prime(3)*prime(2)*prime(2)*prime(1).
Triangle begins:
   1:
   2:  1
   3:  1  1
   4:  1  2
   5:  1  1  1
   6:  1  1  2
   7:  1  1  1  1
   8:  1  2  3
   9:  1  1  2  2
  10:  1  1  1  2
  11:  1  1  1  1  1
  12:  1  1  2  3
  13:  1  1  1  1  1  1
		

Crossrefs

Row lengths are A056239. Number of distinct elements in row n is A001222(n). Number of distinct multiplicities in row n is A001221(n).

Programs

  • Mathematica
    nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{},Flatten[Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    Array[nrmptn,30]

A003961 Completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

Comments

Meyers (see Guy reference) conjectures that for all r >= 1, the least odd number not in the set {a(i): i < prime(r)} is prime(r+1). - N. J. A. Sloane, Jan 08 2021
Meyers' conjecture would be refuted if and only if for some r there were such a large gap between prime(r) and prime(r+1) that there existed a composite c for which prime(r) < c < a(c) < prime(r+1), in which case (by Bertrand's postulate) c would necessarily be a term of A246281. - Antti Karttunen, Mar 29 2021
a(n) is odd for all n and for each odd m there exists a k with a(k) = m (see A064216). a(n) > n for n > 1: bijection between the odd and all numbers. - Reinhard Zumkeller, Sep 26 2001
a(n) and n have the same number of distinct primes with (A001222) and without multiplicity (A001221). - Michel Marcus, Jun 13 2014
From Antti Karttunen, Nov 01 2019: (Start)
More generally, a(n) has the same prime signature as n, A046523(a(n)) = A046523(n). Also A246277(a(n)) = A246277(n) and A287170(a(n)) = A287170(n).
Many permutations and other sequences that employ prime factorization of n to encode either polynomials, partitions (via Heinz numbers) or multisets in general can be easily defined by using this sequence as one of their constituent functions. See the last line in the Crossrefs section for examples.
(End)

Examples

			a(12) = a(2^2 * 3) = a(prime(1)^2 * prime(2)) = prime(2)^2 * prime(3) = 3^2 * 5 = 45.
a(A002110(n)) = A002110(n + 1) / 2.
		

References

  • Richard K. Guy, editor, Problems From Western Number Theory Conferences, Labor Day, 1983, Problem 367 (Proposed by Leroy F. Meyers, The Ohio State U.).

Crossrefs

See A045965 for another version.
Row 1 of table A242378 (which gives the "k-th powers" of this sequence), row 3 of A297845 and of A306697. See also arrays A066117, A246278, A255483, A308503, A329050.
Cf. A064989 (a left inverse), A064216, A000040, A002110, A000265, A027746, A046523, A048673 (= (a(n)+1)/2), A108228 (= (a(n)-1)/2), A191002 (= a(n)*n), A252748 (= a(n)-2n), A286385 (= a(n)-sigma(n)), A283980 (= a(n)*A006519(n)), A341529 (= a(n)*sigma(n)), A326042, A049084, A001221, A001222, A122111, A225546, A260443, A245606, A244319, A246269 (= A065338(a(n))), A322361 (= gcd(n, a(n))), A305293.
Cf. A249734, A249735 (bisections).
Cf. A246261 (a(n) is of the form 4k+1), A246263 (of the form 4k+3), A246271, A246272, A246259, A246281 (n such that a(n) < 2n), A246282 (n such that a(n) > 2n), A252742.
Cf. A275717 (a(n) > a(n-1)), A275718 (a(n) < a(n-1)).
Cf. A003972 (Möbius transform), A003973 (Inverse Möbius transform), A318321.
Cf. A300841, A305421, A322991, A250469, A269379 for analogous shift-operators in other factorization and quasi-factorization systems.
Cf. also following permutations and other sequences that can be defined with the help of this sequence: A005940, A163511, A122111, A260443, A206296, A265408, A265750, A275733, A275735, A297845, A091202 & A091203, A250245 & A250246, A302023 & A302024, A302025 & A302026.
A version for partition numbers is A003964, strict A357853.
A permutation of A005408.
Applying the same transformation again gives A357852.
Other multiplicative sequences: A064988, A357977, A357978, A357980, A357983.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Haskell
    a003961 1 = 1
    a003961 n = product $ map (a000040 . (+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Oct 09 2011
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A003961 n) (apply * (map A000040 (map 1+ (map A049084 (factor n))))))
    ;; Antti Karttunen, May 20 2014
    
  • Maple
    a:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ (a[#1]^#2& @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Dec 01 2011, updated Sep 20 2019 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1], {n, 65}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],nextprime(1+f[k,1])^f[k,2]))
    
  • PARI
    a(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Michel Marcus, May 17 2014
    
  • Perl
    use ntheory ":all";  sub a003961 { vecprod(map { next_prime($) } factor(shift)); }  # _Dana Jacobsen, Mar 06 2016
    
  • Python
    from sympy import factorint, prime, primepi, prod
    def a(n):
        f=factorint(n)
        return 1 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f)
    [a(n) for n in range(1, 11)] # Indranil Ghosh, May 13 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product p(k+1)^e(k).
Multiplicative with a(p^e) = A000040(A000720(p)+1)^e. - David W. Wilson, Aug 01 2001
a(n) = Product_{k=1..A001221(n)} A000040(A049084(A027748(n,k))+1)^A124010(n,k). - Reinhard Zumkeller, Oct 09 2011 [Corrected by Peter Munn, Nov 11 2019]
A064989(a(n)) = n and a(A064989(n)) = A000265(n). - Antti Karttunen, May 20 2014 & Nov 01 2019
A001221(a(n)) = A001221(n) and A001222(a(n)) = A001222(n). - Michel Marcus, Jun 13 2014
From Peter Munn, Oct 31 2019: (Start)
a(n) = A225546((A225546(n))^2).
a(A225546(n)) = A225546(n^2).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 2.06399637... . - Amiram Eldar, Nov 18 2022

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

A289509 Numbers k such that the gcd of the indices j for which the j-th prime prime(j) divides k is 1.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Christopher J. Smyth, Jul 11 2017

Keywords

Comments

Any integer k in the sequence encodes (by 'Heinz encoding' cf. A056239) a multiset of integers whose gcd is 1, namely the multiset containing r_j copies of j if k factors as Product_j prime(j)^{r_j} with gcd_j j = 1.
Clearly the sequence contains all even numbers and no odd primes or odd prime powers. It also clearly contains all numbers that are divisible by consecutive primes.
The sequence is the list of those k such that A289508(k) = 1.
It is also the list of those k such that A289506(k) = A289507(k).
Heinz numbers of integer partitions with relatively prime parts, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 13 2018

Examples

			6 is a term because 6 = p_1*p_2 and gcd(1,2) = 1.
From _Gus Wiseman_, Apr 13 2018: (Start)
Sequence of integer partitions with relatively prime parts begins:
02 : (1)
04 : (11)
06 : (21)
08 : (111)
10 : (31)
12 : (211)
14 : (41)
15 : (32)
16 : (1111)
18 : (221)
20 : (311)
22 : (51)
24 : (2111)
26 : (61)
28 : (411)
30 : (321)
32 : (11111)
33 : (52)
34 : (71)
35 : (43)
36 : (2211)
38 : (81)
40 : (3111)
(End)
		

Crossrefs

Programs

  • Maple
    p:=1:for ind to 10000 do p:=nextprime(p);primeindex[p]:=ind;od:
    out:=[]:for n from 2 to 100 do m:=[];f:=ifactors(n)[2];g:=0;
    for k to nops(f) do mk:=primeindex[f[k][1]];m:=[op(m),mk];
    g:=gcd(g,mk);od; if g=1 then out:=[op(out),n];fi;od:out;
  • Mathematica
    Select[Range[200],GCD@@PrimePi/@FactorInteger[#][[All,1]]===1&] (* Gus Wiseman, Apr 13 2018 *)
  • PARI
    isok(n) = my(f=factor(n)); gcd(apply(x->primepi(x), f[,1])) == 1; \\ Michel Marcus, Jul 19 2017
    
  • Python
    from sympy import gcd, primepi, primefactors
    def ok(n): return gcd([primepi(p) for p in primefactors(n)]) == 1
    print([n for n in range(1, 151) if ok(n)]) # Indranil Ghosh, Aug 06 2017

A316413 Heinz numbers of integer partitions whose length divides their sum.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 16, 17, 19, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 34, 37, 39, 41, 43, 46, 47, 49, 53, 55, 57, 59, 61, 62, 64, 67, 68, 71, 73, 78, 79, 81, 82, 83, 84, 85, 87, 88, 89, 90, 91, 94, 97, 98, 99, 100, 101, 103, 105, 107, 109, 110
Offset: 1

Views

Author

Gus Wiseman, Jul 02 2018

Keywords

Comments

In other words, partitions whose average is an integer.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of partitions whose length divides their sum begins (1), (2), (11), (3), (4), (111), (22), (31), (5), (6), (1111), (7), (8), (42), (51), (9), (33), (222), (411).
		

Crossrefs

Programs

  • Maple
    isA326413 := proc(n)
        psigsu := A056239(n) ;
        psigle := numtheory[bigomega](n) ;
        if modp(psigsu,psigle) = 0 then
            true;
        else
            false;
        end if;
    end proc:
    n := 1:
    for i from 2 to 3000 do
        if isA326413(i) then
            printf("%d %d\n",n,i);
            n := n+1 ;
        end if;
    end do: # R. J. Mathar, Aug 09 2019
    # second Maple program:
    q:= n-> (l-> nops(l)>0 and irem(add(i, i=l), nops(l))=0)(map
            (i-> numtheory[pi](i[1])$i[2], ifactors(n)[2])):
    select(q, [$1..110])[];  # Alois P. Heinz, Nov 19 2021
  • Mathematica
    Select[Range[2,100],Divisible[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]],PrimeOmega[#]]&]

A080577 Triangle in which n-th row lists all partitions of n, in graded reverse lexicographic ordering.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 4, 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 1, 4, 2, 4, 1, 1, 3, 3, 3, 2, 1, 3, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 1, 5, 2, 5, 1, 1, 4, 3, 4, 2, 1, 4, 1, 1, 1, 3, 3, 1, 3, 2
Offset: 1

Views

Author

N. J. A. Sloane, Mar 23 2003

Keywords

Comments

This is the "Mathematica" ordering of the partitions, referenced in numerous other sequences. The partitions of each integer are in reverse order of the conjugates of the partitions in Abramowitz and Stegun order (A036036). They are in the reverse of the order of the partitions in Maple order (A080576). - Franklin T. Adams-Watters, Oct 18 2006
The graded reverse lexicographic ordering of the partitions is often referred to as the "Canonical" ordering of the partitions. - Daniel Forgues, Jan 21 2011
Also the "MAGMA" ordering of the partitions. - Jason Kimberley, Oct 28 2011
Also an intuitive ordering described but not formalized in [Hardy and Wright] the first four editions of which precede [Abramowitz and Stegun]. - L. Edson Jeffery, Aug 03 2013
Also the "Sage" ordering of the partitions. - Peter Luschny, Aug 12 2013
While this is the order used for the constructive function "IntegerPartitions", it is different from Mathematica's canonical ordering of finite expressions, the latter giving A036036 if parts of partitions are read in reversed (weakly increasing) order, or A334301 if in the usual (weakly decreasing) order. - Gus Wiseman, May 08 2020

Examples

			First five rows are:
  {{1}}
  {{2}, {1, 1}}
  {{3}, {2, 1}, {1, 1, 1}}
  {{4}, {3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}
  {{5}, {4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}
Up to the fifth row, this is exactly the same as the colexicographic ordering A036037. The first row which differs is the sixth one, which reads ((6), (5,1), (4,2), (4,1,1), (3,3), (3,2,1), (3,1,1,1), (2,2,2), (2,2,1,1), (2,1,1,1,1), (1,1,1,1,1,1)). - _M. F. Hasler_, Jan 23 2020
From _Gus Wiseman_, May 08 2020: (Start)
The sequence of all partitions begins:
  ()         (3,2)        (2,1,1,1,1)    (2,2,1,1,1)
  (1)        (3,1,1)      (1,1,1,1,1,1)  (2,1,1,1,1,1)
  (2)        (2,2,1)      (7)            (1,1,1,1,1,1,1)
  (1,1)      (2,1,1,1)    (6,1)          (8)
  (3)        (1,1,1,1,1)  (5,2)          (7,1)
  (2,1)      (6)          (5,1,1)        (6,2)
  (1,1,1)    (5,1)        (4,3)          (6,1,1)
  (4)        (4,2)        (4,2,1)        (5,3)
  (3,1)      (4,1,1)      (4,1,1,1)      (5,2,1)
  (2,2)      (3,3)        (3,3,1)        (5,1,1,1)
  (2,1,1)    (3,2,1)      (3,2,2)        (4,4)
  (1,1,1,1)  (3,1,1,1)    (3,2,1,1)      (4,3,1)
  (5)        (2,2,2)      (3,1,1,1,1)    (4,2,2)
  (4,1)      (2,2,1,1)    (2,2,2,1)      (4,2,1,1)
The triangle with partitions shown as Heinz numbers (A129129) begins:
   1
   2
   3   4
   5   6   8
   7  10   9  12  16
  11  14  15  20  18  24  32
  13  22  21  28  25  30  40  27  36  48  64
  17  26  33  44  35  42  56  50  45  60  80  54  72  96 128
(End)
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Clarendon Press, Oxford, Fifth edition, 1979, p. 273.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 287.

Crossrefs

See A080576 Maple (graded reflected lexicographic) ordering.
See A036036 for the Hindenburg (graded reflected colexicographic) ordering (listed in the Abramowitz and Stegun Handbook).
See A036037 for graded colexicographic ordering.
See A228100 for the Fenner-Loizou (binary tree) ordering.
Differs from A036037 at a(48).
See A322761 for a compressed version.
Lexicographically ordered reversed partitions are A026791.
Reverse-colexicographically ordered partitions are A026792.
Compositions under this ordering are A066099.
Distinct parts of these partitions are counted by A115623.
Taking Heinz numbers gives A129129.
Lexicographically ordered partitions are A193073.
Colexicographically ordered partitions are A211992.
Reading partitions in reverse (weakly increasing) order gives A228531.
Lengths of these partitions are A238966.
Sorting partitions by Heinz number gives A296150.
The maxima of these partitions are A331581.
The length-sensitive version is A334439.

Programs

  • Magma
    &cat[&cat Partitions(n):n in[1..7]]; // Jason Kimberley, Oct 28 2011
    
  • Maple
    b:= (n, i)-> `if`(n=0 or i=1, [[1$n]], [map(x->
        [i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
    T:= n-> map(x-> x[], b(n$2))[]:
    seq(T(n), n=1..8);  # Alois P. Heinz, Jan 29 2020
  • Mathematica
    <Jean-François Alcover, Dec 10 2012 *)
    revlexsort[f_,c_]:=OrderedQ[PadRight[{c,f}]];
    Join@@Table[Sort[IntegerPartitions[n],revlexsort],{n,0,8}] (* Gus Wiseman, May 08 2020 *)
  • PARI
    A080577_row(n)={vecsort(apply(t->Vecrev(t),partitions(n)),,4)} \\ M. F. Hasler, Jan 21 2020
  • Sage
    L = []
    for n in range(8): L += list(Partitions(n))
    flatten(L)   # Peter Luschny, Aug 12 2013
    

A299702 Heinz numbers of knapsack partitions.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Gus Wiseman, Feb 17 2018

Keywords

Comments

An integer partition is knapsack if every distinct submultiset has a different sum. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F,t,S,i,r;
      F:= map(t -> [numtheory:-pi(t[1]),t[2]], ifactors(n)[2]);
      S:= {0}: r:= 1;
      for t in F do
       S:= map(s -> seq(s + i*t[1],i=0..t[2]),S);
       r:= r*(t[2]+1);
       if nops(S) <> r then return false fi
      od;
      true
    end proc:
    select(filter, [$1..100]); # Robert Israel, Oct 30 2024
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],UnsameQ@@Plus@@@Union[Rest@Subsets[primeMS[#]]]&]

A301987 Heinz numbers of integer partitions whose product is equal to their sum.

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 84, 89, 97, 101, 103, 107, 108, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 200, 211, 223, 227, 229, 233, 239, 241, 251
Offset: 1

Views

Author

Gus Wiseman, Mar 30 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			Sequence of reversed integer partitions begins: (1), (2), (3), (4), (2 2), (5), (6), (7), (8), (9), (10), (1 2 3), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20), (21), (22), (23), (1 1 2 4), (24), (25), (26), (27), (28), (1 1 2 2 2), (29), (30).
		

Crossrefs

Programs

  • Maple
    q:= n-> (l-> mul(i, i=l)=add(i, i=l))(map(i->
        numtheory[pi](i[1])$i[2], ifactors(n)[2])):
    select(q, [$1..300])[];  # Alois P. Heinz, Mar 27 2019
  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[300],Total[primeMS[#]]===Times@@primeMS[#]&]

A300061 Heinz numbers of integer partitions of even numbers.

Original entry on oeis.org

1, 3, 4, 7, 9, 10, 12, 13, 16, 19, 21, 22, 25, 27, 28, 29, 30, 34, 36, 37, 39, 40, 43, 46, 48, 49, 52, 53, 55, 57, 61, 62, 63, 64, 66, 70, 71, 75, 76, 79, 81, 82, 84, 85, 87, 88, 89, 90, 91, 94, 100, 101, 102, 107, 108, 111, 112, 113, 115, 116, 117, 118, 120
Offset: 1

Views

Author

Gus Wiseman, Feb 23 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			75 is the Heinz number of (3,3,2), which has even weight, so 75 belongs to the sequence.
Sequence of even-weight partitions begins: () (2) (1,1) (4) (2,2) (3,1) (2,1,1) (6) (1,1,1,1) (8) (4,2) (5,1) (3,3) (2,2,2) (4,1,1).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from 1+
         `if`(n=1, 0, a(n-1)) while add(numtheory[pi]
          (i[1])*i[2], i=ifactors(k)[2])::odd do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 22 2018
  • Mathematica
    Select[Range[200],EvenQ[Total[Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]]]&]

A211992 Triangle read by rows in which row n lists the partitions of n in colexicographic order.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 2, 1, 1, 3, 1, 2, 2, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 4, 1, 3, 2, 5, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 3, 2, 1, 5, 1, 2, 2, 2, 4, 2, 3, 3, 6, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 3, 2, 1, 1, 5, 1, 1, 2, 2, 2, 1, 4, 2, 1, 3, 3, 1, 6, 1, 3, 2, 2, 5, 2, 4, 3, 7
Offset: 1

Views

Author

Omar E. Pol, Aug 18 2012

Keywords

Comments

The order of the partitions of every integer is reversed with respect to A026792. For example: in A026792 the partitions of 3 are listed as [3], [2, 1], [1, 1, 1], however here the partitions of 3 are listed as [1, 1, 1], [2, 1], [3].
Row n has length A006128(n). Row sums give A066186. Right border gives A000027. The equivalent sequence for compositions (ordered partitions) is A228525. - Omar E. Pol, Aug 24 2013
The representation of the partitions (for fixed n) is as (weakly) decreasing lists of parts, the order between individual partitions (for the same n) is co-lexicographic. The equivalent sequence for partitions as (weakly) increasing lists and lexicographic order is A026791. - Joerg Arndt, Sep 02 2013

Examples

			From _Omar E. Pol_, Aug 24 2013: (Start)
Illustration of initial terms:
-----------------------------------------
n      Diagram          Partition
-----------------------------------------
.       _
1      |_|              1;
.       _ _
2      |_| |            1, 1,
2      |_ _|            2;
.       _ _ _
3      |_| | |          1, 1, 1,
3      |_ _| |          2, 1,
3      |_ _ _|          3;
.       _ _ _ _
4      |_| | | |        1, 1, 1, 1,
4      |_ _| | |        2, 1, 1,
4      |_ _ _| |        3, 1,
4      |_ _|   |        2, 2,
4      |_ _ _ _|        4;
.       _ _ _ _ _
5      |_| | | | |      1, 1, 1, 1, 1,
5      |_ _| | | |      2, 1, 1, 1,
5      |_ _ _| | |      3, 1, 1,
5      |_ _|   | |      2, 2, 1,
5      |_ _ _ _| |      4, 1,
5      |_ _ _|   |      3, 2,
5      |_ _ _ _ _|      5;
.       _ _ _ _ _ _
6      |_| | | | | |    1, 1, 1, 1, 1, 1,
6      |_ _| | | | |    2, 1, 1, 1, 1,
6      |_ _ _| | | |    3, 1, 1, 1,
6      |_ _|   | | |    2, 2, 1, 1,
6      |_ _ _ _| | |    4, 1, 1,
6      |_ _ _|   | |    3, 2, 1,
6      |_ _ _ _ _| |    5, 1,
6      |_ _|   |   |    2, 2, 2,
6      |_ _ _ _|   |    4, 2,
6      |_ _ _|     |    3, 3,
6      |_ _ _ _ _ _|    6;
...
Triangle begins:
[1];
[1,1], [2];
[1,1,1], [2,1], [3];
[1,1,1,1], [2,1,1], [3,1], [2,2], [4];
[1,1,1,1,1], [2,1,1,1], [3,1,1], [2,2,1], [4,1], [3,2], [5];
[1,1,1,1,1,1], [2,1,1,1,1], [3,1,1,1], [2,2,1,1], [4,1,1], [3,2,1], [5,1], [2,2,2], [4,2], [3,3], [6];
(End)
From _Gus Wiseman_, May 10 2020: (Start)
The triangle with partitions shown as Heinz numbers (A334437) begins:
    1
    2
    4   3
    8   6   5
   16  12  10   9   7
   32  24  20  18  14  15  11
   64  48  40  36  28  30  22  27  21  25  13
  128  96  80  72  56  60  44  54  42  50  26  45  33  35  17
(End)
		

Crossrefs

The graded reversed version is A026792.
The length-sensitive refinement is A036037.
The version for reversed partitions is A080576.
Partition lengths are A193173.
Partition maxima are A194546.
Partition minima are A196931.
The version for compositions is A228525.
The Heinz numbers of these partitions are A334437.

Programs

  • Mathematica
    colex[f_,c_]:=OrderedQ[PadRight[{Reverse[f],Reverse[c]}]];
    Join@@Table[Sort[IntegerPartitions[n],colex],{n,0,6}] (* Gus Wiseman, May 10 2020 *)
  • PARI
    gen_part(n)=
    {  /* Generate partitions of n as weakly increasing lists (order is lex): */
        my(ct = 0);
        my(m, pt);
        my(x, y);
        \\ init:
        my( a = vector( n + (n<=1) ) );
        a[1] = 0;  a[2] = n;  m = 2;
        while ( m!=1,
            y = a[m] - 1;
            m -= 1;
            x = a[m] + 1;
            while ( x<=y,
                a[m] = x;
                y = y - x;
                m += 1;
            );
            a[m] = x + y;
            pt = vector(m, j, a[j]);
        /* for A026791 print partition: */
    \\        for (j=1, m, print1(pt[j],", ") );
        /* for A211992 print partition as weakly decreasing list (order is colex): */
            forstep (j=m, 1, -1, print1(pt[j],", ") );
            ct += 1;
        );
        return(ct);
    }
    for(n=1, 10, gen_part(n) );
    \\ Joerg Arndt, Sep 02 2013
Showing 1-10 of 340 results. Next