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

A304793 Number of distinct positive subset-sums of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 18 2018

Keywords

Comments

A positive integer n is a positive subset-sum of an integer partition y if there exists a submultiset of y with sum n. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
a(n) <= A000005(n).
One less than the number of distinct values obtained when A056239 is applied to all divisors of n. - Antti Karttunen, Jul 01 2018

Examples

			The positive subset-sums of (4,3,1) are {1, 3, 4, 5, 7, 8} so a(70) = 6.
The positive subset-sums of (5,1,1,1) are {1, 2, 3, 5, 6, 7, 8} so a(88) = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[Total/@Rest[Subsets[Join@@Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]]],{n,100}]
  • PARI
    up_to = 65537;
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); }
    v056239 = vector(up_to,n,A056239(n));
    A304793(n) = { my(m=Map(),s,k=0); fordiv(n,d,if(!mapisdefined(m,s = v056239[d]), mapput(m,s,s); k++)); (k-1); }; \\ Antti Karttunen, Jul 01 2018

Extensions

More terms from Antti Karttunen, Jul 01 2018

A325770 Number of distinct nonempty contiguous subsequences of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 6, 1, 5, 3, 3, 3, 8, 1, 3, 3, 7, 1, 6, 1, 5, 5, 3, 1, 9, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 9, 1, 3, 5, 6, 3, 6, 1, 5, 3, 6, 1, 11, 1, 3, 5, 5, 3, 6, 1, 9, 4, 3, 1, 9, 3, 3, 3
Offset: 1

Views

Author

Gus Wiseman, May 20 2019

Keywords

Comments

After a(1) = 0, first differs from A305611 at a(42) = 6, A305611(42) = 7.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(84) = 9 distinct nonempty contiguous subsequences of (4,2,1,1) are (1), (2), (4), (1,1), (2,1), (4,2), (2,1,1), (4,2,1), (4,2,1,1).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Union[ReplaceList[If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]],{_,s__,_}:>{s}]]],{n,30}]

Formula

a(n) = A335519(n) - 1.

Extensions

Name corrected by Gus Wiseman, Jun 27 2020

A319685 Number of distinct values obtained when arithmetic derivative (A003415) is applied to proper divisors of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Comments

Because for all d|n, dA003415(d) < A003415(n), it follows that the terms here are one less than in A319686.
Differs from A033273(n) = A000005(n) - A001221(n) at n = 1, 112, 156, 224, 280, 312, 336, 342, 380, 448, 468, 525, 560, 608, 624, 660, 672, 684, 756, 760, 780, 784, 840, 870, 896, 936, 984, 1008, ...

Examples

			The proper divisors of 112 are [1, 2, 4, 7, 8, 14, 16, 28, 56]. Applying arithmetic derivative A003415 to these, we obtain values [0, 1, 4, 1, 12, 9, 32, 32, 92], of which only 7 are distinct: 0, 1, 4, 9, 12, 32, and 92, thus a(112) = 7.
		

Crossrefs

One less than A319686.
Cf. A003415.
Cf. also A304793, A305611, A316555, A316556, A319695 for similarly constructed sequences.

Programs

  • Mathematica
    d[0] = d[1] = 0; d[n_] := d[n] = n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); a[n_] := CountDistinct[d /@ Most[Divisors[n]]]; Array[a, 100] (* Amiram Eldar, Apr 17 2024 *)
  • PARI
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A319685(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((dA003415(d)), mapput(m,s,s); k++)); (k); };

Formula

a(n) = A319686(n)-1.

A316556 Number of distinct LCMs of nonempty submultisets of the integer partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 4, 1, 1, 3, 2, 3, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 4, 1, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 3, 1, 2, 1, 2, 1, 3, 3, 2, 2, 2, 1, 4, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 4, 1, 2, 5
Offset: 1

Views

Author

Gus Wiseman, Jul 06 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Number of distinct values obtained when A290103 is applied to all divisors of n larger than one. - Antti Karttunen, Sep 25 2018

Examples

			462 is the Heinz number of (5,4,2,1) which has possible LCMs of nonempty submultisets {1,2,4,5,10,20} so a(462) = 6.
		

Crossrefs

Cf. also A304793, A305611, A319685, A319695 for other similarly constructed sequences.

Programs

  • Mathematica
    Table[Length[Union[LCM@@@Rest[Subsets[If[n==1,{},Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]]]]]]],{n,100}]
  • PARI
    A290103(n) = lcm(apply(p->primepi(p),factor(n)[,1]));
    A316556(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s=A290103(d)), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 25 2018

Extensions

More terms from Antti Karttunen, Sep 25 2018

A319695 Number of distinct values obtained when Euler phi (A000010) is applied to proper divisors of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Examples

			For n = 6, it has three proper divisors: 1, 2, 3, and applying A000010 to these gives 1, 1 and 2, with just two distinct values, thus a(6) = 2.
		

Crossrefs

Cf. also A304793, A305611, A316555, A316556, A319685 for similarly constructed sequences.

Programs

  • PARI
    A319695(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d
    				

A316555 Number of distinct GCDs of nonempty submultisets of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 06 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Number of distinct values obtained when A289508 is applied to all divisors of n larger than one. - Antti Karttunen, Sep 28 2018

Examples

			455 is the Heinz number of (6,4,3) which has possible GCDs of nonempty submultisets {1,2,3,4,6} so a(455) = 5.
		

Crossrefs

Cf. also A304793, A305611, A319685, A319695 for other similarly constructed sequences.

Programs

  • Mathematica
    Table[Length[Union[GCD@@@Rest[Subsets[If[n==1,{},Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]]]]]]],{n,100}]
  • PARI
    A289508(n) = gcd(apply(p->primepi(p),factor(n)[,1]));
    A316555(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d>1)&&!mapisdefined(m,s=A289508(d)), mapput(m,s,s); k++)); (k); }; \\ Antti Karttunen, Sep 28 2018

Extensions

More terms from Antti Karttunen, Sep 28 2018

A383159 The sum of the maximum exponents in the prime factorizations of the unitary divisors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 7, 1, 5, 3, 3, 3, 6, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 11, 1, 3, 5, 6, 3, 7, 1, 5, 3, 7, 1, 8, 1, 3, 5, 5, 3, 7, 1, 9, 4, 3, 1, 11, 3, 3, 3
Offset: 1

Views

Author

Amiram Eldar, Apr 18 2025

Keywords

Comments

First differs from A032741 at n = 36, and from A305611 and A325770 at n = 30.
a(n) depends only on the prime signature of n (A118914).

Examples

			4 has 2 unitary divisors: 1 and 4 = 2^2. The maximum exponents in their prime factorizations are 0 and 2, respectively. Therefore, a(4) = 0 + 2 = 2.
12 has 4 divisors: 1, 3 = 3^1, 4 = 2^2 and 12 = 2^2 * 3. The maximum exponents in their prime factorizations are 0, 1, 2 and 2, respectively. Therefore, a(12) = 0 + 1 + 2 + 2 = 5.
		

Crossrefs

Programs

  • Mathematica
    emax[n_] := If[n == 1, 0, Max[FactorInteger[n][[;; , 2]]]]; a[n_] := DivisorSum[n, emax[#] &, CoprimeQ[#, n/#] &]; Array[a, 100]
    (* second program: *)
    a[n_] := If[n == 1, 0, Module[{e = FactorInteger[n][[;; , 2]], emax, v}, emax = Max[e]; v = Table[Times @@ (If[# < k + 1, 2, 1] & /@ e), {k, 1, emax}]; v[[1]] + Sum[k*(v[[k]] - v[[k - 1]]), {k, 2, emax}] - 1]]; Array[a, 100]
  • PARI
    emax(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = sumdiv(n, d, (gcd(d, n/d) == 1) * emax(d));
    
  • PARI
    a(n) = if(n == 1, 0, my(e = factor(n)[, 2], emax = vecmax(e), v); v = vector(emax, k, vecprod(apply(x ->if(x < k+1, 2, 1), e))); v[1] + sum(k = 2, emax, k * (v[k]-v[k-1])) - 1);

Formula

a(n) = Sum_{d|n, gcd(d, n/d) = 1} A051903(d).
a(n) = A034444(n) * A383160(n)/A383161(n).
a(n) <= A383156(n), with equality if and only if n is squarefree (A005117).
a(n) = utau(n, 2) - 1 + Sum_{k=2..A051903(n)} k * (utau(n, k+1) - utau(n, k)), where utau(n, k) is the number of k-free unitary divisors of n (k-free numbers are numbers that are not divisible by a k-th power other than 1). For a given k >= 2, utau(n, k) is a multiplicative function with utau(p^e, k) = 2 if e < k, and 1 otherwise. E.g., utau(n, 2) = A056671(n), utau(n, 3) = A365498(n), and utau(n, 4) = A365499(n).
Sum_{k=1..n} a(k) ~ c_1 * n * log(n) + c_2 * n, where c_1 = c(2) + Sum_{k>=3} (k-1) * (c(k) - c(k-1)) = 0.91974850283445458744..., c(k) = Product_{p prime} (1 - 1/p^2 - 1/p^k + 1/p^(k+1)), c_2 = -1 + (2*gamma - 1)*c_1 + d(2) + Sum_{k>=3} (k-1) * (d(k) - d(k-1)) = -0.50780794945146599739..., d(k) = c(k) * Sum_{p prime} (2*p^(k-1) + k*p - k - 1) * log(p) / (p^(k+1) - p^(k-1) - p + 1), and gamma is Euler's constant (A001620).

A319693 Filter sequence combining sopfr(d) from all proper divisors d of n, where sopfr(d) is A001414(d) = sum of primes dividing d with repetition.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Comments

Restricted growth sequence transform of A319692.
For all i, j: a(i) = a(j) => A305611(i) = A305611(j).

Examples

			The proper divisors of  96 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, while
the proper divisors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54.
It happens that sopfr(8) = sopfr(9), sopfr(16) = sopfr(18), sopfr(24) = sopfr(27), sopfr(32) = sopfr(36) and sopfr(48) = sopfr(54), and the rest of proper divisors (1, 2, 3, 4, 6, 12) are shared by both numbers, from which follows that by taking product of sopfr over proper divisors gives an identical result for both, thus a(96) = a(108). Here sopfr = A001414.
		

Crossrefs

Cf. also A319353.
Differs from A305800, A296073 and A317943 for the first time at n=108, as here a(108) = 73.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
    A319692(n) = { my(m=1); fordiv(n, d, if(dA001414(d)))); (m); };
    v319693 = rgs_transform(vector(up_to,n,A319692(n)));
    A319693(n) = v319693[n];

A343943 Number of distinct possible alternating sums of permutations of the multiset of prime factors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 19 2021

Keywords

Comments

First differs from A096825 at a(525) = 3, A096825(525) = 4.
First differs from A345926 at a(90) = 4, A345926(90) = 3.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime factors is also the reverse-alternating sum of reversed prime factors.
Also the number of distinct "sums of prime factors" of divisors d|n such that bigomega(d) = bigomega(n)/2 rounded up.

Examples

			The divisors of 525 with 2 prime factors are: 15, 21, 25, 35, with prime factors {3,5}, {3,7}, {5,5}, {5,7}, with distinct sums {8,10,12}, so a(525) = 3.
		

Crossrefs

The half-length submultisets are counted by A114921.
Including all multisets of prime factors gives A305611(n) + 1.
The strict rounded version appears to be counted by A342343.
The version for prime indices instead of prime factors is A345926.
A000005 counts divisors, which add up to A000203.
A001414 adds up prime factors, row sums of A027746.
A056239 adds up prime indices, row sums of A112798.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A276024 and A299701 count positive subset-sums of partitions.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A334968 counts subsequence-sums of standard compositions.

Programs

  • Mathematica
    prifac[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Length[Union[Total/@Subsets[prifac[n],{Ceiling[PrimeOmega[n]/2]}]]],{n,100}]
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A343943(n):
        fs = factorint(n)
        return len(set(sum(d) for d in multiset_combinations(fs,(sum(fs.values())+1)//2))) # Chai Wah Wu, Aug 23 2021

A319692 a(n) = Product_{d|n, dA001414(d)), where A001414(d) gives the sum of prime factors of d, with repetition.

Original entry on oeis.org

1, 2, 2, 10, 2, 70, 2, 110, 14, 130, 2, 10010, 2, 190, 182, 1870, 2, 15470, 2, 27170, 266, 370, 2, 3233230, 26, 430, 238, 60610, 2, 5169710, 2, 43010, 518, 610, 494, 74364290, 2, 710, 602, 13394810, 2, 15543710, 2, 175010, 71162, 890, 2, 2156564410, 38, 76570, 854, 250690, 2, 10318490, 962, 38123690, 994, 1130, 2, 971341981610, 2, 1310, 140182, 1333310, 1118
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Crossrefs

Cf. A001414, A319693 (rgs-transform).
Cf. also A319352.

Programs

Formula

a(n) = Product_{d|n, dA000040(1+A001414(d)).
For all n >= 1:
A001221(a(n)) = A305611(n).
Showing 1-10 of 11 results. Next