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

A344651 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with alternating sum k, with k ranging from n mod 2 to n in steps of 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 1, 4, 2, 1, 3, 5, 2, 1, 7, 5, 2, 1, 5, 9, 5, 2, 1, 12, 10, 5, 2, 1, 7, 17, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 11, 28, 20, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 15, 47, 35, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 22, 73, 62, 36, 20, 10, 5, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2021

Keywords

Comments

The alternating sum of a partition (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. This is equal to the number of odd parts in the conjugate partition, so T(n,k) is the number of integer partitions of n with k odd parts in the conjugate partition, which is also the number of partitions of n with k odd parts.
Also the number of integer partitions of n with odd-indexed parts (odd bisection) summing to k, ceiling(n/2) <= k <= n. The even-indexed version is A346633. - Gus Wiseman, Nov 29 2021

Examples

			Triangle begins:
   1
   1
   1   1
   2   1
   2   2   1
   4   2   1
   3   5   2   1
   7   5   2   1
   5   9   5   2   1
  12  10   5   2   1
   7  17  10   5   2   1
  19  19  10   5   2   1
  11  28  20  10   5   2   1
  30  33  20  10   5   2   1
  15  47  35  20  10   5   2   1
  45  57  36  20  10   5   2   1
  22  73  62  36  20  10   5   2   1
  67  92  64  36  20  10   5   2   1
  30 114 102  65  36  20  10   5   2   1
  97 147 107  65  36  20  10   5   2   1
Row n = 10 counts the following partitions (A = 10):
  (55)          (64)         (73)       (82)     (91)   (A)
  (3322)        (442)        (433)      (622)    (811)
  (4411)        (541)        (532)      (721)
  (222211)      (3331)       (631)      (7111)
  (331111)      (4222)       (5221)     (61111)
  (22111111)    (4321)       (6211)
  (1111111111)  (5311)       (42211)
                (22222)      (52111)
                (32221)      (511111)
                (33211)      (4111111)
                (43111)
                (322111)
                (421111)
                (2221111)
                (3211111)
                (31111111)
                (211111111)
The conjugate version is:
  (A)      (55)      (3331)     (331111)    (31111111)   (1111111111)
  (64)     (73)      (5311)     (511111)    (211111111)
  (82)     (91)      (7111)     (3211111)
  (442)    (433)     (33211)    (4111111)
  (622)    (532)     (43111)    (22111111)
  (4222)   (541)     (52111)
  (22222)  (631)     (61111)
           (721)     (322111)
           (811)     (421111)
           (3322)    (2221111)
           (4321)
           (4411)
           (5221)
           (6211)
           (32221)
           (42211)
           (222211)
		

Crossrefs

This is A103919 with all zeros removed.
The strict version is A152146 interleaved with A152157.
The rows are those of A239830 interleaved with those of A239829.
The reverse version is the right half of A344612.
The strict reverse version is the right half of A344739.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A027187 counts partitions with rev-alternating sum <= 0, ranked by A028260.
A124754 lists alternating sums of standard compositions (reverse: A344618).
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A325534/A325535 count separable/inseparable partitions.
A344607 counts partitions with rev-alternating sum >= 0, ranked by A344609.
A344608 counts partitions with rev-alternating sum < 0, ranked by A119899.
A344610 counts partitions of n by positive rev-alternating sum.
A344611 counts partitions of 2n with rev-alternating sum >= 0.
A345197 counts compositions by sum, length, and alternating sum.
A346697 gives the sum of odd-indexed prime indices (reverse: A346699).
A346702 represents the odd bisection of compositions, sums A209281.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[IntegerPartitions[n],ats[#]==k&]],{n,0,15},{k,Mod[n,2],n,2}]

A345957 Number of divisors of n with exactly half as many prime factors as n, counting multiplicity.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 16 2021

Keywords

Comments

These divisors do not necessarily include the central divisors (A207375), and may not themselves be central.

Examples

			The a(n) divisors for selected n:
  n = 1:  6:  36:  60:  210:  840:  900:  1260:  1296:  3600:
     --------------------------------------------------------
      1   2    4    4     6     8    12     12     16     16
          3    6    6    10    12    18     18     24     24
               9   10    14    20    20     20     36     36
                   15    15    28    30     28     54     40
                         21    30    45     30     81     60
                         35    42    50     42            90
                               70    75     45           100
                              105           63           150
                                            70           225
                                           105
		

Crossrefs

The case of powers of 2 is A000035.
Positions of even terms are A000037.
Positions of odd terms are A000290.
Positions of 0's are A026424.
Positions of 1's are A056798.
The rounded version is A096825.
The case of all divisors (not just 2) is A347042.
The smallest of these divisors is A347045 (rounded: A347043).
The greatest of these divisors is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A334997 counts chains of divisors of n by length.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n],PrimeOmega[#]==PrimeOmega[n]/2&]],{n,100}]
  • PARI
    a(n) = my(nb=bigomega(n)); sumdiv(n, d, 2*bigomega(d) == nb); \\ Michel Marcus, Aug 16 2021
    
  • Python
    from sympy import divisors, factorint
    def a(n):
        npf = len(factorint(n, multiple=True))
        divs = divisors(n)
        return sum(2*len(factorint(d, multiple=True)) == npf for d in divs)
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 17 2021
    (Python 3.8+)
    from itertools import combinations
    from math import prod, comb
    from sympy import factorint
    def A345957(n):
        if n == 1:
            return 1
        fs = factorint(n)
        elist = list(fs.values())
        q, r = divmod(sum(elist),2)
        k = len(elist)
        if r:
            return 0
        c = 0
        for i in range(k+1):
            m = (-1)**i
            for d in combinations(range(k),i):
                t = k+q-sum(elist[j] for j in d)-i-1
                if t >= 0:
                    c += m*comb(t,k-1)
        return c # Chai Wah Wu, Aug 20 2021
    
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A345957(n):
        if n == 1:
            return 1
        fs = factorint(n,multiple=True)
        q, r = divmod(len(fs),2)
        return 0 if r else len(list(multiset_combinations(fs,q))) # Chai Wah Wu, Aug 20 2021

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

A209281 Start with first run [0,1] then, for n >= 2, the n-th run has length 2^n and is the concatenation of [a(1),a(2),...,a(2^n/2)] and [n-a(1),n-a(2),...,n-a(2^n/2)].

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jan 16 2013

Keywords

Comments

Also the sum of the odd bisection (odd-indexed parts) of the (n-1)-th composition in standard order, where 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. Note that this sequence counts {} as composition number 1 (instead of the usual 0). For example, composition number 741 in standard order is (2,1,1,3,2,1), with odd bisection (2,1,2), so a(742) = 2 + 1 + 2 = 5. - Gus Wiseman, Aug 24 2021

Examples

			[0,1] -> [0,1] U [2-0,2-1] =
[0,1,2,1] -> [0,1,2,1] U [3-0,3-1,3-2,3-1] =
[0,1,2,1,3,2,1,2] etc.
From _Gus Wiseman_, Aug 08 2021: (Start)
As a triangle without the initial 0, row-lengths A000079:
  1
  2 1
  3 2 1 2
  4 3 2 3 1 2 3 2
  5 4 3 4 2 3 4 3 1 2 3 2 4 3 2 3
  6 5 4 5 3 4 5 4 2 3 4 3 5 4 3 4 1 2 3 2 4 3 2 3 5 4 3 4 2 3 4 3
(End)
		

Crossrefs

Cf. A010060 (Thue-Morse), A103204 (indices of 1's).
Cf. A029837 (binary order), A000120 (binary weight), A006068 (inverse Gray), A272020 (bit positions).
Cf. A089215.
As a triangle: A000079 (row lengths), A001792 (row sums).
Other composition part sums: A124754. A346633.
Also the sum of row A346702(n-1) of A066099.
Cf. A346697 (on prime indices).

Programs

  • Mathematica
    Table[Total[First/@Partition[Append[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse,0],2]],{n,0,100}] (* Gus Wiseman, Aug 08 2021 *)
  • PARI
    /* compute 2^15 terms */ v=[0,1];for(n=2,15,v=concat(v,vector(2^n/2,i,n-v[i]));a(n)=v[n];)
    
  • PARI
    a(n) = n--; my(s=1,ns); while((ns=n>>s), n=bitxor(n,ns); s<<=1); hammingweight(n); \\ Kevin Ryde, May 14 2022

Formula

Let T(n)=A010060(n) then for n>=1 a(2n)=a(n)+1-T(n-1) and a(2n+1)=a(n+1)+T(n).
For n>=2 a(n) = a(ceiling(n/2))+T(n-1) hence:
a(n) = Sum_{k=0..ceiling(log(n-1)/log(2))} T(floor((n-1)/2^k)).
For k>=0 a(3*2^k+1)=1 (more precisely a(n)=1 iff n is in A103204), a(2^k+1)=k+1, a(5*2^k+1)=2, a(7*2^k+1)=k+2 etc.
From Gus Wiseman, Aug 18 2021: (Start)
a(n + 1) = (A029837(n) + A124754(n))/2.
a(n + 1) = A029837(n) - A346633(n).
a(n + 1) = A346633(n) - A124754(n).
a(n + 1) = A029837(A346702(n)).
(End)
From Kevin Ryde, May 14 2022: (Start)
a(n) = A000120(A006068(n-1)), binary weight of inverse binary Gray code.
a(n) = Sum_{k=1..A000120(n-1)} (-1)^(k-1) * A272020(n-1,k), alternating sum of 1-bit positions.
a(n) = A089215(n) - 1.
(End)

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

A365067 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n whose odd parts sum to k, for k ranging from mod(n,2) to n in steps of 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 2, 4, 3, 4, 3, 5, 5, 3, 4, 4, 6, 5, 6, 6, 5, 8, 7, 5, 6, 8, 6, 10, 7, 10, 9, 10, 8, 12, 11, 7, 10, 12, 12, 10, 15, 11, 14, 15, 15, 16, 12, 18, 15, 11, 14, 20, 18, 20, 15, 22, 15, 22, 21, 25, 24, 24, 18, 27
Offset: 0

Views

Author

Gus Wiseman, Oct 16 2023

Keywords

Comments

The version for all k = 0..n is A113685 (including zeros).

Examples

			Triangle begins:
   1
   1
   1  1
   1  2
   2  1  2
   2  2  3
   3  2  2  4
   3  4  3  5
   5  3  4  4  6
   5  6  6  5  8
   7  5  6  8  6 10
   7 10  9 10  8 12
  11  7 10 12 12 10 15
  11 14 15 15 16 12 18
  15 11 14 20 18 20 15 22
  15 22 21 25 24 24 18 27
Row n = 8 counts the following partitions:
  (8)     (611)    (431)     (521)      (71)
  (62)    (4211)   (41111)   (332)      (53)
  (44)    (22211)  (3221)    (32111)    (5111)
  (422)            (221111)  (2111111)  (3311)
  (2222)                                (311111)
                                        (11111111)
Row n = 9 counts the following partitions:
  (81)     (63)      (54)       (72)        (9)
  (621)    (6111)    (522)      (5211)      (711)
  (441)    (432)     (4311)     (3321)      (531)
  (4221)   (42111)   (411111)   (321111)    (51111)
  (22221)  (3222)    (32211)    (21111111)  (333)
           (222111)  (2211111)              (33111)
                                            (3111111)
                                            (111111111)
		

Crossrefs

Row sums are A000041.
The version including all k is A113685, even version A113686.
Column k = 1 is A119620.
The even version and the reverse version are both A174713.
For odd-indexed instead of odd parts we have A346697, even version A346698.
The corresponding rank statistic is A366528, even version A366531.
A000009 counts partitions into odd parts, ranks A066208.
A086543 counts partitions with odd parts, ranks A366322.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Select[#,OddQ]]==k&]],{n,0,15},{k,Mod[n,2],n,2}]

Formula

T(n,k) = A000009(k) * A000041((n-k)/2).

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

A366531 Sum of even prime indices of n.

Original entry on oeis.org

0, 0, 2, 0, 0, 2, 4, 0, 4, 0, 0, 2, 6, 4, 2, 0, 0, 4, 8, 0, 6, 0, 0, 2, 0, 6, 6, 4, 10, 2, 0, 0, 2, 0, 4, 4, 12, 8, 8, 0, 0, 6, 14, 0, 4, 0, 0, 2, 8, 0, 2, 6, 16, 6, 0, 4, 10, 10, 0, 2, 18, 0, 8, 0, 6, 2, 0, 0, 2, 4, 20, 4, 0, 12, 2, 8, 4, 8, 22, 0, 8, 0, 0, 6
Offset: 1

Views

Author

Gus Wiseman, Oct 22 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.

Examples

			The prime indices of 198 are {1,2,2,5}, so a(198) = 2+2 = 4.
		

Crossrefs

Zeros are A066208, counted by A000009.
The triangle for the odd version is A113685, without zeros A365067.
The triangle for this statistic is A113686, without zeros A174713.
The odd version is A366528.
The halved version is A366533.
A066207 lists numbers with all even prime indices, counted by A035363.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A239261 counts partitions with sum of odd parts = sum of even parts.
A257991 counts odd prime indices, even A257992.
A346697 adds up odd-indexed prime indices, even-indexed A346698.
A366322 lists numbers with not all prime indices even, counted by A086543.

Programs

  • Mathematica
    Table[Total[Cases[FactorInteger[n], {p_?(EvenQ@*PrimePi),k_}:>PrimePi[p]*k]],{n,100}]

Formula

a(n) = A056239(n) - A366528(n).

A366533 Sum of even prime indices of n divided by 2.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 23 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.

Examples

			The prime indices of 198 are {1,2,2,5}, so a(198) = (2+2)/2 = 2.
		

Crossrefs

Zeros are A066208, counted by A000009.
The triangle for this statistic (without zeros) is A174713.
The un-halved odd version is A366528.
The un-halved version is A366531.
A066207 lists numbers with all even prime indices, counted by A035363.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A113685 counts partitions by sum of odd parts, even version A113686.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A257991 counts odd prime indices, even A257992.
A346697 adds up odd-indexed prime indices, even-indexed A346698.
A365067 counts partitions by sum of odd parts (without zeros).
A366322 lists numbers with not all prime indices even, counted by A086543.

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= map(t -> [numtheory:-Pi(t[1]),t[2]], ifactors(n)[2]);
      add(`if`(t[1]::even, t[1]*t[2]/2, 0), t=F)
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 22 2023
  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[Select[prix[n],EvenQ]]/2,{n,100}]

Formula

a(n) = A366531(n)/2.

A346633 Sum of even-indexed parts (even bisection) of the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 01 2021

Keywords

Comments

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

			Composition number 741 in standard order is (2,1,1,3,2,1), so a(741) = 1 + 3 + 1 = 5.
		

Crossrefs

Including odd-indexed parts gives A029837.
Subtracting from the odd version gives A124754.
Positions of zeros are A131577.
The odd-indexed version is A209281(n+1).
The version for prime indices is A346698 (reverse: A346700).
A000120 and A080791 count binary digits 1 and 0, with difference A145037.
A011782 counts compositions.
A056239 adds up prime indices, row sums of A112798.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A345197 counts compositions by sum, length, and alternating sum.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[Last/@Partition[Append[stc[n],0],2]],{n,0,100}]

Formula

a(n) = (A029837(n) - A124754(n))/2.
a(n) = A029837(n) - A209281(n + 1).
a(n) = A124754(n) + A209281(n + 1).
Showing 1-10 of 23 results. Next