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 29 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

A380955 Sum of prime indices of n (with multiplicity) minus sum of distinct prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2025

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 96 are {1,1,1,1,1,2}, with sum 7, and with distinct prime indices {1,2}, with sum 3, so a(96) = 7 - 3 = 4.
		

Crossrefs

Positions of 0's are A005117, complement A013929.
For length instead of sum we have A046660.
Positions of 1's are A081770.
For factors instead of indices we have A280292, firsts A280286 (sorted A381075).
A multiplicative version is A290106.
Counting partitions by this statistic gives A364916.
Dominates A374248.
Positions of first appearances are A380956, sorted A380957.
For prime multiplicities instead of prime indices we have A380958.
For product instead of sum we have A380986.
A000040 lists the primes, differences A001223.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, length A001222.
A304038 lists distinct prime indices, sum A066328, length A001221.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[prix[n]]-Total[Union[prix[n]]],{n,100}]

Formula

a(n) = A056239(n) - A066328(n).
Additive: a(m*n) = a(m) + a(n) if gcd(m,n) = 1.

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

A280286 a(n) is the least k such that sopfr(k) - sopf(k) = n.

Original entry on oeis.org

4, 9, 8, 25, 16, 49, 32, 81, 64, 121, 128, 169, 256, 625, 512, 289, 1024, 361, 2048, 1444, 1331, 529, 5324, 2116, 2197, 4232, 8788, 841, 17576, 961, 7569, 3844, 4913, 7688, 19652, 1369, 6859, 5476, 12321, 1681, 34225, 1849, 15129, 7396, 12167, 2209, 46225, 8836, 19881
Offset: 2

Views

Author

Michel Marcus, Dec 31 2016

Keywords

Crossrefs

Cf. A001414 (sopfr), A008472 (sopf), A001248, A280163.
A multiplicative version is A064549 (sorted A001694), firsts of A003557.
For length instead of sum we have A151821.
These are the positions of first appearances in A280292 = A001414 - A008472.
For indices instead of factors we have A380956 (sorted A380957), firsts of A380955.
A multiplicative version for indices is A380987 (sorted A380988), firsts of A290106.
For prime exponents instead of factors we have A380989, firsts of A380958.
The sorted version is A381075.
For product instead of sum see A381076, sorted firsts of A066503.
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A020639 gives least prime factor (index A055396), greatest A061395 (index A006530).
A056239 adds up prime indices, row sums of A112798.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[Apply[ConstantArray,FactorInteger[n],{1}]]];
    q=Table[Total[prifacs[n]]-Total[Union[prifacs[n]]],{n,1000}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    Table[Position[q,k][[1,1]],{k,2,mnrm[q/.(0->1)]}] (* Gus Wiseman, Feb 20 2025 *)
  • PARI
    sopfr(n) = my(f=factor(n)); sum(j=1, #f~, f[j,1]*f[j,2]);
    sopf(n) = my(f=factor(n)); sum(j=1, #f~, f[j,1]);
    a(n) = {my(k = 2); while (sopfr(k) - sopf(k) != n, k++); k;}

Formula

For p prime, a(p) = p^2 (see A001248).

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.

A381075 Sorted positions of first appearances in A280292 (sum of prime factors minus sum of distinct prime factors).

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 32, 49, 64, 81, 121, 128, 169, 256, 289, 361, 512, 529, 625, 841, 961, 1024, 1331, 1369, 1444, 1681, 1849, 2048, 2116, 2197, 2209, 2809, 3481, 3721, 3844, 4232, 4489, 4913, 5041, 5324, 5329, 5476, 6241, 6859, 6889, 7396, 7569, 7688, 7921
Offset: 1

Views

Author

Gus Wiseman, Feb 18 2025

Keywords

Examples

			The initial terms of A280292 are (0,0,0,2,0,0,0,4,3,0,0,2,0,0,0,6,0,3,0,2,0,0,0,4,5,0,6,2,...), wherein a value appears for the first time at positions 1, 4, 8, 9, 16, 25, ...
		

Crossrefs

For length instead of sum we have A151821.
The unsorted version is A280286, firsts of A280292.
For indices instead of factors we have A380957 (unsorted A380956), firsts of A380955.
A multiplicative version is A380988 (unsorted A380987), firsts of A290106.
For prime multiplicities instead of factors see A380989, firsts of A380958.
For product instead of sum we have A381076, sorted firsts of A066503.
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A364916 counts partitions by (sum minus sum of distinct parts).

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[Apply[ConstantArray,FactorInteger[n],{1}]]];
    q=Table[Total[prifacs[n]]-Total[Union[prifacs[n]]],{n,10000}];
    Select[Range[Length[q]],FreeQ[Take[q,#-1],q[[#]]]&]
  • PARI
    f(n) = my(f=factor(n)); sum(j=1, #f~, f[j, 1]*f[j, 2] - f[j, 1]); \\ A280292
    lista(nn) = my(v=Set(vector(nn, i, f(i))), list=List()); for (i=1, #v, my(k=1); while(f(k) != v[i], k++); listput(list, k)); vecsort(Vec(list)); \\ Michel Marcus, Apr 15 2025

Formula

Sorted positions of first appearances in A001414 - A008472.

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

A380956 Position of first appearance of n in A380955 (sum of prime indices minus sum of distinct prime indices).

Original entry on oeis.org

1, 4, 8, 16, 27, 64, 81, 256, 243, 529, 729, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761, 36481
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2025

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.
Also the position of first appearance of n in A374248.

Examples

			The terms together with their prime indices begin:
     1: {}
     4: {1,1}
     8: {1,1,1}
    16: {1,1,1,1}
    27: {2,2,2}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
   256: {1,1,1,1,1,1,1,1}
   243: {2,2,2,2,2}
   529: {9,9}
   729: {2,2,2,2,2,2}
   961: {11,11}
  1369: {12,12}
  1681: {13,13}
  1849: {14,14}
  2209: {15,15}
		

Crossrefs

For length instead of sum we have A151821.
For factors instead of indices we have A280286 (sorted A381075), firsts of A280292.
Counting partitions by this statistic gives A364916.
Positions of first appearances in A380955.
The sorted version is A380957.
For product instead of sum we have firsts of A380986.
A multiplicative version is A380987 (sorted A380988), firsts of A290106.
For prime multiplicities instead of prime indices we have A380989, firsts of A380958.
A000040 lists the primes, differences A001223.
A005117 lists squarefree numbers, complement A013929.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798, length A001222.
A304038 lists distinct prime indices, sum A066328, length A001221.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    q=Table[Total[prix[n]]-Total[Union[prix[n]]],{n,1000}];
    Table[Position[q,k][[1,1]],{k,0,mnrm[q+1]-1}]

Formula

After a(12) = 961, this appears to converge to prime(n)^2.
Showing 1-10 of 29 results. Next