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

A014689 a(n) = prime(n)-n, the number of nonprimes less than prime(n).

Original entry on oeis.org

1, 1, 2, 3, 6, 7, 10, 11, 14, 19, 20, 25, 28, 29, 32, 37, 42, 43, 48, 51, 52, 57, 60, 65, 72, 75, 76, 79, 80, 83, 96, 99, 104, 105, 114, 115, 120, 125, 128, 133, 138, 139, 148, 149, 152, 153, 164, 175, 178, 179, 182, 187, 188, 197, 202, 207, 212, 213, 218, 221, 222
Offset: 1

Views

Author

Keywords

Comments

a(n) = A048864(A000040(n)) = number of nonprimes in RRS of n-th prime. - Labos Elemer, Oct 10 2002
A000040 - A014689 = A000027; in other words, the sequence of natural numbers subtracted from the prime sequence produces A014689. - Enoch Haga, May 25 2009
a(n) = A000040(n) - n. a(n) = inverse (frequency distribution) sequence of A073425(n), i.e., number of terms of sequence A073425(n) less than n. a(n) = A065890(n) + 1, for n >= 1. a(n) - 1 = A065890(n) = the number of composite numbers, i.e., (A002808) less than n-th primes, (i.e., < A000040(n)). - Jaroslav Krizek, Jun 27 2009
a(n) = A162177(n+1) + 1, for n >= 1. a(n) - 1 = A162177(n+1) = the number of composite numbers, i.e., (A002808) less than (n+1)-th number of set {1, primes}, (i.e., < A008578(n+1)). - Jaroslav Krizek, Jun 28 2009
Conjecture: Each residue class contains infinitely many terms of this sequence. Similarly, for any integers m > 0 and r, we have prime(n) + n == r (mod m) for infinitely many positive integers n. - Zhi-Wei Sun, Nov 25 2013
First differences are A046933 = differences minus one between successive primes. - Gus Wiseman, Jan 18 2020

Crossrefs

Equals A014692 - 1.
The sum of prime factors of n is A001414(n).
The sum of prime indices of n is A056239(n).
Their difference is A331415(n).

Programs

Formula

G.f: b(x) - x/((1-x)^2), where b(x) is the g.f. of A000040. - Mario C. Enriquez, Dec 13 2016

Extensions

More terms from Vasiliy Danilov (danilovv(AT)usa.net), Jul 1998
Correction for Aug 2009 change of offset in A158611 and A008578 by Jaroslav Krizek, Jan 27 2010

A331416 Irregular triangle read by rows where T(n,k) is the number of integer partitions y of n such that Sum_i prime(y_i) = k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 17 2020

Keywords

Examples

			Triangle begins:
  1
  0 0 1
  0 0 0 1 1
  0 0 0 0 0 2 1
  0 0 0 0 0 0 1 3 1
  0 0 0 0 0 0 0 0 2 3 1 1
  0 0 0 0 0 0 0 0 0 1 4 3 1 2
  0 0 0 0 0 0 0 0 0 0 0 2 5 3 2 2 0 1
  0 0 0 0 0 0 0 0 0 0 0 0 1 4 6 3 4 2 0 2
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 6 6 4 6 2 1 2 0 1
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 4 8 6 6 7 2 4 2 0 1 0 0 0 1
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 6 9 7 9 7 3 7 2 1 1 0 0 0 2
Row n = 8 counts the following partitions (empty column not shown):
  (2222)  (332)    (44)      (41111)    (53)        (611)   (8)
          (422)    (431)     (311111)   (62)        (5111)  (71)
          (3221)   (3311)    (2111111)  (521)
          (22211)  (4211)               (11111111)
                   (32111)
                   (221111)
Column k = 19 counts the following partitions:
  (8)   (6111)   (532)        (443)       (33222)
  (71)  (51111)  (622)        (4331)      (42222)
                 (5221)       (4421)      (322221)
                 (4111111)    (33311)     (2222211)
                 (31111111)   (43211)
                 (211111111)  (332111)
                              (422111)
                              (3221111)
                              (22211111)
		

Crossrefs

Row lengths are A331417.
Row sums are A000041.
Column sums are A000607.
Shifting row n to the left n times gives A331385.
Partitions whose Heinz number is divisible by their sum of primes: A330953.
Partitions of whose sum of primes is divisible by their sum are A331379.
Partitions whose product divides their sum of primes are A331381.
Partitions whose product equals their sum of primes are A331383.

Programs

  • Mathematica
    maxm[n_]:=Max@@Table[Total[Prime/@y],{y,IntegerPartitions[n]}];
    Table[Length[Select[IntegerPartitions[n],Total[Prime/@#]==k&]],{n,0,10},{k,0,maxm[n]}]

A331415 Sum of prime factors minus sum of prime indices of n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 2, 3, 6, 3, 7, 4, 3, 4, 10, 3, 11, 4, 4, 7, 14, 4, 4, 8, 3, 5, 19, 4, 20, 5, 7, 11, 5, 4, 25, 12, 8, 5, 28, 5, 29, 8, 4, 15, 32, 5, 6, 5, 11, 9, 37, 4, 8, 6, 12, 20, 42, 5, 43, 21, 5, 6, 9, 8, 48, 12, 15, 6, 51, 5, 52, 26, 5, 13, 9, 9
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2020

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 factors of 12 are {2,2,3}, while the prime indices are {1,1,2}, so a(12) = 7 - 4 = 3.
		

Crossrefs

The number of k's is A331387(k) = sum of k-th column of A331385.
The sum of prime factors of n is A001414(n).
The sum of prime indices of n is A056239(n).
Numbers divisible by the sum of their prime factors are A036844.
Sum of prime factors is divisible by sum of prime indices: A331380
Product of prime indices equals sum of prime factors: A331384.

Programs

  • Mathematica
    Table[Total[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>k*(p-PrimePi[p])]],{n,30}]

Formula

Totally additive with a(prime(k)) = prime(k) - k = A014689(k).
a(n) = A001414(n) - A056239(n).

A331385 Irregular triangle read by rows where T(n,k) is the number of integer partitions y of n such that Sum_i prime(y_i) = n + k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 17 2020

Keywords

Examples

			Triangle begins:
  1
  0 1
  0 1 1
  0 0 2 1
  0 0 1 3 1
  0 0 0 2 3 1 1
  0 0 0 1 4 3 1 2
  0 0 0 0 2 5 3 2 2 0 1
  0 0 0 0 1 4 6 3 4 2 0 2
  0 0 0 0 0 2 6 6 4 6 2 1 2 0 1
  0 0 0 0 0 1 4 8 6 6 7 2 4 2 0 1 0 0 0 1
  0 0 0 0 0 0 2 6 9 7 9 7 3 7 2 1 1 0 0 0 2
Row n = 8 counts the following partitions (empty column not shown):
  (2222)  (332)    (44)      (41111)    (53)        (611)   (8)
          (422)    (431)     (311111)   (62)        (5111)  (71)
          (3221)   (3311)    (2111111)  (521)
          (22211)  (4211)               (11111111)
                   (32111)
                   (221111)
Column k = 5 counts the following partitions:
  (11111)  (411)    (43)     (332)    (3222)   (22222)
           (3111)   (331)    (422)    (22221)
           (21111)  (421)    (3221)
                    (3211)   (22211)
                    (22111)
		

Crossrefs

Row lengths are A331418.
Row sums are A000041.
Column sums are A331387.
Shifting row n to the right n times gives A331416.
Partitions whose sum of primes is divisible by their sum are A331379.
Partitions whose product divides their sum of primes are A331381.
Partitions whose product equals their sum of primes are A331383.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Total[Prime/@#]==m&]],{n,0,10},{m,n,Max@@Table[Total[Prime/@y],{y,IntegerPartitions[n]}]}]

A331387 Number of integer partitions whose sum of primes of parts equals their sum of parts plus n.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 24, 34, 47, 64, 86, 113, 148, 191, 245, 310, 390, 486, 602, 740, 907, 1104, 1338, 1613, 1937, 2315, 2758, 3272, 3871, 4562, 5362, 6283, 7344, 8558, 9952, 11542, 13356, 15419, 17766, 20425, 23440, 26846, 30696, 35032, 39917, 45406
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2020

Keywords

Comments

Primes of parts means the prime counting function applied to the part sizes. Equivalently, a(n) is the number of integer partitions with part sizes in A014689(n) interpreted as a multiset. - Andrew Howroyd, Apr 17 2021

Examples

			The a(0) = 1 through a(5) = 16 partitions:
  ()  (1)  (3)   (4)    (33)    (43)
      (2)  (11)  (31)   (41)    (331)
           (21)  (32)   (42)    (332)
           (22)  (111)  (311)   (411)
                 (211)  (321)   (421)
                 (221)  (322)   (422)
                 (222)  (1111)  (3111)
                        (2111)  (3211)
                        (2211)  (3221)
                        (2221)  (3222)
                        (2222)  (11111)
                                (21111)
                                (22111)
                                (22211)
                                (22221)
                                (22222)
For example, the partition (3,2,2,1) is counted under n = 5 because it has sum of primes 5+3+3+2 = 13 and its sum of parts plus n is also 3+2+2+1+5 = 13.
		

Crossrefs

Column sums of A331385.
Partitions into primes are A000607.
Partitions whose sum of primes is divisible by their sum are A331379.
Partitions whose product divides their sum of primes are A331381.
Partitions whose product equals their sum of primes are A331383.

Programs

  • Mathematica
    Table[Sum[Length[Select[IntegerPartitions[k],Total[Prime/@#]==k+n&]],{k,0,2*n}],{n,0,10}]
  • PARI
    seq(n)={my(m=1); while(prime(m)-m<=n, m++); Vec(1/prod(k=1, m, 1 - x^(prime(k)-k) + O(x*x^n)))} \\ Andrew Howroyd, Apr 16 2021

Formula

G.f.: 1/Product_{k>=1} 1 - x^(prime(k)-k). - Andrew Howroyd, Apr 16 2021

Extensions

Terms a(31) and beyond from Andrew Howroyd, Apr 16 2021

A331417 Maximum sum of primes of the parts of an integer partition of n.

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 0

Views

Author

Gus Wiseman, Jan 17 2020

Keywords

Comments

For n > 4, a(n) = prime(n).

Crossrefs

Converges to A000040.
Row lengths of A331416.
The corresponding minimum is A007494.
Partitions whose sum of primes is divisible by their sum are A331379.

Programs

  • Mathematica
    Table[Max@@Table[Total[Prime/@y],{y,IntegerPartitions[n]}],{n,0,10}]

Formula

a(n) = A331418(n) + n - 1.

A366851 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n such that the sum of primes indexed by all parts greater than one is k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 01 2023

Keywords

Comments

To illustrate the definition, the sum of primes indexed by all parts greater than one of the partition (5,2,2,1) is prime(5) + prime(2) + prime(2) = 17.

Examples

			Triangle begins:
  1
  1
  1 0 0 1
  1 0 0 1 0 1
  1 0 0 1 0 1 1 1
  1 0 0 1 0 1 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 1 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 2 0 2 1 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 2 2 2 2 1 1 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 4 2 3 2 0 3 1 0 0 0 0 0 1
  1 0 0 1 0 1 1 1 1 1 2 2 2 3 3 3 4 5 4 4 3 3 3 2 3 0 1 0 0 1 0 1
The T(8,13) = 3 partitions are: (6,1,1), (4,2,2), (3,3,2).
The T(10,17) = 4 partitions are: (7,1,1,1), (5,2,2,1), (4,4,2), (4,3,3).
		

Crossrefs

Row lengths are A055670.
Columns appear to converge to A099773.
A bisected even version is A116598 (counts partitions by number of 1's).
Counting all parts (not just > 1) gives A331416, shifted A331385.
A000041 counts integer partitions, strict A000009 (also into odds).
A113685 counts partitions by sum of odd parts, rank statistic A366528.
A330953 counts partitions with Heinz number divisible by sum of primes.
A331381 counts partitions with (product)|(sum of primes), equality A331383.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Total[Select[Prime/@#,OddQ]]==k&]], {n,0,10}, {k,0,If[n<=1,0,Prime[n]]}]
Showing 1-7 of 7 results.