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

A359755 Positions of first appearances in the sequence of weighted sums of prime indices (A304818).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 20, 24, 26, 28, 36, 40, 46, 48, 50, 52, 56, 62, 68, 74, 76, 86, 88, 92, 94, 106, 107, 118, 122, 124, 131, 134, 136, 142, 146, 152, 158, 164, 166, 173, 178, 188, 193, 194, 199, 202, 206, 214, 218, 226, 229, 236, 239, 254
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    6: {1,2}
    7: {4}
    8: {1,1,1}
   10: {1,3}
   12: {1,1,2}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   24: {1,1,1,2}
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
Positions of first appearances in A304818, reverse A318283.
The zero-based version is A359675, unsorted A359676.
The reverse zero-based version is A359680, unsorted A359681.
This is the sorted version of A359682, reverse A359679.
The reverse version is A359754.
A053632 counts compositions by weighted sum.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=1000;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,nn}];
    Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]

A359682 Least positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 8, 10, 15, 12, 16, 18, 20, 26, 24, 28, 50, 36, 40, 46, 48, 52, 56, 62, 68, 74, 88, 76, 107, 86, 92, 94, 131, 106, 136, 118, 124, 122, 152, 134, 173, 142, 164, 146, 193, 158, 199, 166, 188, 178, 229, 194, 239, 202, 236, 206, 263, 214, 271, 218
Offset: 0

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
  20: {1,1,3}
  27: {2,2,2}
  33: {2,5}
  37: {12}
  49: {4,4}
Hence a(12) = 20.
		

Crossrefs

The version for standard compositions is A089633, zero-based A359756.
First position of n in A304818, reverse A318283.
The greatest instead of least is A359497, reverse A359683.
The sorted zero-based version is A359675, reverse A359680.
The zero-based version is A359676, reverse A359681.
The reverse version is A359679.
The sorted version is A359755, reverse A359754.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=20;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,Prime[nn]^2}];
    Table[Position[seq,k][[1,1]],{k,0,nn}]

A359497 Greatest positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 25, 29, 35, 49, 55, 77, 121, 91, 143, 169, 187, 221, 289, 247, 323, 361, 391, 437, 539, 605, 847, 1331, 715, 1001, 1573, 1183, 1859, 2197, 1547, 2431, 2873, 3179, 3757, 4913, 3553, 4199, 5491, 4693, 6137, 6859, 9317, 14641
Offset: 0

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    5: {3}
    7: {4}
   11: {5}
   13: {6}
   17: {7}
   19: {8}
   25: {3,3}
   29: {10}
   35: {3,4}
   49: {4,4}
   55: {3,5}
   77: {4,5}
The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
  20: {1,1,3}
  27: {2,2,2}
  33: {2,5}
  37: {12}
  49: {4,4}
Hence a(12) = 49.
		

Crossrefs

First position of n in A304818, reverse A318283.
The least instead of greatest is given by A359682, reverse A359679.
The reverse version is A359683.
A112798 lists prime indices, length A001222, sum A056239.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 lists partial sums of prime indices, ranked by A358137, rev A359361.

Programs

  • Mathematica
    nn=10;
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    seq=Table[ots[primeMS[n]],{n,1,2^nn}];
    Table[Position[seq,k][[-1,1]],{k,0,nn}]
  • PARI
    a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)),
      my(z=0); for(j=1, min(m, (r-k*(k-1)/2)\k), z=max(z, self()(r-k*j, k-1, j)*prime(j))); z));
      if(n==0, 1, vecmax(vector((sqrtint(8*n+1)-1)\2, k, recurse(n, k, n))));
    } \\ Andrew Howroyd, Jan 21 2023

Extensions

Terms a(21) and beyond from Andrew Howroyd, Jan 21 2023

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

A087207 A binary representation of the primes that divide a number, shown in decimal.

Original entry on oeis.org

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

Views

Author

Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003

Keywords

Comments

The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.
For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - Antti Karttunen, Apr 17 2017
From Antti Karttunen, Jun 18 & 20 2017: (Start)
A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).
For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.
Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.
If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.
(End)
Binary rank of the distinct prime indices of n, where the binary rank of an integer partition y is given by Sum_i 2^(y_i-1). For all prime indices (with multiplicity) we have A048675. - Gus Wiseman, May 25 2024

Examples

			a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).
a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.
		

Crossrefs

For partial sums see A288566.
Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.
Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.
A003986, A003961, A059896 are used to express relationship between terms of this sequence.
Related to A267116 via A225546.
Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).
A048675 gives binary rank of prime indices.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices (listed A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- sum A029931, product A096111
- max A029837 or A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Haskell
    a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row
    -- Reinhard Zumkeller, Jul 16 2013
    
  • Mathematica
    a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Dec 12 2011 *)
  • PARI
    a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[,1]), v = concat(v, vecsearch(f[,1], p)!=0);); fromdigits(Vecrev(v), 2));} \\ Michel Marcus, Jun 05 2017
    
  • PARI
    A087207(n)=vecsum(apply(p->1<M. F. Hasler, Jun 23 2017
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        return sum(2**primepi(i - 1) for i in factorint(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017
    
  • Scheme
    (definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec
    (define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - Antti Karttunen, Jun 19 2017

Formula

Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - Vladeta Jovovic, Oct 29 2003
a(n) gives the m such that A019565(m) = A007947(n). - Naohiro Nomoto, Oct 30 2003
A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - Reinhard Zumkeller, Nov 30 2003
G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
From Antti Karttunen, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)
a(n) = A048675(A007947(n)).
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).
A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]
A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]
a(A293214(n)) = A218403(n).
a(A293442(n)) = A267116(n).
A069010(a(n)) = A287170(n).
A007088(a(n)) = A276379(n).
A038374(a(n)) = A300820(n) for n >= 1.
(End)
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).
a(A003961(n)) = 2*a(n).
a(n^2) = a(n).
a(n) = A267116(A225546(n)).
a(A225546(n)) = A267116(n).
(End)

Extensions

More terms from Don Reble, Ray Chandler and Naohiro Nomoto, Oct 28 2003
Name clarified by Antti Karttunen, Jun 18 2017

A358194 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with partial sums summing to k, where k ranges from n to n(n+1)/2.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 31 2022

Keywords

Comments

The partial sums of a sequence (a, b, c, ...) are (a, a+b, a+b+c, ...).

Examples

			Triangle begins:
  1
  1
  1 1
  1 0 1 1
  1 0 1 1 0 1 1
  1 0 0 1 1 0 1 1 0 1 1
  1 0 0 1 1 1 1 0 1 1 0 1 1 0 1 1
  1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1
  1 0 0 0 1 1 1 1 0 1 1 1 2 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 1
For example, the T(15,59) = 5 partitions are: (8,2,2,2,1), (7,3,3,1,1), (6,5,2,1,1), (4,3,2,2,2,2), (3,3,3,3,2,1).
		

Crossrefs

Row sums are A000041.
The version for compositions is A053632.
Row lengths are A152947.
The version for reversed partitions is A264034.
A048793 = partial sums of reversed standard compositions, sum A029931.
A358134 = partial sums of standard compositions, sum A359042.
A358136 = partial sums of prime indices, sum A318283.
A359361 = partial sums of reversed prime indices, sum A304818.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Total[Accumulate[#]]==k&]],{n,0,8},{k,n,n*(n+1)/2}]

A320387 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 4, 3, 4, 5, 3, 5, 7, 4, 7, 8, 6, 8, 11, 7, 9, 13, 9, 11, 16, 12, 15, 18, 13, 17, 20, 17, 21, 24, 19, 24, 30, 22, 28, 34, 26, 34, 38, 30, 37, 43, 37, 42, 48, 41, 50, 58, 48, 55, 64, 53, 64, 71, 59, 73, 81, 69, 79, 89, 79, 90, 101, 87, 100, 111
Offset: 0

Views

Author

Seiichi Manyama, Oct 12 2018

Keywords

Comments

Partitions are usually written with parts in descending order, but the conditions are easier to check "visually" if written in ascending order.
Generating function of the "second integrals" of partitions: given a partition (p_1, ..., p_s) written in weakly decreasing order, write the sequence B = (b_1, b_2, ..., b_s) = (p_1, p_1 + p_2, ..., p_1 + ... + p_s). The sequence gives the coefficients of the generating function summing q^(b_1 + ... + b_s) over all partitions of all nonnegative integers. - William J. Keith, Apr 23 2022
From Gus Wiseman, Jan 17 2023: (Start)
Equivalently, a(n) is the number of multisets (weakly increasing sequences of positive integers) with weighted sum n. For example, the Heinz numbers of the a(0) = 1 through a(15) = 7 multisets are:
1 2 3 4 7 6 8 10 15 12 16 18 20 26 24 28
5 11 9 17 19 14 21 22 27 41 30 32
13 23 29 31 33 55 39 34
25 35 37 43 45
49 77 47
65
121
These multisets are counted by A264034. The reverse version is A007294. The zero-based version is A359678.
(End)

Examples

			There are a(29) = 15 such partitions of 29:
  01: [29]
  02: [10, 19]
  03: [11, 18]
  04: [12, 17]
  05: [13, 16]
  06: [14, 15]
  07: [5, 10, 14]
  08: [6, 10, 13]
  09: [6, 11, 12]
  10: [7, 10, 12]
  11: [8, 10, 11]
  12: [3, 6, 9, 11]
  13: [5, 7, 8, 9]
  14: [2, 4, 6, 8, 9]
  15: [3, 5, 6, 7, 8]
There are a(30) = 18 such partitions of 30:
  01: [30]
  02: [10, 20]
  03: [11, 19]
  04: [12, 18]
  05: [13, 17]
  06: [14, 16]
  07: [5, 10, 15]
  08: [6, 10, 14]
  09: [6, 11, 13]
  10: [7, 10, 13]
  11: [7, 11, 12]
  12: [8, 10, 12]
  13: [3, 6, 9, 12]
  14: [9, 10, 11]
  15: [4, 7, 9, 10]
  16: [2, 4, 6, 8, 10]
  17: [6, 7, 8, 9]
  18: [4, 5, 6, 7, 8]
		

Crossrefs

Number of appearances of n > 0 in A304818, reverse A318283.
A053632 counts compositions by weighted sum.
A358194 counts partitions by weighted sum, reverse A264034.
Weighted sum of prime indices: A359497, A359676, A359682, A359754, A359755.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
    Table[Length[Select[Range[2^n],ots[prix[#]]==n&]],{n,10}] (* Gus Wiseman, Jan 17 2023 *)
  • PARI
    seq(n)={Vec(sum(k=1, (sqrtint(8*n+1)+1)\2, my(t=binomial(k,2)); x^t/prod(j=1, k-1, 1 - x^(t-binomial(j,2)) + O(x^(n-t+1)))))} \\ Andrew Howroyd, Jan 22 2023
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary << 0
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0
      }
      cnt
    end
    def A320387(n)
      (0..n).map{|i| f(i)}
    end
    p A320387(50)
    

Formula

G.f.: Sum_{k>=1} x^binomial(k,2)/Product_{j=1..k-1} (1 - x^(binomial(k,2)-binomial(j,2))). - Andrew Howroyd, Jan 22 2023

A305563 Number of reducible integer partitions of n.

Original entry on oeis.org

1, 2, 3, 4, 7, 7, 15, 16, 27, 30, 56, 56, 100, 105, 157, 188, 287, 303, 470, 524, 724, 850, 1197, 1339, 1856, 2135, 2814, 3305, 4360, 4951, 6532, 7561, 9563, 11195, 14165, 16328, 20631, 23866, 29471, 34320, 42336, 48672, 59872, 69139, 83625, 96911, 117153
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2018

Keywords

Comments

A multiset m whose distinct elements are m_1, m_2, ..., m_k with multiplicities y_1, y_2, ..., y_k is reducible if either m is of size 1 or gcd(m_1, ..., m_k) = 1 and the multiset {y_1, ..., y_k} is also reducible.

Examples

			The a(6) = 7 reducible integer partitions are (6), (51), (411), (321), (3111), (21111), (111111). Missing from this list are (42), (33), (222), (2211).
		

Crossrefs

Programs

  • Mathematica
    ptnredQ[y_]:=Or[Length[y]==1,And[GCD@@y==1,ptnredQ[Sort[Length/@Split[y],Greater]]]];
    Table[Length[Select[IntegerPartitions[n],ptnredQ]],{n,20}]

A359361 Irregular triangle read by rows whose n-th row lists the partial sums of the integer partition with Heinz number n.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 3, 4, 1, 2, 3, 2, 4, 3, 4, 5, 2, 3, 4, 6, 4, 5, 3, 5, 1, 2, 3, 4, 7, 2, 4, 5, 8, 3, 4, 5, 4, 6, 5, 6, 9, 2, 3, 4, 5, 3, 6, 6, 7, 2, 4, 6, 4, 5, 6, 10, 3, 5, 6, 11, 1, 2, 3, 4, 5, 5, 7, 7, 8, 4, 7, 2, 4, 5, 6, 12, 8, 9, 6, 8, 3, 4, 5, 6, 13
Offset: 2

Views

Author

Gus Wiseman, Dec 30 2022

Keywords

Comments

The partial sums of a sequence (a, b, c, ...) are (a, a+b, a+b+c, ...).
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The partition with Heinz number n is the reversed n-th row of A112798.

Examples

			Triangle begins:
   2: 1
   3: 2
   4: 1 2
   5: 3
   6: 2 3
   7: 4
   8: 1 2 3
   9: 2 4
  10: 3 4
  11: 5
  12: 2 3 4
  13: 6
  14: 4 5
  15: 3 5
  16: 1 2 3 4
For example, the integer partition with Heinz number 90 is (3,2,2,1), so row n = 90 is (3,5,7,8).
		

Crossrefs

Row-lengths are A001222.
The version for standard compositions is A048793, non-reversed A358134.
Last element in each row is A056239.
First element in each row is A061395
Rows are the partial sums of rows of A296150.
Row-sums are A304818.
A reverse version is A358136, row sums A318283, Heinz numbers A358137.
The sorted Heinz numbers of rows are A359397.
A000041 counts partitions, strict A000009.
A112798 lists prime indices, product A003963.
A355536 lists differences of prime indices.

Programs

  • Maple
    T:= n-> ListTools[PartialSums](sort([seq(numtheory
           [pi](i[1])$i[2], i=ifactors(n)[2])], `>`))[]:
    seq(T(n), n=2..50);  # Alois P. Heinz, Jan 01 2023
  • Mathematica
    Table[Accumulate[Reverse[Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]],{n,2,30}]

A359678 Number of multisets (finite weakly increasing sequences of positive integers) with zero-based weighted sum (A359674) equal to n > 0.

Original entry on oeis.org

1, 2, 4, 4, 6, 9, 8, 10, 14, 13, 16, 21, 17, 22, 28, 23, 30, 37, 30, 38, 46, 38, 46, 59, 46, 55, 70, 59, 70, 86, 67, 81, 96, 84, 98, 115, 95, 114, 135, 114, 132, 158, 127, 156, 178, 148, 176, 207, 172, 201, 227, 196, 228, 270, 222, 255, 296, 255, 295, 338, 278
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2023

Keywords

Comments

The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.

Examples

			The a(1) = 1 through a(8) = 10 multisets:
  {1,1}  {1,2}  {1,3}    {1,4}  {1,5}    {1,6}      {1,7}    {1,8}
         {2,2}  {2,3}    {2,4}  {2,5}    {2,6}      {2,7}    {2,8}
                {3,3}    {3,4}  {3,5}    {3,6}      {3,7}    {3,8}
                {1,1,1}  {4,4}  {4,5}    {4,6}      {4,7}    {4,8}
                                {5,5}    {5,6}      {5,7}    {5,8}
                                {1,1,2}  {6,6}      {6,7}    {6,8}
                                         {1,2,2}    {7,7}    {7,8}
                                         {2,2,2}    {1,1,3}  {8,8}
                                         {1,1,1,1}           {1,2,3}
                                                             {2,2,3}
		

Crossrefs

The one-based version is A320387.
Number of appearances of n > 0 in A359674.
The sorted minimal ranks are A359675, reverse A359680.
The minimal ranks are A359676, reverse A359681.
The maximal ranks are A359757.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sums of standard compositions, rev A231204.

Programs

  • Mathematica
    zz[n_]:=Select[IntegerPartitions[n],UnsameQ@@#&&GreaterEqual @@ Differences[Append[#,0]]&];
    Table[Sum[Append[z,0][[1]]-Append[z,0][[2]],{z,zz[n]}],{n,30}]
  • PARI
    seq(n)={Vec(sum(k=2, (sqrtint(8*n+1)+1)\2, my(t=binomial(k, 2)); x^t/((1-x^t)*prod(j=1, k-1, 1 - x^(t-binomial(j, 2)) + O(x^(n-t+1))))))} \\ Andrew Howroyd, Jan 22 2023

Formula

G.f.: Sum_{k>=2} x^binomial(k,2)/((1 - x^binomial(k,2))*Product_{j=1..k-1} (1 - x^(binomial(k,2)-binomial(j,2)))). - Andrew Howroyd, Jan 22 2023
Showing 1-10 of 68 results. Next