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

A305614 Expansion of Sum_{p prime} x^p/(1 + x^p).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 06 2018

Keywords

Comments

a(n) is the number of prime divisors p|n such that n/p is odd, minus the number of prime divisors p|n such that n/p is even.

Examples

			The prime divisors of 12 are 2, 3. We see that 12/2 = 6, 12/3 = 4. None of those are odd, but both of them are even, so a(12) = -2.
The prime divisors of 30 are {2,3,5} with quotients {15,10,6}. One of these is odd and two are even, so a(30) = 1 - 2 = -1.
		

Crossrefs

Programs

  • Maple
    a:= n-> -add((-1)^(n/i[1]), i=ifactors(n)[2]):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 07 2018
    # Alternative
    N:= 1000: # to get a(0)..a(N)
    V:= Vector(N):
    p:= 1:
    do
      p:= nextprime(p);
      if p > N then break fi;
      R:= [seq(i,i=p..N,p)];
      W:= ;
      V[R]:= V[R]+W;
    od:
    [0,seq(V[i],i=1..N)]; # Robert Israel, Jun 07 2018
  • Mathematica
    Table[Sum[If[PrimeQ[d], (-1)^(n/d - 1), 0], {d, Divisors[n]}], {n, 30}]

Formula

a(n) = -Sum_{p|n prime} (-1)^(n/p).
From Robert Israel, Jun 07 2018: (Start)
If n is odd, a(n) = A001221(n).
If n == 2 (mod 4), a(n) = 2 - A001221(n).
If n == 0 (mod 4) and n > 0, a(n) = -A001221(n). (End)
L.g.f.: log(Product_{k>=1} (1 + x^prime(k))^(1/prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018

A048165 Expansion of Product_{k > 0} 1/(1 + x^prime(k)).

Original entry on oeis.org

1, 0, -1, -1, 1, 0, 0, -1, 1, 0, 1, -2, 1, -1, 2, -2, 2, -3, 3, -3, 4, -4, 5, -6, 6, -6, 8, -9, 9, -11, 12, -13, 14, -16, 19, -19, 21, -25, 26, -28, 32, -36, 38, -41, 46, -50, 55, -60, 65, -70, 77, -85, 91, -99, 108, -116, 126, -138, 149, -160, 174, -188, 202, -219, 237, -255, 274, -296
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    nn=20;
    ser=Product[1/(1+x^p),{p,Select[Range[nn],PrimeQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,nn}] (* Gus Wiseman, Jun 06 2018 *)

Formula

a(n) = A184198(n) - A184199(n). - Vaclav Kotesovec, Jan 11 2021

A298423 Number of integer partitions of n such that the predecessor of each part is divisible by the number of parts.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 5, 2, 5, 4, 6, 2, 11, 2, 7, 8, 10, 2, 15, 2, 16, 11, 9, 2, 28, 7, 10, 14, 22, 2, 37, 2, 25, 18, 12, 17, 55, 2, 13, 23, 52, 2, 55, 2, 40, 51, 15, 2, 95, 13, 44, 34, 53, 2, 79, 37, 85, 41, 18, 2, 185, 2, 19, 80, 91, 54, 112, 2, 87, 56, 122, 2
Offset: 0

Views

Author

Gus Wiseman, Jan 19 2018

Keywords

Comments

Note that n is automatically divisible by the number of parts.

Examples

			The a(9) = 4 partitions: (9), (441), (711), (111111111).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Function[ptn,And@@(Divisible[#-1,Length[ptn]]&/@ptn)]]],{n,60}]

Formula

G.f.: Sum_{k>=0} x^k/Product_{i=1..k} (1-x^(k*i)).

A305630 Expansion of Product_{r = 1 or not a perfect power} 1/(1 - x^r).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 12, 16, 21, 28, 36, 48, 61, 78, 99, 124, 156, 195, 241, 299, 367, 450, 549, 670, 811, 982, 1183, 1422, 1704, 2040, 2431, 2894, 3435, 4070, 4811, 5679, 6684, 7858, 9217, 10797, 12623, 14738, 17174, 19988, 23225, 26951, 31227, 36141, 41759
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Comments

a(n) is the number of integer partitions of n such that each part is either 1 or not a perfect power (A001597, A007916).

Examples

			The a(5) = 6 integer partitions whose parts are 1's or not perfect powers are (5), (32), (311), (221), (2111), (11111).
		

Crossrefs

Programs

  • Maple
    q:= n-> is(n=1 or 1=igcd(map(i-> i[2], ifactors(n)[2])[])):
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(q(d), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 07 2018
  • Mathematica
    nn=20;
    radQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]==1];
    ser=Product[1/(1-x^p),{p,Select[Range[nn],radQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,0,nn}]

A305631 Expansion of Product_{r not a perfect power} 1/(1 - x^r).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 3, 4, 5, 7, 8, 12, 13, 17, 21, 25, 32, 39, 46, 58, 68, 83, 99, 121, 141, 171, 201, 239, 282, 336, 391, 463, 541, 635, 741, 868, 1005, 1174, 1359, 1580, 1826, 2115, 2436, 2814, 3237, 3726, 4276, 4914, 5618, 6445, 7359, 8414, 9594, 10947, 12453
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Comments

a(n) is the number of integer partitions of n whose parts are not perfect powers (A001597, A007916).

Examples

			The a(9) = 5 integer partitions whose parts are not perfect powers are (72), (63), (522), (333), (3222).
		

Crossrefs

Programs

  • Maple
    q:= n-> is(1=igcd(map(i-> i[2], ifactors(n)[2])[])):
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(q(d), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Jun 07 2018
  • Mathematica
    nn=100;
    wadQ[n_]:=n>1&&GCD@@FactorInteger[n][[All,2]]==1;
    ser=Product[1/(1-x^p),{p,Select[Range[nn],wadQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,0,nn}]

A280962 Number of integer partitions of the n-th even number or the n-th odd number using predecessors of prime numbers.

Original entry on oeis.org

1, 2, 4, 7, 11, 17, 26, 37, 53, 74, 101, 137, 183, 240, 314, 406, 520, 662, 837, 1049, 1311, 1627, 2008, 2469, 3021, 3678, 4466, 5397, 6499, 7804, 9338, 11137, 13251, 15715, 18589, 21938, 25823, 30322, 35535, 41544, 48471, 56448, 65602, 76097, 88128, 101867
Offset: 0

Views

Author

Gus Wiseman, Jan 11 2017

Keywords

Comments

a(n) is both the number of integer partitions of even numbers {0, 2, 4, 6, ...} = A005843 using primes minus one {1, 2, 4, 6, ...} = A006093 and the number of integer partitions of odd numbers {1, 3, 5, 7, ...} = A005408 using primes minus one.

Examples

			The a(4)=11 partitions of 9 are:
(621),   (6111),
(441),   (4221),   (42111),   (411111),
(22221), (222111), (2211111), (21111111),
(111111111).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i=2, 1,
          b(n, prevprime(i))+`if`(i-1>n, 0, b(n-i+1, i)))
        end:
    a:= n-> b(2*n, nextprime(2*n)):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 12 2017
  • Mathematica
    nn=60;invser=Product[1-x^(Prime[n]-1),{n,PrimePi[2nn-1]}];
    Table[SeriesCoefficient[1/invser,{x,0,n}],{n,1,2nn-1,2}]

Formula

G.f. G(x) satisfies: (1+x)*G(x^2) = Product_{p prime} 1/(1-x^(p-1)).
a(n) = A280954(A005408(n)) = A280954(A005843(n)).

A305632 Expansion of Product_{r = 1 or not a perfect power} 1/(1 + (-x)^r).

Original entry on oeis.org

1, 1, 0, 1, 2, 2, 1, 2, 4, 3, 2, 4, 6, 5, 4, 7, 10, 8, 7, 11, 15, 13, 12, 17, 22, 19, 18, 25, 30, 28, 26, 35, 42, 39, 38, 49, 59, 56, 54, 69, 81, 77, 76, 94, 110, 105, 105, 127, 147, 141, 142, 171, 195, 189, 190, 227, 257, 250, 254, 299, 335, 328, 334, 390, 432
Offset: 0

Views

Author

Gus Wiseman, Jun 07 2018

Keywords

Examples

			O.g.f.: 1/((1 - x)(1 + x^2)(1 - x^3)(1 - x^5)(1 + x^6)(1 - x^7)(1 + x^10)...).
		

Crossrefs

Programs

  • Mathematica
    nn=20;
    radQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]==1];
    ser=Product[1/(1+(-x)^p),{p,Select[Range[nn],radQ]}];
    Table[SeriesCoefficient[ser,{x,0,n}],{n,0,nn}]

A341154 Number of partitions of 2*n into exactly n prime powers (including 1).

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 13, 19, 24, 34, 42, 58, 71, 94, 116, 151, 182, 234, 282, 354, 424, 528, 627, 773, 914, 1113, 1311, 1585, 1854, 2227, 2599, 3095, 3597, 4262, 4931, 5811, 6704, 7855, 9035, 10542, 12080, 14036, 16047, 18561, 21161, 24397, 27736, 31866
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 06 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 48; CoefficientList[Series[Product[1/(1 - Boole[PrimePowerQ[k + 1]] x^k), {k, 1, nmax}], {x, 0, nmax}], x]
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d Boole[PrimePowerQ[d + 1]], {d, Divisors[k]}] a[n - k], {k, 1, n}]/n]; Table[a[n], {n, 0, 48}]

Formula

G.f.: Product_{p prime, k>=1} 1 / (1 - x^(p^k-1)).

A352064 Irregular triangle T(n,k) where row n lists the positions of n in A275314.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 9, 12, 16, 10, 18, 24, 32, 7, 15, 20, 27, 36, 48, 64, 14, 30, 40, 54, 72, 96, 128, 21, 25, 28, 45, 60, 80, 81, 108, 144, 192, 256, 42, 50, 56, 90, 120, 160, 162, 216, 288, 384, 512, 11, 35, 63, 75, 84, 100, 112, 135, 180, 240, 243, 320, 324, 432, 576, 768, 1024
Offset: 1

Views

Author

Michael De Vlieger, Mar 02 2022

Keywords

Comments

A table by Leonhard Euler.
Let L(n-1) be a partition of (n-1) whose parts m are restricted to predecessors of primes. Row n lists the products (m+1) for all such partitions L(n-1).
Greatest term in row n is 2^(n-1).
Least term in row p prime is p.

Examples

			Triangle begins:
   1;
   2;
   3,  4;
   6,  8;
   5,  9, 12, 16;
  10, 18, 24, 32;
   7, 15, 20, 27,  36,  48,  64;
  14, 30, 40, 54,  72,  96, 128;
  21, 25, 28, 45,  60,  80,  81, 108, 144, 192, 256;
  42, 50, 56, 90, 120, 160, 162, 216, 288, 384, 512;
  ...
Illustration of relationship of terms of row n and partitions of (n-1) such that all parts m are restricted to prime predecessors. We show the partitions in parentheses, adding 1 to each part m below in brackets to take the product. The products are terms in row n in this sequence.
      1 = (1);
          [2]
row 2:     2;
.
      2 = (2),    (1+1);
          [3]     [2*2]
row 3:     3,       4;
.
      3 = (2+1),  (1+1+1);
          [3*2]   [2*2*2]
row 4:     6,       8;
.
      4 = (4),    (2+2),    (2+1+1),     (1+1+1+1);
          [5]     [3*3]     [3*2*2]      [2*2*2*2]
row 5:     5,       9,        12,           16;
.
      5 = (4+1),  (2+2+1),  (2+1+1+1),   (1+1+1+1+1);
          [5*2]   [3*3*2]   [3*2*2*2]    [2*2*2*2*2]
row 6:    10,      18,        24,           32;
etc.
		

Crossrefs

Programs

  • Mathematica
    With[{n = 12}, Take[#, n] &@ Values@ KeySort@ PositionIndex@ Array[Total[Flatten[ConstantArray[#1 - 1, #2] & @@@ FactorInteger[#]]] &, 2^n]] // TableForm (* syntactically simple, or, more efficiently *)
    f[m_] := Block[{s = {Prime@ PrimePi[m + 1] - 1}}, KeySort@ Merge[#, Identity] &@ Join[{1 -> {}}, Reap[Do[If[# <= m, Sow[# -> s]; AppendTo[s, Last@ s], If[Last@ s == 1, s = DeleteCases[s, 1]; If[Length@ s == 0, Break[], s = MapAt[Prime[PrimePi[# + 1] - 1] - 1 &, s, -1]], s = MapAt[Prime[PrimePi[# + 1] - 1] - 1 &, s, -1]]] &@ Total[s], {i, Infinity}]][[-1, -1]] ]]; Map[Union[Times @@ # & /@ #] &, Values@ f[40] + 1] // Flatten

Formula

A280954(n) = length of row n.
Showing 1-9 of 9 results.