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-8 of 8 results.

A047967 Number of partitions of n with some part repeated.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 7, 10, 16, 22, 32, 44, 62, 83, 113, 149, 199, 259, 339, 436, 563, 716, 913, 1151, 1453, 1816, 2271, 2818, 3496, 4309, 5308, 6502, 7959, 9695, 11798, 14298, 17309, 20877, 25151, 30203, 36225, 43323, 51748, 61651, 73359, 87086, 103254, 122164
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n with at least one even part. - Vladeta Jovovic, Sep 10 2003. Example: a(5)=4 because we have [4,1], [3,2], [2,2,1] and [2,1,1,1] ([5], [3,1,1] and [1,1,1,1,1] do not qualify). - Emeric Deutsch, Mar 30 2006
Also number of partitions of n (where it is assumed that the least part is 0) such that at least one difference is at least two. Example: a(5)=4 because we have [5,0], [4,1,0], [3,2,0] and [3,1,1,0] ([2,2,1,0], [2,1,1,1,0] and [1,1,1,1,1,0] do not qualify). - Emeric Deutsch, Mar 30 2006
The Heinz numbers of these partitions (with some part repeated) are given by A013929. Equivalent to Vladeta Jovovic's comment, a(n) is also the number of integer partitions whose product of parts is even. The Heinz numbers of these latter partitions are given by A324929. - Gus Wiseman, Mar 23 2019

Examples

			a(5) = 4 because we have [3,1,1], [2,2,1], [2,1,1,1] and [1,1,1,1,1] ([5], [4,1] and [3,2] do not qualify).
		

Crossrefs

Column k=1 of A320264.

Programs

  • Maple
    g:=sum(x^(2*k)*product(1+x^j,j=k+1..70)/product(1-x^j,j=1..k),k=1..40): gser:=series(g,x=0,50): seq(coeff(gser,x,n),n=0..44); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    Table[PartitionsP[n]-PartitionsQ[n],{n,0,50}] (* Harvey P. Dale, Jan 17 2019 *)
  • PARI
    x='x+O('x^66); concat([0,0], Vec(1/eta(x)-eta(x^2)/eta(x))) \\ Joerg Arndt, Jun 21 2011

Formula

a(n) = A000041(n) - A000009(n).
G.f.: Sum_{k>=1} x^(2*k)*(Product_{j>=k+1} (1+x^j)) / Product_{j=1..k} (1-x^j) = Sum_{k>=1} x^(2*k)/(Product_{j=1..2*k} (1-x^j)*Product_{j>=k} (1-x^(2*j+1))). - Emeric Deutsch, Mar 30 2006
G.f.: 1/P(x) - P(x^2)/P(x) where P(x) = Product_{k>=1} (1-x^k). - Joerg Arndt, Jun 21 2011
a(n) = p(n-2)+p(n-4)-p(n-10)-p(n-14)+...+(-1^(j-1))*p(n-j*(3*j-1)) + (-1^(j-1))*p(n-j*(3*j+1))+..., where p(n) = A000041(n). - Gregory L. Simay, Aug 28 2023

A325700 Numbers with as many distinct even as distinct odd prime indices.

Original entry on oeis.org

1, 6, 12, 14, 15, 18, 24, 26, 28, 33, 35, 36, 38, 45, 48, 51, 52, 54, 56, 58, 65, 69, 72, 74, 75, 76, 77, 86, 93, 95, 96, 98, 99, 104, 106, 108, 112, 116, 119, 122, 123, 135, 141, 142, 143, 144, 145, 148, 152, 153, 158, 161, 162, 172, 175, 177, 178, 185, 192
Offset: 1

Views

Author

Gus Wiseman, May 17 2019

Keywords

Comments

These are the Heinz numbers of the integer partitions counted by A241638.
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 sequence of terms together with their prime indices begins:
    1: {}
    6: {1,2}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   18: {1,2,2}
   24: {1,1,1,2}
   26: {1,6}
   28: {1,1,4}
   33: {2,5}
   35: {3,4}
   36: {1,1,2,2}
   38: {1,8}
   45: {2,2,3}
   48: {1,1,1,1,2}
   51: {2,7}
   52: {1,1,6}
   54: {1,2,2,2}
   56: {1,1,1,4}
   58: {1,10}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],0==Total[(-1)^PrimePi/@First/@If[#==1,{},FactorInteger[#]]]&]

A324966 Number of distinct odd prime indices of n.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 0, 1, 0, 2, 1, 1, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 1, 1, 0, 1, 2, 1, 0, 1, 1, 2, 0, 2, 0, 1, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 2, 1, 1, 2, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

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.
If x and y are coprime then a(x*y) = a(x)+a(y). - Robert Israel, Mar 24 2019

Examples

			180180 has prime indices {1,1,2,2,3,4,5,6}, so a(180180) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) nops(select(type,map(numtheory:-pi,numtheory:-factorset(n)),odd)) end proc:
    map(f, [$1..100]); # Robert Israel, Mar 24 2019
  • Mathematica
    Table[Count[If[n==1,{},FactorInteger[n]],{?(OddQ[PrimePi[#]]&),}],{n,100}]
  • PARI
    a(n) = my(f=factor(n)[,1]); sum(k=1, #f, primepi(f[k]) % 2); \\ Michel Marcus, Mar 22 2019

Formula

a(n) = A001221(n) - A324967(n). - Robert Israel, Mar 24 2019
G.f.: Sum_{k>=1} x^prime(2*k-1) / (1 - x^prime(2*k-1)). - Ilya Gutkovskiy, Feb 12 2020
Additive with a(p^e) = 1 if primepi(p) is odd and 0 otherwise. - Amiram Eldar, Oct 06 2023

A325699 Number of distinct even prime indices of n minus the number of distinct odd prime indices of n.

Original entry on oeis.org

0, -1, 1, -1, -1, 0, 1, -1, 1, -2, -1, 0, 1, 0, 0, -1, -1, 0, 1, -2, 2, -2, -1, 0, -1, 0, 1, 0, 1, -1, -1, -1, 0, -2, 0, 0, 1, 0, 2, -2, -1, 1, 1, -2, 0, -2, -1, 0, 1, -2, 0, 0, 1, 0, -2, 0, 2, 0, -1, -1, 1, -2, 2, -1, 0, -1, -1, -2, 0, -1, 1, 0, -1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, May 17 2019

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.

Crossrefs

Programs

  • Mathematica
    Table[Total[(-1)^PrimePi/@First/@If[n==1,{},FactorInteger[n]]],{n,100}]

Formula

G.f.: Sum_{k>=1} (-1)^k * x^prime(k) / (1 - x^prime(k)). - Ilya Gutkovskiy, Feb 12 2020
Additive with a(p^e) = (-1)^primepi(p). - Amiram Eldar, Jun 17 2024

A345375 Number of unitary prime divisors of n whose prime index is even.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 2, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 1, 0, 0, 0, 0, 2, 0, 1, 2, 0, 1, 0, 2, 0, 1
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 16 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1 && EvenQ[PrimePi[p]], 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 06 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i,2] == 1 && !(primepi(f[i,1])%2), 1, 0));} \\ Amiram Eldar, Oct 06 2023

Formula

a(n) = Sum_{p|n, p prime} ((pi(p)+1) mod 2) * floor(1/gcd(p,n/p)).
From Amiram Eldar, Oct 06 2023: (Start)
a(n) = A056169(n) - A345374(n).
a(n) <= A324967(n), with equality if and only if n is squarefree (A005117).
Additive with a(p^e) = 1 if e = 1 and primepi(p) is even and 0 otherwise. (End)

A366529 Heinz numbers of integer partitions of even numbers with at least one even part.

Original entry on oeis.org

3, 7, 9, 12, 13, 19, 21, 27, 28, 29, 30, 36, 37, 39, 43, 48, 49, 52, 53, 57, 61, 63, 66, 70, 71, 75, 76, 79, 81, 84, 87, 89, 90, 91, 101, 102, 107, 108, 111, 112, 113, 116, 117, 120, 129, 130, 131, 133, 138, 139, 144, 147, 148, 151, 154, 156, 159, 163, 165
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2023

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
   3: {2}
   7: {4}
   9: {2,2}
  12: {1,1,2}
  13: {6}
  19: {8}
  21: {2,4}
  27: {2,2,2}
  28: {1,1,4}
  29: {10}
  30: {1,2,3}
  36: {1,1,2,2}
  37: {12}
  39: {2,6}
  43: {14}
  48: {1,1,1,1,2}
		

Crossrefs

The complement is counted by A047967.
For all even parts we have A066207, counted by A035363, odd A066208.
Not requiring an even part gives A300061.
For odd instead of even we have A300063.
Not requiring even sum gives A324929.
Partitions of this type are counted by A366527.
A112798 list prime indices, sum A056239.
A257991 counts odd prime indices, distinct A324966.
A257992 counts even prime indices, distinct A324967.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],EvenQ[Total[prix[#]]]&&Or@@EvenQ/@prix[#]&]

A366532 Heinz numbers of integer partitions with at least one even and odd part.

Original entry on oeis.org

6, 12, 14, 15, 18, 24, 26, 28, 30, 33, 35, 36, 38, 42, 45, 48, 51, 52, 54, 56, 58, 60, 65, 66, 69, 70, 72, 74, 75, 76, 77, 78, 84, 86, 90, 93, 95, 96, 98, 99, 102, 104, 105, 106, 108, 112, 114, 116, 119, 120, 122, 123, 126, 130, 132, 135, 138, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2023

Keywords

Comments

These partitions are counted by A006477.
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
    6: {1,2}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   18: {1,2,2}
   24: {1,1,1,2}
   26: {1,6}
   28: {1,1,4}
   30: {1,2,3}
   33: {2,5}
   35: {3,4}
   36: {1,1,2,2}
   38: {1,8}
   42: {1,2,4}
   45: {2,2,3}
   48: {1,1,1,1,2}
		

Crossrefs

These partitions are counted by A006477.
Just even: A324929, counted by A047967.
Just odd: A366322, counted by A086543 (even bisection of A182616).
A031368 lists primes of odd index, even A031215.
A066207 ranks partitions with all even parts, counted by A035363.
A066208 ranks partitions with all odd parts, counted by A000009.
A112798 lists prime indices, sum A056239.
A257991 counts odd prime indices, distinct A324966.
A257992 counts even prime indices, distinct A324967.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Or@@EvenQ/@prix[#]&&Or@@OddQ/@prix[#]&]

Formula

Intersection of A324929 and A366322.

A366784 Sum of even indices of distinct prime factors of n divided by 2.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 24 2023

Keywords

Examples

			a(315) = 3 because 315 = 3^2 * 5 * 7 = prime(2)^2 * prime(3) * prime(4) and (2 + 4) / 2 = 3.
		

Crossrefs

Cf. A000720 (pi), A066208 (positions of 0's), A066328, A324967, A332422, A344931, A366533, A366725.

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[Sum[k x^Prime[2 k]/(1 - x^Prime[2 k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    f[p_, e_] := Module[{i = PrimePi[p]}, If[EvenQ[i], i/2, 0]]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jul 03 2025 *)
  • PARI
    f(n) = if(n % 2, 0, n/2);
    a(n) = vecsum(apply(x -> f(primepi(x)), factor(n)[, 1])); \\ Amiram Eldar, Jul 03 2025

Formula

G.f.: Sum_{k>=1} k * x^prime(2*k) / (1 - x^prime(2*k)).
From Amiram Eldar, Jul 03 2025: (Start)
Additive with a(p^e) = pi(p)/2 if pi(p) is even, and 0 otherwise.
a(n) = (A066328(n) - A366725(n))/2. (End)
Showing 1-8 of 8 results.