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-20 of 20 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

A136244 Least positive integer k such that 2k can be expressed as the sum of two primes in exactly n ways.

Original entry on oeis.org

1, 2, 5, 11, 17, 24, 30, 39, 42, 45, 57, 72, 60, 84, 90, 117, 123, 144, 120, 105, 162, 150, 180, 237, 165, 264, 288, 195, 231, 240, 210, 285, 255, 336, 396, 378, 438, 357, 399, 345, 519, 315, 504, 465, 390, 480, 435, 462, 450, 567, 717, 420, 495, 651, 540, 615, 759, 525, 570, 693, 645
Offset: 0

Views

Author

K. B. Subramaniam (shunya_1950(AT)yahoo.co.in), Dec 24 2007

Keywords

Comments

It appears that 2, 3, 4, 6 are the only numbers k such that 2k can be expressed as the sum of two primes in only one way.
Except when n = 1, a(n) = A258713(n). The first 11 terms of this sequence are the same as the initial terms of A053033. If a(n) exists for all n then A053033 is a subsequence. - Andrew Howroyd, Jan 28 2020

Examples

			a(3) = 11: 22 = 3 + 19 = 5 + 17 = 11 + 11. Also 22 is the least number which could be expressed as the sum of two prime numbers in exactly three ways.
		

Crossrefs

Programs

  • PARI
    a(n, lim=oo)={for(i=1, lim, my(s=0); forprime(p=2, i, s+=isprime(2*i-p)); if(s==n, return(i))); -1} \\ Andrew Howroyd, Jan 28 2020

Formula

From Andrew Howroyd, Jan 28 2020: (Start)
a(n) = A023036(n) / 2.
A045917(a(n)) = n. (End)

Extensions

a(0)=1 prepended, a(5) corrected and a(7) and beyond from Andrew Howroyd, Jan 28 2020

A056636 Conjecturally largest even integer which is the sum of two primes in at most n ways.

Original entry on oeis.org

2, 12, 68, 128, 152, 188, 332, 398, 398, 488, 632, 692, 692, 992, 992, 992, 1112, 1112, 1412, 1412, 1448, 1718, 1718, 1718, 1718, 2048, 2252, 2252, 2672, 2672, 2672, 2936, 2936, 2936, 2978, 3092, 3092, 3218, 3272, 3296, 3632, 3632, 3754, 4022, 4058, 4412
Offset: 0

Views

Author

Brian Galebach, Aug 17 2000

Keywords

Comments

The Goldbach conjecture is that every even number >= 4 is the sum of two primes.

Examples

			a(1) is 12 because it is the largest even integer having only 1 distinct way to express it as the sum of two primes (7+5) and a(0) < 12.
a(8) = 398 because it is the largest number in A000954 for n <= 8.
		

Crossrefs

Formula

a(n) = max({A000954(i),i=0..n}). - Robert Israel, Mar 21 2016

A109679 Smallest even number which is the unordered sum of two primes in more ways than any previous even number.

Original entry on oeis.org

2, 4, 10, 22, 34, 48, 60, 78, 84, 90, 114, 120, 168, 180, 210, 300, 330, 390, 420, 510, 630, 780, 840, 990, 1050, 1140, 1260, 1470, 1650, 1680, 1890, 2100, 2310, 2730, 3150, 3570, 3990, 4200, 4410, 4620, 5250, 5460, 6090, 6510, 6930, 7980, 8190, 9030, 9240
Offset: 1

Views

Author

Gilmar Rodriguez Pierluissi (gilmarlily(AT)yahoo.com), Aug 30 2005

Keywords

Comments

Record value of A023036 or A045917.
a(n)== 0 (mod 30) for n > 13.

Crossrefs

Essentially the same as A082917. Cf. A082918, A002375, A023036, A045917, A000954.

Programs

  • Mathematica
    f[n_] := Length[ Select[n - Prime@ Range@ PrimePi[n/2], PrimeQ]]; t = {}; mxm = -1; Do[ If[ f[n] > mxm, AppendTo[t, n]; mxm = f[n]], {n, 2, 9000, 2}]; t

Extensions

Edited and extended by Robert G. Wilson v, Sep 08 2005
Changed offset from 0 to 1 by Vincenzo Librandi, Apr 18 2013

A281875 Least k such that phi(k) is the sum of two primes in exactly n ways, or 0 if no such k exists.

Original entry on oeis.org

1, 5, 11, 23, 37, 65, 61, 79, 103, 161, 127, 157, 143, 199, 181, 307, 277, 313, 241, 211, 409, 341, 379, 487, 331, 623, 577, 551, 463, 527, 421, 571, 601, 673, 829, 757, 877, 997, 1571, 691, 1039, 631, 1009, 961, 869, 967, 1543, 989, 1057, 1247, 2411, 899, 991, 1303, 1147, 1231, 1999
Offset: 0

Views

Author

Altug Alkan, Feb 01 2017

Keywords

Comments

Note that this sequence is not the subsequence of A037143; i.e., a(318) = 7^3 * 47.

Examples

			a(3) = 23 because phi(23) = 22 = 3 + 19 = 5 + 17 = 11 + 11 and 23 is the least number with this property.
		

Crossrefs

Extensions

a(0) = 1 prepended by Chai Wah Wu, Feb 03 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

A332981 Smallest semiprime m = p*q such that the sum s = p + q can be expressed as an unordered sum of two primes in exactly n ways.

Original entry on oeis.org

4, 21, 57, 93, 183, 291, 327, 395, 501, 545, 695, 791, 815, 831, 1145, 1205, 1415, 1631, 1461, 1745, 1941, 1865, 2661, 2315, 2615, 2855, 2495, 2285, 3665, 2705, 2721, 3521, 3561, 3351, 3755, 4341, 3545, 4701, 4265, 4881, 3981, 4821, 5601, 5255, 6671, 6041, 4595
Offset: 1

Views

Author

Michel Lagneau, Mar 05 2020

Keywords

Comments

The unique square and even term of the sequence is a(1) = 4.
For n = 1, the sequence of semiprimes having a unique decomposition as the sum of two primes begins with 4, 6, 9, 10, 14, 15, 22, 26, 34, 35, 38, 46, 58, 62, ... containing the even semiprimes (A100484).
We observe a majority of terms where a(n) == 5 (mod 10).

Examples

			a(11) = 695 because 695 = 5*139 and the sum 5 + 139 = 144 = 5+139 = 7+137 = 13+131 = 17+127 = 31+113 = 37+107 = 41+103 = 43+101 = 47+97 = 61+83 = 71+73. There are exactly 11 decompositions of 144 into an unordered sum of two primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    for n from 1 to 50 do:
    ii:=0:
    for k from 2 to 10^8 while(ii=0) do:
    x:=factorset(k):it:=0:
    if bigomega(k) = 2
      then
       s:=x[1]+k/x[1]:
        for m from 1 to s/2 do:
         if isprime(m) and isprime(s-m)
          then
           it:=it+1:
           else fi:
         od:
         if it = n
         then
          ii:=1: printf(`%d, `,k):
         else fi:
         fi:
        od:
        od:
  • PARI
    nbp(k) = {my(nb = 0); forprime(p=2, k\2, if (isprime(k-p), nb++););nb;}
    a(n) = {forcomposite(k=1, oo, if (bigomega(k)==2, my(x=factor(k)[1,1]); if (nbp(x+k/x)==n, return(k));););} \\ Michel Marcus, Apr 26 2020

A356442 a(n) is the least positive even number that is the unordered sum of two primes congruent mod 10 in exactly n ways.

Original entry on oeis.org

2, 4, 26, 86, 126, 174, 264, 324, 396, 456, 546, 594, 624, 876, 966, 984, 924, 954, 1326, 1344, 1386, 1512, 1596, 1638, 1848, 1764, 2046, 2226, 2838, 2574, 2706, 2604, 2772, 2436, 3366, 3066, 2964, 3432, 3894, 3738, 3234, 3696, 3654, 4074, 4446, 4158, 4368, 4494, 4788, 5016, 4746, 5754, 4914
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Aug 07 2022

Keywords

Comments

a(n) is the least even number k such that there are exactly n unordered pairs of primes (p,q) with p + q = k and p and q have the same last decimal digit.

Examples

			a(3) = 86 because 86 = 3 + 83 = 13 + 73 = 43 + 43, all summands being prime with last digit 3, and 86 is the least even number that works.
		

Crossrefs

Cf. A023036.

Programs

  • Maple
    f:= proc(m) local d, p;
      if m mod 10 = 0 then return 0 fi;
      d:= chrem([m/2 mod 5, 1],[5,2]);
      nops(select(p -> isprime(p) and isprime(m-p), [seq(p,p=d..m/2,10)]))
    end proc:
    f(4):= 1:
    M:= 100: # to get a(0)..a(M)
    V:= Array(0..M): count:= 0:
    for m from 2 by 2 while count < M+1 do
      v:= f(m);
      if v <= M and V[v] = 0 then V[v]:= m; count:= count+1 fi
    od:
    convert(V,list);

A357816 a(n) is the first even number k such that there are exactly n pairs (p,q) where p and q are prime, p<=q, p+q = k, and p+A001414(k) and q+A001414(k) are also prime.

Original entry on oeis.org

2, 16, 60, 72, 220, 132, 374, 276, 492, 638, 636, 852, 620, 854, 996, 1056, 1026, 1212, 2070, 1530, 2610, 3976, 3844, 1488, 1572, 4812, 4770, 3942, 2484, 5028, 3234, 4668, 6036, 3276, 5172, 5532, 6756, 2730, 6084, 4230, 6390, 9132, 14134, 4620, 9674, 10692, 6600, 8910, 10836, 12204, 18852, 9660
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Oct 13 2022

Keywords

Examples

			a(3) = 72 because A001414(72) = 12 and there are 3 pairs: (5,67), (11,61) and (31,41) where 5+67 = 11+61 = 31+41 = 72 and 5, 5+12 = 17, 67, 67+12 = 79, 11, 11+12 = 23, 61, 61+12 = 73, 31, 31+12 = 43, 41, and 41+12 = 53 are all prime; and this is the first even number with 3 such pairs.
		

Crossrefs

Programs

  • Maple
    sp:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2]) end proc:
    f:= proc(n) local s,p,q,count;
        s:= sp(n);
        if s::odd then return 0 fi;
        p:= 2; count:= 0;
        do
          p:= nextprime(p);
          q:= n-p;
          if p > q then return count fi;
          if isprime(p+s) and isprime(q) and isprime(q+s) then count:= count+1 fi;
        od;
    end proc:
    V:= Array(0..60): count:= 0:
    for n from 2 by 2 while count < 61 do
      v:= f(n);
      if v <= 60 and V[v] = 0 then V[v]:= n; count:= count+1;  fi
    od:
    convert(V,list);
  • Mathematica
    a[n_] := Block[{k=2, s}, While[True, s = Plus @@ Times @@@ FactorInteger@ k; If[n == Length@ Select[ Prime@ Range@ PrimePi[k/2], And @@ PrimeQ@ {k-#, #+s, k-#+s} &], Break[]]; k += 2]; k]; a /@ Range[0, 20] (* Giovanni Resta, Oct 24 2022 *)

A376287 Index of first occurrence of n in A129363, or 0 if no such number exists.

Original entry on oeis.org

2, 6, 10, 22, 48, 120, 114, 298, 240, 540, 288, 1620, 210, 300, 702, 840, 660, 2312, 1290, 4284, 1332, 2580, 2070, 2100, 1890, 5100, 2340, 5580, 3720, 6660, 3612, 6240, 2310, 10288, 3540, 4680, 4788, 5460, 4410, 5940, 6120, 10200, 4200, 4620, 3570, 10560, 5700, 16588, 5250
Offset: 0

Views

Author

Robert G. Wilson v, Sep 19 2024

Keywords

Comments

Twin prime analogous to A023036.
Conjecture: a(n) > 0. Checked to 1010.
Conjectured last occurrence: 4208, 24536, 28916, 21278, 51806, 68078, 73538, 89216, 83978, ..., .
Conjecture number of terms for A129363(k) = n: 35, 115, 285, 327, 557, 537, 723, 652, 882, ..., .
A129363(n) = 0: A007534.

Crossrefs

Programs

  • Mathematica
    tp = Select[Prime@Range@ 16340, PrimeQ[# -2] || PrimeQ[# +2] &]; f[n_] := Length@ IntegerPartitions[n, {2, 2}, tp]; t[_] := 0; k = 2; While[k < 10201, a = f@k; If[ t[a] == 0, t[a] = k]; k += 2]; t /@ Range[0, 75]
Previous Showing 11-20 of 20 results.