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.

Previous Showing 11-18 of 18 results.

A306433 Number of partitions of n into 2 distinct prime powers (not including 1).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 30 2019

Keywords

Examples

			a(12) = 3 because we have [9, 3], [8, 4] and [7, 5].
		

Crossrefs

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n, {2}], _?(And[UnsameQ @@ #, AllTrue[#, PrimePowerQ[#] &]] &)], {n, 0, 95}]

Formula

a(n) = [x^n y^2] Product_{k>=1} (1 + y*x^A246655(k)).

A344989 Smallest number whose number of partitions into n distinct primes is n, or zero if there are no such partitions.

Original entry on oeis.org

2, 16, 26, 33, 55, 59, 0, 0, 124, 159, 233, 227, 276, 0, 372, 480, 0, 0, 0, 752, 0, 920, 0, 1011, 0, 1211, 1425, 0, 0, 0, 0, 0, 2050, 2336, 2495, 0, 0, 0, 0, 3340, 0, 3712, 0, 0, 4303, 0, 0, 0, 0, 5195, 0, 5669, 0, 6163, 6673, 0, 0, 0, 7504, 0, 0, 8670, 0, 9304, 9623, 0, 0, 0, 10638, 10981, 0, 12062, 0
Offset: 1

Views

Author

Metin Sariyar, Jun 04 2021

Keywords

Comments

From David A. Corneth, Aug 21 2025: (Start)
How to prove a 0? I used the heuristic:
a(n) = 0 if 2*n consecutive integers can be written in strictly more than n ways as a sum of n distinct primes and up to that point no positive integer has exactly n such ways.
What other rules where used? (End)

Examples

			a(2) = 16 because 16 is the smallest number whose number of partitions into 2 distinct primes is 2; 16 = 3+13 = 5+11.
		

Crossrefs

Cf. A364692 asks for the largest number with the same properties.

Extensions

a(12)-a(20) from Alois P. Heinz, Jun 04 2021
More terms from David A. Corneth, Aug 21 2025

A352305 a(n) is the (conjectured) largest even number that can be expressed as the sum of two distinct primes in exactly n ways.

Original entry on oeis.org

6, 38, 68, 128, 158, 188, 398, 362, 458, 542, 632, 692, 602, 992, 808, 908, 1112, 1238, 1412, 1418, 1718, 1544, 1574, 1622, 1682, 2048, 2252, 2018, 2672, 2042, 2558, 2936, 2504, 2978, 2966, 3092, 3218, 3242, 3272, 3506, 3632, 3754, 4022, 4058, 4052, 4412, 4448, 4478
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 11 2022

Keywords

Examples

			a(5) = 188 because 188 = 7 + 181 = 31 + 157 = 37 + 151 = 61 + 127 = 79 + 109 and it is conjectured that 188 is the last term of A080854.
		

Crossrefs

Extensions

More terms from Hugo Pfoertner, Dec 18 2024

A362039 Least number s such that there are 2 different sets of primes { a1, a2, ..., an } and { b1, b2, ..., bn } with the integers in each set having the same sum s, the same sum of squares, etc., up to and including the same sum of (n-1)-st powers.

Original entry on oeis.org

16, 55, 120, 433, 378
Offset: 2

Views

Author

Jean-Marc Rebert, Apr 15 2023

Keywords

Comments

We are to find the least number s such that there is a solution in primes to the system of equations:
a1^k + a2^k + ... + an^k = b1^k + b2^k + ... + bn^k, (k = 1, 2, ..., n-1) and {a1, ..., an} != {b1, ..., bn}.
a(7), a(8) are respectively <= 2399, 348592.

Examples

			a(2) = 16, because 3 + 13 = 16 = 5 + 11 and no lesser sum of 2 distinct primes has this property.
a(3) = 55, because 7 + 19 + 29 = 55 = 11 + 13 + 31 and 7^2 + 19^2 + 29^2 = 1251 = 11^2 + 13^2 + 31^2, and no lesser sum of 3 distinct primes has this property.
a(4) = 120, because with u = [13, 29, 31, 47] and v = [17, 19, 41, 43], Sum_{i=1..4} u(i) = 120  = Sum_{i=1..4} v(i) and Sum_{i=1..4} u(i)^2 = 4100 = Sum_{i=1..4} v(i)^2 and Sum_{i=1..4} u(i)^3 = 1602000 = Sum_{i=1..4} v(i)^3 and no lesser sum of 4 distinct primes has this property.
From _Andrew Howroyd_, Apr 18 2023: (Start)
a(5) = 433 with {13, 59, 67, 131, 163} and {23, 31, 103, 109, 167}.
a(6) = 378 with {17, 37, 43, 83, 89, 109} and {19, 29, 53, 73, 97, 107}.
(End)
		

Crossrefs

Programs

  • PARI
    \\ Call with pr=1 to also print solution sets.
    a(n, pr=0)={
      forstep(s=3*n, oo, 2, my(P=vector(s,i,primepi(i)), X=primes(P[s]));
        local(found=0, M=Map(), V=vector(n));
        my(onSet()=my(key=vector(n-2, j, sum(i=1, n, V[i]^(j+1))), z);
          if(mapisdefined(M,key,&z), found++; if(pr, print(V, z)), mapput(M,key,V)));
        my(recurse(r,m,k)=if(k==0, onSet(), for(m=max(k,P[(r-1)\k])+1, min(m, P[r-3*(k-1)]), V[k]=X[m]; self()(r-X[m], m-1, k-1)) ));
        recurse(s, #X, n);
        if(found, return(s));
      )
    } \\ Andrew Howroyd, Apr 18 2023

Formula

a(2) = min({k >= 1 : A117929(k) >= 2}) = Min_{m >= 2} A087747(m) = A087747(2). - Peter Munn, May 01 2023

Extensions

a(5)-a(6) from Andrew Howroyd, Apr 18 2023
Edited by Peter Munn, May 01 2023

A370090 Numbers that can be expressed in exactly one way as the unordered sum of two distinct primes.

Original entry on oeis.org

5, 7, 8, 9, 10, 12, 13, 14, 15, 19, 21, 25, 31, 33, 38, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 11 2024

Keywords

Comments

Apparently, a number that is the predecessor or successor of a prime number does not have a sum as defined here, except for a finite number of primes, which may be {7, 11, 13, 37}. - Peter Luschny, Feb 16 2024

Examples

			5 = 2+3; 7 = 2+5; 8 = 3+5; 9 = 2+7; 10 = 3+7 (10 = 5+5 is not considered).
		

Crossrefs

Cf. A117929, A048974, A065091, A067187 (not necessarily distinct).
If we change 1 way (this sequence) we get A077914 (2 ways), A077969 (3 ways), A078299 (4 ways), A080854 (5 ways), and A080862 (6 ways).

Programs

  • Maple
    select(n -> A117929(n) = 1, [seq(1..265)]);  # Peter Luschny, Feb 16 2024
  • Mathematica
    tdpQ[{a_,b_}]:=AllTrue[{a,b},PrimeQ]&&a!=b; Select[Range[300],Count[IntegerPartitions[#,{2}],?tdpQ]==1&] (* _Harvey P. Dale, Dec 30 2024 *)
  • Python
    from sympy import sieve
    from collections import Counter
    from itertools import combinations
    def aupton(max):
        sieve.extend(max)
        a = Counter(c[0]+c[1] for c in combinations(sieve._list, 2))
        return [n for n in range(1, max+1) if a[n] == 1]
    print(aupton(265)) # Michael S. Branicky, Feb 16 2024

A140955 Even integers that do not have at least two partitions into 2 distinct primes.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 38
Offset: 1

Views

Author

Gil Broussard, Jul 25 2008

Keywords

Comments

If A056636(3) = 128 (as is conjectured), then 38 is the last term in the sequence. - Charles R Greathouse IV, Sep 07 2022

Examples

			8 is a term because 3+5 is the only sum of primes = 8.
16 is not in the sequence because 16 = 3+13 and 5+11.
The only ways to express 10 as a sum of two unordered primes are 3+7 and 5+5. In one of the sums the primes are distinct. Thus, 10 is in this sequence. - _Tanya Khovanova_, Sep 07 2022
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,100,2],Length[Select[Union/@IntegerPartitions[#,{2}],AllTrue[#,PrimeQ]&&Length[#]==2&]]<2&] (* James C. McMahon, Jul 15 2025 *)
  • PARI
    is(n)=if(n%2, return(0)); my(t); forprime(p=3, n\2-1, if(isprime(n-p) && t++>1, return(0))); 1 \\ Charles R Greathouse IV, Sep 07 2022

Extensions

Offset changed to 1 by Alois P. Heinz, Sep 07 2022

A286424 Number of partitions of p_n# into parts (q, k) both coprime to p_n#, with q prime and k nonprime, where p_n# = A002110(n).

Original entry on oeis.org

0, 0, 1, 1, 4, 110, 1432, 23338, 397661, 8193828, 212858328, 5941706227
Offset: 0

Views

Author

Michael De Vlieger, May 08 2017

Keywords

Comments

Number of totative pairs (q, k) such that prime q + k nonprime = p_n# and both gcd(q, p_n#) = 1 and gcd(k, p_n#) = 1, with p_n < q <= pi(p_n#), where pi(p_n#) = A000849(n) - n = A048862(n).
Primes p_n < q <= pi(p_n#) are greater than the greatest prime factor of p_n# = p_n, and are thus coprime to p_n#. By the definition of primorial, we need not consider p >= p_n, as these p are divisors of p_n#, i.e., gcd(p, p_n#) = p. Since the totatives of m can be paired such that a + b = m, we need only determine if (p_n# - q) is not prime in order to count pairs (q, k).
a(n) < floor(A005867(n)/2).
a(n) <= A048862(n).
The totative pair (q,1) = (p_n# - 1, 1) is counted by a(n) for n in A057704, with (p_n# - 1) appearing in A057705.

Examples

			a(0) = 0 by definition. A002110(0) = 1; 1 is coprime to all numbers; the only possible totative pair is (1,1) and this does not include both a prime and a nonprime.
a(1) = 0 since, of the floor(A005867(1)/2) = 1 totative pair (1,1) of A002110(1) = 2, none include a both a prime and a nonprime.
a(2) = 1 since, the only totative pair (1,5) of A002110(1) = 6 includes both a prime and a nonprime.
a(3) = 1 since only (1,29) includes both a prime and a nonprime.
a(4) = 4 since (23,187), (41,169), (67,143), (89,121) include a both a prime and a nonprime.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, Count[Prime@ Range[n + 1, PrimePi[P]], q_ /; ! PrimeQ[P - q]]]@ Product[Prime@ i, {i, n}], {n, 0, 9}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = (A000010(A002110(n)) - A048863(n)) - 2*A117929(A002110(n))
= (A005867(n) - A048863(n)) - 2*A117929(A002110(n))
= A048862(n) - 2*A117929(A002110(n)).

Extensions

a(11) from Giovanni Resta, May 09 2017

A352596 Conjecturally the number of positive even integers that can be expressed as the sum of two distinct primes in exactly n ways.

Original entry on oeis.org

3, 5, 9, 12, 12, 16, 19, 13, 24, 19, 21, 25, 15, 29, 28, 16, 31, 22, 34, 32, 20, 29, 26, 24, 28, 36, 34, 35, 37, 22, 29, 37, 36, 34, 39, 32, 39, 35, 28, 31, 28
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 22 2022

Keywords

Crossrefs

Previous Showing 11-18 of 18 results.