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

A195017 If n = Product_{k >= 1} (p_k)^(c_k) where p_k is k-th prime and c_k >= 0 then a(n) = Sum_{k >= 1} c_k*((-1)^(k-1)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Feb 06 2012

Keywords

Comments

Let p(n,x) be the completely additive polynomial-valued function such that p(1,x) = 0 and p(prime(n),x) = x^(n-1), like is defined in A206284 (although here we are not limited to just irreducible polynomials). Then a(n) is the value of the polynomial encoded in such a manner by n, when it is evaluated at x=-1. - The original definition rewritten and clarified by Antti Karttunen, Oct 03 2018
Positions of 0 give the values of n for which the polynomial p(n,x) is divisible by x+1. For related sequences, see the Mathematica section.
Also the number of odd prime indices of n minus the number of even prime indices of n (both counted with multiplicity), where 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. - Gus Wiseman, Oct 24 2023

Examples

			The sequence can be read from a list of the polynomials:
  p(n,x)      with x = -1, gives a(n)
------------------------------------------
  p(1,x) = 0           0
  p(2,x) = 1x^0        1
  p(3,x) = x          -1
  p(4,x) = 2x^0        2
  p(5,x) = x^2         1
  p(6,x) = 1+x         0
  p(7,x) = x^3        -1
  p(8,x) = 3x^0        3
  p(9,x) = 2x         -2
  p(10,x) = x^2 + 1    2.
(The list runs through all the polynomials whose coefficients are nonnegative integers.)
		

Crossrefs

For other evaluation functions of such encoded polynomials, see A001222, A048675, A056239, A090880, A248663.
Zeros are A325698, distinct A325700.
For sum instead of count we have A366749 = A366531 - A366528.
A000009 counts partitions into odd parts, ranked by A066208.
A035363 counts partitions into even parts, ranked by A066207.
A112798 lists prime indices, reverse A296150, sum A056239.
A257991 counts odd prime indices, even A257992.
A300061 lists numbers with even sum of prime indices, odd A300063.

Programs

  • Mathematica
    b[n_] := Table[x^k, {k, 0, n}];
    f[n_] := f[n] = FactorInteger[n]; z = 200;
    t[n_, m_, k_] := If[PrimeQ[f[n][[m, 1]]] && f[n][[m, 1]]
    == Prime[k], f[n][[m, 2]], 0];
    u = Table[Apply[Plus,
        Table[Table[t[n, m, k], {k, 1, PrimePi[n]}], {m, 1,
          Length[f[n]]}]], {n, 1, z}];
    p[n_, x_] := u[[n]].b[-1 + Length[u[[n]]]]
    Table[p[n, x] /. x -> 0, {n, 1, z/2}]   (* A007814 *)
    Table[p[2 n, x] /. x -> 0, {n, 1, z/2}] (* A001511 *)
    Table[p[n, x] /. x -> 1, {n, 1, z}]     (* A001222 *)
    Table[p[n, x] /. x -> 2, {n, 1, z}]     (* A048675 *)
    Table[p[n, x] /. x -> 3, {n, 1, z}]     (* A090880 *)
    Table[p[n, x] /. x -> -1, {n, 1, z}]    (* A195017 *)
    z = 100; Sum[-(-1)^k IntegerExponent[Range[z], Prime[k]], {k, 1, PrimePi[z]}] (* Friedjof Tellkamp, Aug 05 2024 *)
  • PARI
    A195017(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * (-1)^(1+primepi(f[i,1])))); } \\ Antti Karttunen, Oct 03 2018

Formula

Totally additive with a(p^e) = e * (-1)^(1+PrimePi(p)), where PrimePi(n) = A000720(n). - Antti Karttunen, Oct 03 2018
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} = (-1)^(primepi(p)+1)/(p-1) = Sum_{k>=1} (-1)^(k+1)/A006093(k) = A078437 + Sum_{k>=1} (-1)^(k+1)/A036689(k) = 0.6339266524059... . - Amiram Eldar, Sep 29 2023
a(n) = A257991(n) - A257992(n). - Gus Wiseman, Oct 24 2023
a(n) = -Sum_{k=1..pi(n)} (-1)^k * valuation(n, prime(k)). - Friedjof Tellkamp, Aug 05 2024

Extensions

More terms, name changed and example-section edited by Antti Karttunen, Oct 03 2018

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

A174713 Triangle read by rows, A173305 (A000009 shifted down twice) * A174712 (diagonalized variant of A000041).

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Mar 27 2010

Keywords

Comments

Row sums = A000041, the partition numbers.
The current triangle is the 2nd in an infinite set, followed by A174714 (k=3), and A174715, (k=4); in which row sums of each triangle = A000041.
k-th triangle in the infinite set can be defined as having the sequence:
"Euler transform of ones: (1,1,1,...) interleaved with (k-1) zeros"; shifted down k times (except column 0) in successive columns, then multiplied * triangle A174712, the diagonalized variant of A000041, A174713 begins with A000009 shifted down twice (triangle A173305); where A000009 = the Euler transform of period 2 sequence: [1,0,1,0,...].
Similarly, triangle A174714 begins with A000716 shifted down thrice; where A000716 = the Euler transform of period 3 series: [1,1,0,1,1,0,...]. Then multiply the latter as an infinite lower triangular matrix * A174712, the diagonalized variant of A000041, obtaining triangle A174714 with row sums = A000041.
Case k=4 = triangle A174715 which begins with the Euler transform of period 4 series: [1,1,1,0,1,1,1,0,...], shifted down 4 times in successive columns then multiplied * A174712, the diagonalized variant of A000041.
All triangles in the infinite set have row sums = A000041.
The sequences: "Euler transform of ones interleaved with (k-1) zeros" have the following properties, beginning with k=2:
...
k=2, A000009: = Euler transform of [1,0,1,0,1,0,...] and satisfies
.....A000009. = p(x)/p(x^2), where p(x) = polcoeff A000041; and A000041 =
.....A000009(x) = r(x), then p(x) = r(x) * r(x^2) * r(x^4) * r(x^8) * ...
...
k=3, A000726: = Euler transform of [1,1,0,1,1,0,...] and satisfies
.....A000726(x): = p(x)/p(x^3), and given s(x) = polcoeff A000726, we get
.....A000041(x) = p(x) = s(x) * s(x^3) * s(x^9) * s(x^27) * ...
...
k=4, A001935: = Euler transform of [1,1,1,0,1,1,1,0,...] and satisfies
.....A001935(x) = p(x)/p(x^4) and given t(x) = polcoeff A001935, we get
.....A000041(x) = p(x) = t(x) * t(x^4) * t(x^16) * t(x^64) * ...
...
Also the number of integer partitions of n whose even parts sum to k, for k an even number from zero to n. The version including odd k is A113686. - Gus Wiseman, Oct 23 2023

Examples

			First few rows of the triangle =
1;
1;
1, 1;
2, 1;
2, 1, 2;
3, 2, 2;
4, 2, 2, 3;
5, 3, 4, 3;
6, 4, 4, 3, 5;
8, 5, 6, 6, 5;
10, 6, 8, 6, 5, 7;
12, 8, 10, 9, 10, 7;
15, 10, 12, 12, 10, 7, 11;
18, 12, 16, 15, 15, 14, 11;
22, 15, 20, 18, 20, 14, 11, 15;
...
From _Gus Wiseman_, Oct 23 2023: (Start)
Row n = 9 counts the following partitions:
  (9)          (72)        (54)       (63)      (81)
  (711)        (5211)      (522)      (6111)    (621)
  (531)        (3321)      (4311)     (432)     (441)
  (51111)      (321111)    (411111)   (42111)   (4221)
  (333)        (21111111)  (32211)    (3222)    (22221)
  (33111)                  (2211111)  (222111)
  (3111111)
  (111111111)
(End)
		

Crossrefs

Row sums are A000041.
The odd version is A365067.
The corresponding rank statistic is A366531, odd version A366528.
A000009 counts partitions into odd parts, ranks A066208.
A113685 counts partitions by sum of odd parts, even version A113686.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Total[Select[#,EvenQ]]==k&]],{n,0,15},{k,0,n,2}] (* Gus Wiseman, Oct 23 2023 *)

Formula

As infinite lower triangular matrices, A173305 * A174712.
T(n,k) = A000009(n-2k) * A000041(k). - Gus Wiseman, Oct 23 2023

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.

A366842 Number of integer partitions of n whose odd parts have a common divisor > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 4, 1, 8, 3, 13, 6, 21, 10, 36, 15, 53, 28, 80, 41, 122, 63, 174, 97, 250, 140, 359, 201, 496, 299, 685, 410, 949, 575, 1284, 804, 1726, 1093, 2327, 1482, 3076, 2023, 4060, 2684, 5358, 3572, 6970, 4745, 9050, 6221, 11734, 8115, 15060, 10609
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The a(3) = 1 through a(11) = 13 partitions:
  (3)  .  (5)    (3,3)  (7)      (3,3,2)  (9)        (5,5)      (11)
          (3,2)         (4,3)             (5,4)      (4,3,3)    (6,5)
                        (5,2)             (6,3)      (3,3,2,2)  (7,4)
                        (3,2,2)           (7,2)                 (8,3)
                                          (3,3,3)               (9,2)
                                          (4,3,2)               (4,4,3)
                                          (5,2,2)               (5,4,2)
                                          (3,2,2,2)             (6,3,2)
                                                                (7,2,2)
                                                                (3,3,3,2)
                                                                (4,3,2,2)
                                                                (5,2,2,2)
                                                                (3,2,2,2,2)
		

Crossrefs

This is the odd case of A018783, complement A000837.
The even version is A047967.
The complement is counted by A366850, ranks A366846.
A000041 counts integer partitions, strict A000009.
A000740 counts relatively prime compositions.
A113685 counts partitions by sum of odds, stat A366528, w/o zeros A365067.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A289508 gives gcd of prime indices, positions of ones A289509.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], GCD@@Select[#,OddQ]>1&]], {n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366842(n): return sum(1 for p in partitions(n) if gcd(*(q for q in p if q&1))>1) # Chai Wah Wu, Oct 28 2023

A366844 Number of strict integer partitions of n into odd relatively prime parts.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 0, 2, 1, 2, 1, 2, 2, 3, 3, 5, 4, 4, 5, 6, 7, 8, 8, 9, 11, 12, 12, 15, 16, 15, 19, 23, 23, 26, 28, 30, 34, 37, 38, 44, 48, 48, 56, 62, 63, 72, 77, 82, 92, 96, 102, 116, 124, 128, 142, 155, 162, 178, 191, 200, 222, 236, 246, 276, 291, 303, 334
Offset: 0

Views

Author

Gus Wiseman, Oct 29 2023

Keywords

Examples

			The a(n) partitions for n = 1, 8, 14, 17, 16, 20, 21:
  (1)  (5,3)  (9,5)   (9,5,3)   (9,7)      (11,9)      (9,7,5)
       (7,1)  (11,3)  (9,7,1)   (11,5)     (13,7)      (11,7,3)
              (13,1)  (11,5,1)  (13,3)     (17,3)      (11,9,1)
                      (13,3,1)  (15,1)     (19,1)      (13,5,3)
                                (7,5,3,1)  (9,7,3,1)   (13,7,1)
                                           (11,5,3,1)  (15,5,1)
                                                       (17,3,1)
		

Crossrefs

This is the relatively prime case of A000700.
The pairwise coprime version is the odd-part case of A007360.
Allowing even parts gives A078374.
The halved even version is A078374 aerated.
The non-strict version is A366843, with evens A000837.
The complement is counted by the strict case of A366852, with evens A018783.
A000041 counts integer partitions, strict A000009 (also into odds).
A051424 counts pairwise coprime partitions, for odd parts A366853.
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A168532 counts partitions by gcd.
A366842 counts partitions whose odd parts have a common divisor > 1.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], And@@OddQ/@#&&UnsameQ@@#&&GCD@@#==1&]],{n,0,30}]
  • Python
    from math import gcd
    from sympy.utilities.iterables import partitions
    def A366844(n): return sum(1 for p in partitions(n) if all(d==1 for d in p.values()) and all(d&1 for d in p) and gcd(*p)==1) # Chai Wah Wu, Oct 30 2023

Extensions

More terms from Chai Wah Wu, Oct 30 2023

A019507 Droll numbers: numbers > 1 whose sum of even prime factors equals the sum of odd prime factors.

Original entry on oeis.org

72, 240, 672, 800, 2240, 4224, 5184, 6272, 9984, 14080, 17280, 33280, 39424, 48384, 52224, 57600, 93184, 116736, 161280, 174080, 192000, 247808, 304128, 373248, 389120, 451584, 487424, 537600, 565248, 585728, 640000, 718848, 1013760, 1089536, 1244160, 1384448
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

Examples

			6272 = 2*2*2*2*2*2*2*7*7 is droll since 2+2+2+2+2+2+2 = 14 = 7+7.
		

Crossrefs

For count instead of sum we have A072978.
Partitions of this type are counted by A239261, without zero terms A249914.
For prime indices instead of factors we have A366748, zeros of A366749.
The LHS is A366839 with alternating zeros, for indices A366531, triangle A113686.
The RHS is A366840, for indices A366528, triangle A113685.
A000009 counts partitions into odd parts, ranks A066208.
A035363 counts partitions into even parts, ranks A066207.
A112798 lists prime indices, length A001222, sum A056239.
A257991 counts odd prime indices, even A257992.
A300061 lists numbers with even sum of prime indices, odd A300063.

Programs

  • Maple
    f:= proc(k, m) # numbers whose sum of prime factors >= m is k; m is prime
       local S,p,j;
       option remember;
       if k = 0 then return [1]
       elif m > k then return []
       fi;
       S:= NULL:
       p:= nextprime(m);
       for j from k by -m to 0 do
         S:= S, op(map(`*`,  procname(j,p) , m^((k-j)/m)))
       od;
       [S]
    end proc:
    g:= proc(N) local m,R;
      R:= NULL;
      for m from 1 while 2^m < N do
       R:= R, op(map(`*`,select(`<=`,f(2*m,3), N/2^m),2^m));
      od;
      sort([R])
    end proc:
    g(10^8); # Robert Israel, Feb 20 2025
  • Mathematica
    Select[Range[2, 2*10^6, 2], First[#] == Total[Rest[#]] & [Times @@@ FactorInteger[#]] &] (* Paolo Xausa, Feb 19 2025 *)
  • PARI
    isok(n) = {if (n % 2, return (0)); f = factor(n); return (2*f[1,2] == sum(i=2, #f~, f[i,1]*f[i,2]));} \\ Michel Marcus, Jun 21 2013

Formula

These are even numbers k such that A366839(k/2) = A366840(k). - Gus Wiseman, Oct 25 2023 (corrected Feb 19 2025)

Extensions

Name edited by Paolo Xausa, Feb 19 2025

A366749 Self-signed alternating sum of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 23 2023

Keywords

Comments

We define the self-signed alternating sum of a multiset y to be Sum_{k in y} k*(-1)^k.
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.

Crossrefs

With summands of 2^(n-1) we get A048675.
With summands of (-1)^k we get A195017.
The version for alternating prime indices is A346697 - A346698 = A316524.
Positions of zeros are A366748, counted by A239261.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A300061 lists numbers with even sum of prime indices, odd A300063.
A366528 adds up odd prime indices, counted by A113685.
A366531 adds up even prime indices, counted by A113686.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    asum[y_]:=Sum[x*(-1)^x,{x,y}];
    Table[asum[prix[n]],{n,100}]

Formula

a(n) = Sum_{k in A112798(n)} k*(-1)^k.
a(n) = A366531(n) - A366528(n).

A366845 Number of integer partitions of n that contain at least one even part and whose halved even parts are relatively prime.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 5, 7, 11, 15, 23, 31, 43, 58, 82, 107, 144, 189, 250, 323, 420, 537, 695, 880, 1114, 1404, 1774, 2210, 2759, 3423, 4239, 5223, 6430, 7869, 9640, 11738, 14266, 17297, 20950, 25256, 30423, 36545, 43824, 52421, 62620, 74599, 88802, 105431
Offset: 0

Views

Author

Gus Wiseman, Oct 28 2023

Keywords

Examples

			The partition y = (6,4) has halved even parts (3,2) which are relatively prime, so y is counted under a(10).
The a(2) = 1 through a(9) = 15 partitions:
  (2)  (21)  (22)   (32)    (42)     (52)      (62)       (72)
             (211)  (221)   (222)    (322)     (332)      (432)
                    (2111)  (321)    (421)     (422)      (522)
                            (2211)   (2221)    (521)      (621)
                            (21111)  (3211)    (2222)     (3222)
                                     (22111)   (3221)     (3321)
                                     (211111)  (4211)     (4221)
                                               (22211)    (5211)
                                               (32111)    (22221)
                                               (221111)   (32211)
                                               (2111111)  (42111)
                                                          (222111)
                                                          (321111)
                                                          (2211111)
                                                          (21111111)
		

Crossrefs

For all parts we have A000837, complement A018783.
These partitions have ranks A366847.
For odd parts we have A366850, ranks A366846, complement A366842.
A000041 counts integer partitions, strict A000009, complement A047967.
A035363 counts partitions into all even parts, ranks A066207.
A078374 counts relatively prime strict partitions.
A168532 counts partitions by gcd.
A239261 counts partitions with (sum of odd parts) = (sum of even parts).
A366531 = 2*A366533 adds up even prime indices, triangle A113686/A174713.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], GCD@@Select[#,EvenQ]/2==1&]],{n,0,30}]
Showing 1-10 of 20 results. Next