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

A345912 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum -1.

Original entry on oeis.org

5, 18, 23, 25, 29, 68, 75, 78, 81, 85, 90, 95, 98, 103, 105, 109, 114, 119, 121, 125, 264, 275, 278, 284, 289, 293, 298, 303, 308, 315, 318, 322, 327, 329, 333, 338, 343, 345, 349, 356, 363, 366, 369, 373, 378, 383, 388, 395, 398, 401, 405, 410, 415, 418, 423
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
      5: (2,1)
     18: (3,2)
     23: (2,1,1,1)
     25: (1,3,1)
     29: (1,1,2,1)
     68: (4,3)
     75: (3,2,1,1)
     78: (3,1,1,2)
     81: (2,4,1)
     85: (2,2,2,1)
     90: (2,1,2,2)
     95: (2,1,1,1,1,1)
     98: (1,4,2)
    103: (1,3,1,1,1)
    105: (1,2,3,1)
		

Crossrefs

These compositions are counted by A001791.
These are the positions of -1's in A344618.
The non-reverse version is A345910.
The opposite (positive 1) version is A345911.
The version for Heinz numbers of partitions is A345959.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating or reverse-alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,100],sats[stc[#]]==-1&]

A345911 Numbers k such that the k-th composition in standard order (row k of A066099) has reverse-alternating sum 1.

Original entry on oeis.org

1, 6, 7, 20, 21, 26, 27, 30, 31, 72, 73, 82, 83, 86, 87, 92, 93, 100, 101, 106, 107, 110, 111, 116, 117, 122, 123, 126, 127, 272, 273, 290, 291, 294, 295, 300, 301, 312, 313, 324, 325, 330, 331, 334, 335, 340, 341, 346, 347, 350, 351, 360, 361, 370, 371, 374
Offset: 1

Views

Author

Gus Wiseman, Jul 01 2021

Keywords

Comments

The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
     1: (1)
     6: (1,2)
     7: (1,1,1)
    20: (2,3)
    21: (2,2,1)
    26: (1,2,2)
    27: (1,2,1,1)
    30: (1,1,1,2)
    31: (1,1,1,1,1)
    72: (3,4)
    73: (3,3,1)
    82: (2,3,2)
    83: (2,3,1,1)
    86: (2,2,1,2)
    87: (2,2,1,1,1)
		

Crossrefs

These compositions are counted by A000984 (bisection of A126869).
The version for Heinz numbers of partitions is A001105.
A version using runs of binary digits is A066879.
These are positions of 1's in A344618.
The non-reverse version is A345909.
The opposite (negative 1) version is A345912.
The version for prime indices is A345958.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A011782 counts compositions.
A097805 counts compositions by alternating or reverse-alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[0,100],sats[stc[#]]==1&]

A345909 Numbers k such that the k-th composition in standard order (row k of A066099) has alternating sum 1.

Original entry on oeis.org

1, 5, 7, 18, 21, 23, 26, 29, 31, 68, 73, 75, 78, 82, 85, 87, 90, 93, 95, 100, 105, 107, 110, 114, 117, 119, 122, 125, 127, 264, 273, 275, 278, 284, 290, 293, 295, 298, 301, 303, 308, 313, 315, 318, 324, 329, 331, 334, 338, 341, 343, 346, 349, 351, 356, 361
Offset: 1

Views

Author

Gus Wiseman, Jun 30 2021

Keywords

Comments

The alternating sum of a composition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence of terms together with the corresponding compositions begins:
      1: (1)             87: (2,2,1,1,1)
      5: (2,1)           90: (2,1,2,2)
      7: (1,1,1)         93: (2,1,1,2,1)
     18: (3,2)           95: (2,1,1,1,1,1)
     21: (2,2,1)        100: (1,3,3)
     23: (2,1,1,1)      105: (1,2,3,1)
     26: (1,2,2)        107: (1,2,2,1,1)
     29: (1,1,2,1)      110: (1,2,1,1,2)
     31: (1,1,1,1,1)    114: (1,1,3,2)
     68: (4,3)          117: (1,1,2,2,1)
     73: (3,3,1)        119: (1,1,2,1,1,1)
     75: (3,2,1,1)      122: (1,1,1,2,2)
     78: (3,1,1,2)      125: (1,1,1,1,2,1)
     82: (2,3,2)        127: (1,1,1,1,1,1,1)
     85: (2,2,2,1)      264: (5,4)
		

Crossrefs

These compositions are counted by A000984 (bisection of A126869).
The version for prime indices is A001105.
A version using runs of binary digits is A031448.
These are the positions of 1's in A124754.
The opposite (negative 1) version is A345910.
The reverse version is A345911.
The version for Heinz numbers of partitions is A345958.
Standard compositions: A000120, A066099, A070939, A124754, A228351, A344618.
A000070 counts partitions with alternating sum 1 (ranked by A345957).
A000097 counts partitions with alternating sum 2 (ranked by A345960).
A011782 counts compositions.
A097805 counts compositions by sum and alternating sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344610 counts partitions by sum and positive reverse-alternating sum.
A344611 counts partitions of 2n with reverse-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909 (this sequence)/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[stc[#]]==1&]

A346697 Sum of the odd-indexed parts (odd bisection) of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 01 2021

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.

Examples

			The prime indices of 1100 are {1,1,3,3,5}, so a(1100) = 1 + 3 + 5 = 9.
The prime indices of 2100 are {1,1,2,3,3,4}, so a(2100) = 1 + 2 + 3 = 6.
		

Crossrefs

The version for standard compositions is A209281(n+1) (even: A346633).
Subtracting the even version gives A316524 (reverse: A344616).
The even version is A346698.
The reverse version is A346699.
The even reverse version is A346700.
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A000302 counts compositions with odd alternating sum, ranked by A053738.
A001414 adds up prime factors, row sums of A027746.
A029837 adds up parts of standard compositions (alternating: A124754).
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[First/@Partition[Append[primeMS[n],0],2]],{n,100}]

Formula

a(n) = A056239(n) - A346698(n).
a(n) = A316524(n) + A346698(n).
a(n odd omega) = A346699(n).
a(n even omega) = A346700(n).
A344616(n) = A346699(n) - A346700(n).

A346698 Sum of the even-indexed parts (even bisection) of the multiset of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 01 2021

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.

Examples

			The prime indices of 1100 are {1,1,3,3,5}, so a(1100) = 1 + 3 = 4.
The prime indices of 2100 are {1,1,2,3,3,4}, so a(2100) = 1 + 3 + 4 = 8.
		

Crossrefs

Subtracting from the odd version gives A316524 (reverse: A344616).
The version for standard compositions is A346633 (odd: A209281(n+1)).
The odd version is A346697.
The even reverse version is A346699.
The reverse version is A346700.
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A001414 adds up prime factors, row-sums of A027746.
A029837 adds up parts of standard compositions (alternating: A124754).
A056239 adds up prime indices, row-sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[Last/@Partition[Append[primeMS[n],0],2]],{n,100}]
  • PARI
    A346698(n) = if(1==n,0,my(f=factor(n),s=0,p=0); for(k=1,#f~,while(f[k,2], s += (p%2)*primepi(f[k,1]); f[k,2]--; p++)); (s)); \\ Antti Karttunen, Nov 30 2021

Formula

a(n) = A056239(n) - A346697(n).
a(n) = A346697(n) - A316524(n).
a(n even omega) = A346699(n).
a(n odd omega) = A346700(n).
A344616(n) = A346699(n) - A346700(n).

Extensions

Data section extended up to 105 terms by Antti Karttunen, Nov 30 2021

A346704 Product of primes at even positions in the weakly increasing list (with multiplicity) of prime factors of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 2, 3, 5, 1, 2, 1, 7, 5, 4, 1, 3, 1, 2, 7, 11, 1, 6, 5, 13, 3, 2, 1, 3, 1, 4, 11, 17, 7, 6, 1, 19, 13, 10, 1, 3, 1, 2, 3, 23, 1, 4, 7, 5, 17, 2, 1, 9, 11, 14, 19, 29, 1, 10, 1, 31, 3, 8, 13, 3, 1, 2, 23, 5, 1, 6, 1, 37, 5, 2, 11, 3, 1, 4, 9
Offset: 1

Views

Author

Gus Wiseman, Aug 08 2021

Keywords

Examples

			The prime factors of 108 are (2,2,3,3,3), with even bisection (2,3), with product 6, so a(108) = 6.
The prime factors of 720 are (2,2,2,2,3,3,5), with even bisection (2,2,3), with product 12, so a(720) = 12.
		

Crossrefs

Positions of first appearances are A129597.
Positions of 1's are A008578.
Positions of primes are A168645.
The sum of prime indices of a(n) is A346698(n).
The odd version is A346703 (sum: A346697).
The odd reverse version is A346701 (sum: A346699).
The reverse version appears to be A329888 (sum: A346700).
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A027187 counts partitions of even length, ranked by A028260.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433/A335448 rank separable/inseparable partitions.
A344606 counts alternating permutations of prime indices.
A344617 gives the sign of the alternating sum of prime indices.
A346633 adds up the even bisection of standard compositions.

Programs

  • Maple
    f:= proc(n) local F,i;
      F:= ifactors(n)[2];
      F:= sort(map(t -> t[1]$t[2],F));
      mul(F[i],i=2..nops(F),2)
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 12 2024
  • Mathematica
    Table[Times@@Last/@Partition[Flatten[Apply[ConstantArray,FactorInteger[n],{1}]],2],{n,100}]

Formula

a(n) * A346703(n) = n.
A056239(a(n)) = A346698(n).

A347450 Numbers whose multiset of prime indices has alternating product <= 1.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 10, 14, 15, 16, 18, 21, 22, 24, 25, 26, 32, 33, 34, 35, 36, 38, 39, 40, 46, 49, 50, 51, 54, 55, 56, 57, 58, 60, 62, 64, 65, 69, 72, 74, 77, 81, 82, 84, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 98, 100, 104, 106, 111, 115, 118, 119, 121, 122
Offset: 1

Views

Author

Gus Wiseman, Sep 24 2021

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.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
Also Heinz numbers integer partitions with reverse-alternating product <= 1, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
Also numbers whose multiset of prime indices has alternating sum <= 1.

Examples

			The initial terms and their prime indices:
      1: {}            26: {1,6}           56: {1,1,1,4}
      2: {1}           32: {1,1,1,1,1}     57: {2,8}
      4: {1,1}         33: {2,5}           58: {1,10}
      6: {1,2}         34: {1,7}           60: {1,1,2,3}
      8: {1,1,1}       35: {3,4}           62: {1,11}
      9: {2,2}         36: {1,1,2,2}       64: {1,1,1,1,1,1}
     10: {1,3}         38: {1,8}           65: {3,6}
     14: {1,4}         39: {2,6}           69: {2,9}
     15: {2,3}         40: {1,1,1,3}       72: {1,1,1,2,2}
     16: {1,1,1,1}     46: {1,9}           74: {1,12}
     18: {1,2,2}       49: {4,4}           77: {4,5}
     21: {2,4}         50: {1,3,3}         81: {2,2,2,2}
     22: {1,5}         51: {2,7}           82: {1,13}
     24: {1,1,1,2}     54: {1,2,2,2}       84: {1,1,2,4}
     25: {3,3}         55: {3,5}           85: {3,7}
		

Crossrefs

The additive version (alternating sum <= 0) is A028260.
The reverse version is A028982, counted by A119620.
Allowing any alternating product < 1 gives A119899.
Factorizations of this type are counted by A339846, complement A339890.
Allowing any alternating product >= 1 gives A344609, multiplicative A347456.
Partitions of this type are counted by A347443.
Allowing any integer alternating product gives A347454, reciprocal A347451.
The complement is A347465, reverse A028983, counted by A347448.
A056239 adds up prime indices, row sums of A112798.
A236913 counts partitions of 2n with reverse-alternating sum <= 0.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433 lists numbers whose prime indices are separable, complement A335448.
A344606 counts alternating permutations of prime indices.
A347457 lists Heinz numbers of partitions with integer alternating product.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Select[Range[100],altprod[primeMS[#]]<=1&]

Formula

Union of A028982 and A119899.
Union of A028260 and A001105.

A346703 Product of primes at odd positions in the weakly increasing list (with multiplicity) of prime factors of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 4, 3, 2, 11, 6, 13, 2, 3, 4, 17, 6, 19, 10, 3, 2, 23, 4, 5, 2, 9, 14, 29, 10, 31, 8, 3, 2, 5, 6, 37, 2, 3, 4, 41, 14, 43, 22, 15, 2, 47, 12, 7, 10, 3, 26, 53, 6, 5, 4, 3, 2, 59, 6, 61, 2, 21, 8, 5, 22, 67, 34, 3, 14, 71, 12, 73, 2, 15, 38
Offset: 1

Views

Author

Gus Wiseman, Aug 08 2021

Keywords

Examples

			The prime factors of 108 are (2,2,3,3,3), with odd bisection (2,3,3), with product 18, so a(108) = 18.
The prime factors of 720 are (2,2,2,2,3,3,5), with odd bisection (2,2,3,5), with product 60, so a(720) = 60.
		

Crossrefs

Positions of 2's are A001747.
Positions of primes are A037143 (complement: A033942).
The even reverse version appears to be A329888.
Positions of first appearances are A342768.
The sum of prime indices of a(n) is A346697(n), reverse: A346699.
The reverse version is A346701.
The even version is A346704.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A209281 (shifted) adds up the odd bisection of standard compositions.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433/A335448 rank separable/inseparable partitions.
A344606 counts alternating permutations of prime indices.
A344617 gives the sign of the alternating sum of prime indices.
A346633 adds up the even bisection of standard compositions.
A346698 gives the sum of the even bisection of prime indices.
A346700 gives the sum of the even bisection of reversed prime indices.

Programs

  • Mathematica
    Table[Times@@First/@Partition[Append[Flatten[Apply[ConstantArray,FactorInteger[n],{1}]],0],2],{n,100}]

Formula

a(n) * A346704(n) = n.
A056239(a(n)) = A346697(n).

A346700 Sum of the even bisection (even-indexed parts) of the integer partition with Heinz number n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 03 2021

Keywords

Comments

First differs from A334107 at a(64) = 3, A334107(64) = 2.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The partition with Heinz number 1100 is (5,3,3,1,1), so a(1100) = 3 + 1 = 4.
The partition with Heinz number 2100 is (4,3,3,2,1,1), so a(2100) = 3 + 2 + 1 = 6.
		

Crossrefs

Sum of prime indices of A329888(n).
Subtracting from the odd version gives A344616 (non-reverse: A316524).
The unreversed version for standard compositions is A346633.
The odd non-reverse version is A346697.
The non-reverse version (multisets instead of partitions) is A346698.
The odd version is A346699.
A001414 adds up prime factors, row sums of A027746.
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[Last/@Partition[Reverse[primeMS[n]],2]],{n,100}]
  • PARI
    A346700(n) = if(1==n,0,my(f=factor(n),s=0,p=0); forstep(k=#f~,1,-1,while(f[k,2], s += (p%2)*primepi(f[k,1]); f[k,2]--; p++)); (s)); \\ Antti Karttunen, Sep 21 2021

Formula

a(n) = A056239(n) - A346699(n).
a(n) = A346699(n) - A344616(n).
a(n even omega) = A346697(n).
a(n odd omega) = A346698(n).
A316524(n) = A346697(n) - A346698(n).
a(n) = A056239(A329888(n)). - Gus Wiseman and Antti Karttunen, Oct 13 2021

Extensions

Data section extended up to 105 terms by Antti Karttunen, Sep 21 2021

A347453 Heinz numbers of odd-length integer partitions with integer alternating (or reverse-alternating) product.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 12, 13, 17, 18, 19, 20, 23, 27, 28, 29, 31, 32, 37, 41, 42, 43, 44, 45, 47, 48, 50, 52, 53, 59, 61, 63, 67, 68, 71, 72, 73, 75, 76, 78, 79, 80, 83, 89, 92, 97, 98, 99, 101, 103, 107, 108, 109, 112, 113, 114, 116, 117, 124, 125, 127, 128, 130
Offset: 1

Views

Author

Gus Wiseman, Sep 24 2021

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
Also numbers whose multiset of prime indices has odd length and integer alternating product, where a prime index of n is a number m such that prime(m) divides n.

Examples

			The terms and their prime indices begin:
      2: {1}         29: {10}            61: {18}
      3: {2}         31: {11}            63: {2,2,4}
      5: {3}         32: {1,1,1,1,1}     67: {19}
      7: {4}         37: {12}            68: {1,1,7}
      8: {1,1,1}     41: {13}            71: {20}
     11: {5}         42: {1,2,4}         72: {1,1,1,2,2}
     12: {1,1,2}     43: {14}            73: {21}
     13: {6}         44: {1,1,5}         75: {2,3,3}
     17: {7}         45: {2,2,3}         76: {1,1,8}
     18: {1,2,2}     47: {15}            78: {1,2,6}
     19: {8}         48: {1,1,1,1,2}     79: {22}
     20: {1,1,3}     50: {1,3,3}         80: {1,1,1,1,3}
     23: {9}         52: {1,1,6}         83: {23}
     27: {2,2,2}     53: {16}            89: {24}
     28: {1,1,4}     59: {17}            92: {1,1,9}
		

Crossrefs

The reciprocal version is A000290.
Allowing any alternating product <= 1 gives A001105.
Allowing any alternating product gives A026424.
Factorizations of this type are counted by A347441.
These partitions are counted by A347444.
Allowing any length gives A347454.
Allowing any alternating product > 1 gives A347465.
A027193 counts odd-length partitions.
A056239 adds up prime indices, row sums of A112798.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433 lists numbers whose prime indices are separable, complement A335448.
A344606 counts alternating permutations of prime indices.
A347446 counts partitions with integer alternating product.
A347457 ranks partitions with integer alt product, complement A347455.
A347461 counts possible alternating products of partitions.
A347462 counts possible reverse-alternating products of partitions.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Select[Range[100],OddQ[PrimeOmega[#]]&&IntegerQ[altprod[primeMS[#]]]&]
Showing 1-10 of 27 results. Next