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

A352231 Numbers that can be expressed as the sum of two primes in exactly 9 ways.

Original entry on oeis.org

90, 132, 170, 196, 202, 220, 230, 236, 238, 244, 250, 254, 262, 268, 302, 314, 338, 346, 356, 388, 428, 458, 488
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 08 2022

Keywords

Examples

			90 = 7+83 = 11+79 = 17+73 = 19+71 = 23+67 = 29+61 = 31+59 = 37+53 = 43+47.
		

Crossrefs

Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), this sequence (k=9), A352233 (k=10).

Programs

Formula

A061358(a(n)) = 9. - Alois P. Heinz, Mar 08 2022

A352233 Numbers that can be expressed as the sum of two primes in exactly 10 ways.

Original entry on oeis.org

114, 126, 162, 260, 290, 304, 316, 328, 344, 352, 358, 374, 382, 416, 542, 632
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 08 2022

Keywords

Comments

All terms are even. Conjecture: 632 is the last term. Hardy and Littlewood conjectured a growth rate of the number of decompositions for large even numbers (see Conjecture A in page 32 of Hardy and Littlewood reference), implying this sequence is finite. - Chai Wah Wu, Mar 10 2022

Examples

			114 = 5+109 = 7+107 = 11+103 = 13+101 = 17+97 = 31+83 = 41+73 = 43+71 = 47+67 = 53+61.
		

Crossrefs

Numbers that can be expressed as the sum of two primes in k ways for k=0..10: A014092 (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), this sequence (k=10).

Programs

A048974 Odd numbers that are the sum of 2 primes.

Original entry on oeis.org

5, 7, 9, 13, 15, 19, 21, 25, 31, 33, 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
Offset: 1

Views

Author

Keywords

Comments

A048974, A052147, A067187 and A088685 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003

Crossrefs

Programs

  • Mathematica
    Select[Flatten@Table[Prime[i] + Prime[j], {i, 100}, {j, 1, i}], # < Prime[100] && OddQ[#] &] (* Robert Price, Apr 21 2025 *)

Formula

One of the primes must be 2, so this is simply the odd primes + 2.
a(n) = A065091(n) + 2. - Sean A. Irvine, Jul 15 2021

A088685 Records for the sum-of-primes function sopfr(n) if sopfr(prime) is taken to be 0.

Original entry on oeis.org

0, 4, 5, 6, 7, 9, 10, 13, 15, 19, 21, 25, 31, 33, 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, 271
Offset: 1

Views

Author

Eric W. Weisstein, Oct 05 2003

Keywords

Comments

A048974, A052147 and A067187 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003

Crossrefs

Programs

  • Mathematica
    Union@ FoldList[Max, Table[Total@ Flatten@ Map[ConstantArray[#1, #2] /. 1 -> 0 & @@ # &, FactorInteger@ n] - n Boole[PrimeQ@ n], {n, 540}]] (* Michael De Vlieger, Jun 29 2017 *)
  • PARI
    sopfr(k) = my(f=factor(k)); sum(j=1, #f~, f[j, 1]*f[j, 2]);
    lista(nn) = {my(record = -1); for (n=1, nn, if (! isprime(n), if ((x=sopfr(n)) > record, record = x; print1(record, ", "));););} \\ Michel Marcus, Jun 29 2017
    
  • Python
    from sympy import factorint, isprime
    def sopfr(n):
        f=factorint(n)
        return sum([i*f[i] for i in f])
    l=[]
    record=-1
    for n in range(1, 501):
        if not isprime(n):
            x=sopfr(n)
            if x>record:
                record=x
                l.append(record)
    print(l) # Indranil Ghosh, Jun 29 2017

A352296 Smallest number that can be expressed as the sum of two primes in exactly n ways or -1 if no such number exists.

Original entry on oeis.org

1, 4, 10, 22, 34, 48, 60, 78, 84, 90, 114, 144, 120, 168, 180, 234, 246, 288, 240, 210, 324, 300, 360, 474, 330, 528, 576, 390, 462, 480, 420, 570, 510, 672, 792, 756, 876, 714, 798, 690, 1038, 630, 1008, 930, 780, 960, 870, 924, 900, 1134, 1434, 840, 990, 1302
Offset: 0

Views

Author

Chai Wah Wu, Mar 11 2022

Keywords

Comments

Conjecture: a(n) != -1 for all n.
If n > 0 and a(n) != -1, then a(n) is even.
a(0) = A014092(1)
a(1) = A067187(1)
a(2) = A067188(1)
a(3) = A067189(1)
a(4) = A067190(1)
a(5) = A067191(1)
a(6) = A066722(1)
a(7) = A352229(1)
a(8) = A352230(1)
a(9) = A352231(1)
a(10) = A352233(1)

Crossrefs

Programs

  • Mathematica
    f[n_] := Count[IntegerPartitions[n, {2}], ?(And @@ PrimeQ[#] &)]; seq[max] :=  Module[{s = Table[0, {max}], n = 1, c = 0, k}, While[c < max, k = f[n]; If[k < max && s[[k + 1]] == 0, c++; s[[k + 1]] = n]; n++]; s]; seq[50] (* Amiram Eldar, Mar 11 2022 *)
  • Python
    from itertools import count
    from sympy import nextprime
    def A352296(n):
        if n == 0:
            return 1
        pset, plist, pmax = {2}, [2], 4
        for m in count(2):
            if m > pmax:
                plist.append(nextprime(plist[-1]))
                pset.add(plist[-1])
                pmax = plist[-1]+2
            c = 0
            for p in plist:
                if 2*p > m:
                    break
                if m - p in pset:
                    c += 1
            if c == n:
                return m

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
Previous Showing 11-16 of 16 results.