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 10 results.

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

Original entry on oeis.org

2, 11, 12, 14, 37, 40, 42, 47, 51, 52, 54, 59, 60, 62, 137, 144, 146, 151, 157, 163, 164, 166, 171, 172, 174, 181, 184, 186, 191, 197, 200, 202, 207, 211, 212, 214, 219, 220, 222, 229, 232, 234, 239, 243, 244, 246, 251, 252, 254, 529, 544, 546, 551, 557, 569
Offset: 1

Views

Author

Gus Wiseman, Jul 10 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 initial terms and the corresponding compositions:
      2: (2)            144: (3,5)
     11: (2,1,1)        146: (3,3,2)
     12: (1,3)          151: (3,2,1,1,1)
     14: (1,1,2)        157: (3,1,1,2,1)
     37: (3,2,1)        163: (2,4,1,1)
     40: (2,4)          164: (2,3,3)
     42: (2,2,2)        166: (2,3,1,2)
     47: (2,1,1,1,1)    171: (2,2,2,1,1)
     51: (1,3,1,1)      172: (2,2,1,3)
     52: (1,2,3)        174: (2,2,1,1,2)
     54: (1,2,1,2)      181: (2,1,2,2,1)
     59: (1,1,2,1,1)    184: (2,1,1,4)
     60: (1,1,1,3)      186: (2,1,1,2,2)
     62: (1,1,1,1,2)    191: (2,1,1,1,1,1,1)
    137: (4,3,1)        197: (1,4,2,1)
		

Crossrefs

These compositions are counted by A088218.
The case of partitions is counted by A120452.
These are the positions of 2's in A344618.
The opposite (negative 2) version is A345923.
The version for unreversed alternating sum is A345925.
The version for Heinz numbers of partitions is A345961.
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.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
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[#]]==2&]

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

Original entry on oeis.org

9, 34, 39, 45, 49, 57, 132, 139, 142, 149, 154, 159, 161, 169, 178, 183, 189, 194, 199, 205, 209, 217, 226, 231, 237, 241, 249, 520, 531, 534, 540, 549, 554, 559, 564, 571, 574, 577, 585, 594, 599, 605, 612, 619, 622, 629, 634, 639, 642, 647, 653, 657, 665
Offset: 1

Views

Author

Gus Wiseman, Jul 10 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 initial terms and the corresponding compositions:
      9: (3,1)            183: (2,1,2,1,1,1)
     34: (4,2)            189: (2,1,1,1,2,1)
     39: (3,1,1,1)        194: (1,5,2)
     45: (2,1,2,1)        199: (1,4,1,1,1)
     49: (1,4,1)          205: (1,3,1,2,1)
     57: (1,1,3,1)        209: (1,2,4,1)
    132: (5,3)            217: (1,2,1,3,1)
    139: (4,2,1,1)        226: (1,1,4,2)
    142: (4,1,1,2)        231: (1,1,3,1,1,1)
    149: (3,2,2,1)        237: (1,1,2,1,2,1)
    154: (3,1,2,2)        241: (1,1,1,4,1)
    159: (3,1,1,1,1,1)    249: (1,1,1,1,3,1)
    161: (2,5,1)          520: (6,4)
    169: (2,2,3,1)        531: (5,3,1,1)
    178: (2,1,3,2)        534: (5,2,1,2)
		

Crossrefs

These compositions are counted by A088218.
These are the positions of 2's in A344618.
The case of partitions of 2n is A344741.
The opposite (negative 2) version is A345923.
The version for unreversed alternating sum is A345925.
The version for Heinz numbers of partitions is A345961.
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).
A120452 counts partitions of 2n with reverse-alternating sum 2.
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.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
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[#]]==-2&]

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

Original entry on oeis.org

12, 40, 49, 51, 54, 60, 144, 161, 163, 166, 172, 184, 194, 197, 199, 202, 205, 207, 212, 217, 219, 222, 232, 241, 243, 246, 252, 544, 577, 579, 582, 588, 600, 624, 642, 645, 647, 650, 653, 655, 660, 665, 667, 670, 680, 689, 691, 694, 700, 720, 737, 739, 742
Offset: 1

Views

Author

Gus Wiseman, Jul 11 2021

Keywords

Comments

The alternating sum of a sequence (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 initial terms and the corresponding compositions:
     12: (1,3)          202: (1,3,2,2)        582: (3,4,1,2)
     40: (2,4)          205: (1,3,1,2,1)      588: (3,3,1,3)
     49: (1,4,1)        207: (1,3,1,1,1,1)    600: (3,2,1,4)
     51: (1,3,1,1)      212: (1,2,2,3)        624: (3,1,1,5)
     54: (1,2,1,2)      217: (1,2,1,3,1)      642: (2,6,2)
     60: (1,1,1,3)      219: (1,2,1,2,1,1)    645: (2,5,2,1)
    144: (3,5)          222: (1,2,1,1,1,2)    647: (2,5,1,1,1)
    161: (2,5,1)        232: (1,1,2,4)        650: (2,4,2,2)
    163: (2,4,1,1)      241: (1,1,1,4,1)      653: (2,4,1,2,1)
    166: (2,3,1,2)      243: (1,1,1,3,1,1)    655: (2,4,1,1,1,1)
    172: (2,2,1,3)      246: (1,1,1,2,1,2)    660: (2,3,2,3)
    184: (2,1,1,4)      252: (1,1,1,1,1,3)    665: (2,3,1,3,1)
    194: (1,5,2)        544: (4,6)            667: (2,3,1,2,1,1)
    197: (1,4,2,1)      577: (3,6,1)          670: (2,3,1,1,1,2)
    199: (1,4,1,1,1)    579: (3,5,1,1)        680: (2,2,2,4)
		

Crossrefs

These compositions are counted by A002054.
These are the positions of -2's in A124754.
The version for reverse-alternating sum is A345923.
The opposite (positive 2) version is A345925.
The version for Heinz numbers of partitions is A345962.
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).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
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;
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[stc[#]]==-2&]

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

Original entry on oeis.org

2, 9, 11, 14, 34, 37, 39, 42, 45, 47, 52, 57, 59, 62, 132, 137, 139, 142, 146, 149, 151, 154, 157, 159, 164, 169, 171, 174, 178, 181, 183, 186, 189, 191, 200, 209, 211, 214, 220, 226, 229, 231, 234, 237, 239, 244, 249, 251, 254, 520, 529, 531, 534, 540, 546
Offset: 1

Views

Author

Gus Wiseman, Jul 11 2021

Keywords

Comments

The alternating sum of a sequence (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 initial terms and corresponding compositions:
      2: (2)            137: (4,3,1)
      9: (3,1)          139: (4,2,1,1)
     11: (2,1,1)        142: (4,1,1,2)
     14: (1,1,2)        146: (3,3,2)
     34: (4,2)          149: (3,2,2,1)
     37: (3,2,1)        151: (3,2,1,1,1)
     39: (3,1,1,1)      154: (3,1,2,2)
     42: (2,2,2)        157: (3,1,1,2,1)
     45: (2,1,2,1)      159: (3,1,1,1,1,1)
     47: (2,1,1,1,1)    164: (2,3,3)
     52: (1,2,3)        169: (2,2,3,1)
     57: (1,1,3,1)      171: (2,2,2,1,1)
     59: (1,1,2,1,1)    174: (2,2,1,1,2)
     62: (1,1,1,1,2)    178: (2,1,3,2)
    132: (5,3)          181: (2,1,2,2,1)
		

Crossrefs

These compositions are counted by A088218.
These are the positions of 2's in A124754.
The case of partitions of 2n is A344741.
The version for reverse-alternating sum is A345922.
The opposite (negative 2) version is A345924.
The version for Heinz numbers of partitions is A345960 (reverse: A345961).
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).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A345197 counts compositions by sum, length, and alternating sum.
Standard compositions: A000120, A066099, A070939, A228351, A124754, A344618.
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;
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[stc[#]]==2&]

A345958 Numbers whose prime indices have reverse-alternating sum 1.

Original entry on oeis.org

2, 6, 8, 15, 18, 24, 32, 35, 50, 54, 60, 72, 77, 96, 98, 128, 135, 140, 143, 150, 162, 200, 216, 221, 240, 242, 288, 294, 308, 315, 323, 338, 375, 384, 392, 437, 450, 486, 512, 540, 560, 572, 578, 600, 648, 667, 693, 722, 726, 735, 800, 864, 875, 882, 884, 899
Offset: 1

Views

Author

Gus Wiseman, Jul 11 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.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. Of course, the reverse-alternating sum of prime indices is also the alternating sum of reversed prime indices.
Also numbers with exactly one odd conjugate prime index. Conjugate prime indices are listed by A321650, ranked by A122111.

Examples

			The initial terms and their prime indices:
   2: {1}
   6: {1,2}
   8: {1,1,1}
  15: {2,3}
  18: {1,2,2}
  24: {1,1,1,2}
  32: {1,1,1,1,1}
  35: {3,4}
  50: {1,3,3}
  54: {1,2,2,2}
  60: {1,1,2,3}
  72: {1,1,1,2,2}
  77: {4,5}
  96: {1,1,1,1,1,2}
  98: {1,4,4}
		

Crossrefs

The k > 0 version is A000037.
These multisets are counted by A000070.
The k = 0 version is A000290, counted by A000041.
The version for unreversed-alternating sum is A001105.
These partitions are counted by A035363.
These are the positions of 1's in A344616.
The k = 2 version is A345961, counted by A120452.
A000984/A345909/A345911 count/rank compositions with alternating sum 1.
A001791/A345910/A345912 count/rank compositions with alternating sum -1.
A088218 counts compositions with alternating sum 0, ranked by A344619.
A025047 counts wiggly compositions.
A027187 counts partitions with reverse-alternating sum <= 0.
A056239 adds up prime indices, row sums of A112798.
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.
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.
A344607 counts partitions with reverse-alternating sum >= 0.
A344610 counts partitions by sum and positive reverse-alternating sum.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[100],sats[primeMS[#]]==1&]

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).

A345959 Numbers whose prime indices have alternating sum -1.

Original entry on oeis.org

6, 15, 24, 35, 54, 60, 77, 96, 135, 140, 143, 150, 216, 221, 240, 294, 308, 315, 323, 375, 384, 437, 486, 540, 560, 572, 600, 667, 693, 726, 735, 864, 875, 884, 899, 960, 1014, 1147, 1176, 1215, 1232, 1260, 1287, 1292, 1350, 1500, 1517, 1536, 1715, 1734, 1748
Offset: 1

Views

Author

Gus Wiseman, Jul 12 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.
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 indices is also the reverse-alternating sum of reversed prime indices.
Also numbers with even Omega (A001222) and exactly one odd conjugate prime index. Conjugate prime indices are listed by A321650, ranked by A122111.

Examples

			The initial terms and their prime indices:
    6: {1,2}
   15: {2,3}
   24: {1,1,1,2}
   35: {3,4}
   54: {1,2,2,2}
   60: {1,1,2,3}
   77: {4,5}
   96: {1,1,1,1,1,2}
  135: {2,2,2,3}
  140: {1,1,3,4}
  143: {5,6}
  150: {1,2,3,3}
  216: {1,1,1,2,2,2}
  221: {6,7}
  240: {1,1,1,1,2,3}
		

Crossrefs

These multisets are counted by A000070.
The k = 0 version is A000290, counted by A000041.
The k = 1 version is A001105.
The k > 0 version is A026424.
These are the positions of -1's in A316524.
The k = 2 version is A345960.
The k = -2 version is A345962.
A000984/A345909/A345911 count/rank compositions with alternating sum 1.
A001791/A345910/A345912 count/rank compositions with alternating sum -1.
A027187 counts partitions with reverse-alternating sum <= 0.
A056239 adds up prime indices, row sums of A112798.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534/A325535 count separable/inseparable partitions.
A344607 counts partitions with reverse-alternating sum >= 0.
A344616 gives the alternating sum of reversed prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[primeMS[#]]==-1&]

A345960 Numbers whose prime indices have alternating sum 2.

Original entry on oeis.org

3, 12, 27, 30, 48, 70, 75, 108, 120, 147, 154, 192, 243, 270, 280, 286, 300, 363, 432, 442, 480, 507, 588, 616, 630, 646, 675, 750, 768, 867, 874, 972, 1080, 1083, 1120, 1144, 1200, 1323, 1334, 1386, 1452, 1470, 1587, 1728, 1750, 1768, 1798, 1875, 1920, 2028
Offset: 1

Views

Author

Gus Wiseman, Jul 12 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.
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 indices is also the reverse-alternating sum of reversed prime indices.
Also numbers with odd Omega (A001222) and exactly two odd conjugate prime indices. The version for even Omega is A345962, and the union is A345961. Conjugate prime indices are listed by A321650 and ranked by A122111.

Examples

			The initial terms and their prime indices:
    3: {2}
   12: {1,1,2}
   27: {2,2,2}
   30: {1,2,3}
   48: {1,1,1,1,2}
   70: {1,3,4}
   75: {2,3,3}
  108: {1,1,2,2,2}
  120: {1,1,1,2,3}
  147: {2,4,4}
  154: {1,4,5}
  192: {1,1,1,1,1,1,2}
  243: {2,2,2,2,2}
  270: {1,2,2,2,3}
  280: {1,1,1,3,4}
  286: {1,5,6}
  300: {1,1,2,3,3}
		

Crossrefs

These partitions are counted by A000097.
The k = 0 version is A000290, counted by A000041.
The k = 1 version is A001105 (reverse: A345958).
The k > 0 version is A026424.
These multisets are counted by A120452.
These are the positions of 2's in A316524 (reverse: A344616).
The k = -1 version is A345959.
The version for reversed alternating sum is A345961.
The k = -2 version is A345962.
A000984/A345909/A345911 count/rank compositions with alternating sum 1.
A002054/A345924/A345923 count/rank compositions with alternating sum -2.
A056239 adds up prime indices, row sums of A112798.
A088218/A345925/A345922 count/rank compositions with alternating sum 2.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[primeMS[#]]==2&]

A345926 Number of distinct possible alternating sums of permutations of the multiset of prime indices 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, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3
Offset: 1

Views

Author

Gus Wiseman, Jul 14 2021

Keywords

Comments

First differs from A096825 at a(90) = 3, A096825(90) = 4.
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 alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime indices is also the reverse-alternating sum of reversed prime indices.
Also the number of possible values of A056239(d) where d is a divisor of n with half as many prime factors (rounded up) as n.

Examples

			Grouping the 12 permutations of {1,2,2,3} by alternating sum k gives:
  k = -2: (1223) (1322) (2213) (2312)
  k =  0: (1232) (2123) (2321) (3212)
  k =  2: (2132) (2231) (3122) (3221)
so a(90) = 3.
		

Crossrefs

The version for prime factors instead of indices is A343943.
A000005 counts divisors.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A001414 adds up prime factors, row sums of A027746.
A056239 adds up prime indices, row sums of A112798.
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).
A345197 counts compositions by length and alternating sum.
A344610 counts partitions by sum and positive reverse-alternating sum.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Union[ats/@Permutations[primeMS[n]]]],{n,100}]
  • Python
    from sympy import factorint, primepi
    from sympy.utilities.iterables import multiset_combinations
    def A345926(n):
        fs = dict((primepi(a),b) for (a,b) in factorint(n).items())
        return len(set(sum(d) for d in multiset_combinations(fs, (sum(fs.values())+1)//2))) # Chai Wah Wu, Aug 23 2021

A345962 Numbers whose prime indices have alternating sum -2.

Original entry on oeis.org

10, 21, 40, 55, 84, 90, 91, 160, 187, 189, 210, 220, 247, 250, 336, 360, 364, 391, 462, 490, 495, 525, 551, 640, 713, 748, 756, 810, 819, 840, 858, 880, 988, 1000, 1029, 1073, 1155, 1210, 1271, 1326, 1344, 1375, 1440, 1456, 1564, 1591, 1683, 1690, 1701, 1848
Offset: 1

Views

Author

Gus Wiseman, Jul 12 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.
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 indices is also the reverse-alternating sum of reversed prime indices.
Also numbers with even Omega (A001222) and exactly two odd conjugate prime indices. The case of odd Omega is A345960, and the union is A345961.

Examples

			The initial terms and their prime indices:
   10: {1,3}
   21: {2,4}
   40: {1,1,1,3}
   55: {3,5}
   84: {1,1,2,4}
   90: {1,2,2,3}
   91: {4,6}
  160: {1,1,1,1,1,3}
  187: {5,7}
  189: {2,2,2,4}
  210: {1,2,3,4}
  220: {1,1,3,5}
  247: {6,8}
  250: {1,3,3,3}
  336: {1,1,1,1,2,4}
  360: {1,1,1,2,2,3}
		

Crossrefs

Below we use k to indicate alternating sum.
The k = 0 version is A000290, counted by A000041.
The k = 1 version is A001105 (reverse: A345958).
The k > 0 version is A026424.
These are the positions of -2's in A316524.
These multisets are counted by A344741 (positive 2: A120452).
The k = -1 version is A345959.
The k = 2 version is A345960, counted by A000097.
A002054/A345924/A345923 count/rank compositions with alternating sum -2.
A056239 adds up prime indices, row sums of A112798.
A088218/A345925/A345922 count/rank compositions with alternating sum 2.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Select[Range[0,100],ats[primeMS[#]]==-2&]
Showing 1-10 of 10 results.