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.

User: Marcin Barylski

Marcin Barylski's wiki page.

Marcin Barylski has authored 11 sequences. Here are the ten most recent ones:

A374613 Prime numbers p with the property that neither of 2*(p+next prime to p)+/-1 is prime.

Original entry on oeis.org

29, 71, 73, 79, 83, 127, 131, 137, 167, 173, 193, 197, 211, 223, 229, 233, 239, 251, 269, 331, 347, 349, 373, 419, 421, 431, 433, 439, 457, 467, 487, 503, 509, 541, 563, 577, 587, 619, 641, 647, 653, 659, 661, 691, 719, 727, 733, 743, 751, 797, 809, 811, 821, 829, 839, 853, 859, 863, 887
Offset: 1

Author

Marcin Barylski, Jul 14 2024

Keywords

Comments

Conjecture: this sequence is infinite.

Examples

			2 is not a term because 2*(2+3)+1=11 is a prime.
5 is not a term because 2*(5+7)-1=23 is a prime.
29 is a term because neither 2(29+31)+1 nor 2(29+31)-1 is a prime.
		

Programs

  • Mathematica
    Prime[Select[Range[155], !PrimeQ[2(Prime[#]+Prime[#+1])-1] && !PrimeQ[2(Prime[#]+Prime[#+1])+1]&]] (* Stefano Spezia, Jul 15 2024 *)

A346659 Primes that are not of the form p*q +- 2 where p and q are primes (not necessarily distinct).

Original entry on oeis.org

3, 5, 29, 43, 61, 73, 101, 103, 107, 137, 149, 151, 173, 191, 193, 197, 227, 229, 241, 271, 277, 281, 283, 313, 347, 349, 421, 431, 433, 457, 461, 463, 523, 569, 601, 607, 617, 619, 641, 643, 659, 661, 727, 821, 823, 827, 857, 859, 883, 929, 1019, 1021, 1031
Offset: 1

Author

Marcin Barylski, Jul 27 2021

Keywords

Comments

Conjecture: this sequence is infinite.

Examples

			2 is not a term because 2 = 2*2 - 2.
3 is a term because neither 1 (3-2) nor 5 (3+2) is a product of two primes.
		

Crossrefs

Cf. A207526 (complementary sequence).

Programs

  • Maple
    q:= n-> andmap(x-> numtheory[bigomega](x)<>2, [n-2, n+2]):
    select(q, [ithprime(i)$i=1..200])[];  # Alois P. Heinz, Jul 30 2021
  • Mathematica
    Select[Range[3, 1000], PrimeQ[#] && PrimeOmega[# - 2] != 2 && PrimeOmega[# + 2] != 2 &] (* Amiram Eldar, Jul 29 2021 *)
  • Python
    from sympy import factorint, primerange
    def semiprime(n): return sum(e for e in factorint(n).values()) == 2
    def ok(p): return not semiprime(p-2) and not semiprime(p+2)
    def aupto(limit): return list(filter(ok, primerange(1, limit+1)))
    print(aupto(1031)) # Michael S. Branicky, Jul 29 2021

Extensions

More terms from Michael S. Branicky, Jul 29 2021

A333779 Positive numbers m used to build entire prime set by m +/- n without duplication or 0 if there is no such m.

Original entry on oeis.org

2, 4, 9, 16, 27, 42, 23, 60, 51, 70, 93, 120, 85, 114, 153, 56, 165, 174, 155, 132, 213, 218, 201, 234, 253, 288, 225, 254, 135, 360, 323, 342, 315, 274, 303, 384, 395, 420, 405, 440, 357, 420, 481, 534, 465, 454
Offset: 0

Author

Marcin Barylski, Apr 05 2020

Keywords

Comments

Conjecture: every prime is eventually constructed by the sequence.
Taking into account first 10 terms: a(0),a(1),...a(9) = [2, 4, 9, 16, 27, 42, 23, 60, 51, 70] it is possible to build the following primes: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 67, 79], the only not covered (yet) primes <= 79 are: [41, 71, 73]. 73 will be covered by a(12)=85 (73=85-12), and both 41 and 71 by a(15)=56 (41=56-15, 71=56+15).
The truth of Polignac's conjecture would imply that all terms are well defined. - Rémy Sigrist, Apr 26 2020
a(n) > 0 for 1 <= n <= 10^6. - David A. Corneth, Jun 06 2020

Examples

			a(0)=2, because 2=2+0=2-0 and 2 is prime.
a(1)=4, because 3=4-1, 5=4+1, both 3 and 5 are primes, not covered yet.
a(1) is not 3 because 3+1=4 is not a prime number.
a(2)=9, because 7=9-2, 11=9+2, both 7 and 11 are primes, not covered yet.
a(2) is not 5 (although 5-2=3 and 5+2=7, both are primes) because 3 is already covered by a term a(1) - this sequence is without duplication.
		

Crossrefs

Programs

  • Mathematica
    Nest[Function[{t, i}, Append[t, Block[{k = 2, s}, While[! AllTrue[Set[s, k + i {-1, 1}], And[PrimeQ@ #, FreeQ[t[[All, -1]], #] ] &], k++]; {k, s}] ]] @@ {#, Length@ #} &, {{2, {2}}}, 60][[All, 1]] (* Michael De Vlieger, May 03 2020 *)
  • PARI
    { p=2; pp=[]; for (n=0,  45, for (k=1, oo, while (#pppp[#pp], pp = concat(pp, p); p = nextprime(p+1);); if (setsearch(pp, pp[k]+2*n), print1 (pp[k]+n", "); pp = setminus(pp, Set([pp[k], pp[k]+2*n])); break))) } \\ Rémy Sigrist, Jun 06 2020

Extensions

More terms from Michael De Vlieger, May 03 2020

A333122 Numbers m such that m = prime(k) + prime(k+5) = prime(k+1) + prime(k+4) for some k.

Original entry on oeis.org

24, 30, 60, 84, 102, 210, 234, 288, 330, 378, 420, 426, 496, 528, 588, 594, 624, 690, 1050, 1156, 1200, 1218, 1302, 1336, 1410, 1470, 1484, 1638, 1650, 1680, 1686, 1716, 1734, 1740, 1746, 1788, 1848, 1908, 1918, 1930, 2052, 2154, 2226, 2364, 2410, 2580, 2892, 2934, 3168, 3524, 4080
Offset: 1

Author

Marcin Barylski, Mar 08 2020

Keywords

Comments

Terms are always even because all primes used in this sequence are odd.
Conjecture: this sequence is infinite.

Examples

			a(1)=24 because prime(3)+prime(8)=prime(4)+prime(7)=5+19=7+17.
		

Crossrefs

Cf. A022889 (the prime(k) primes), A105093 (similar sequence).

Programs

  • Mathematica
    (#[[1]] + #[[6]]) & /@ Select[ Partition[ Prime@ Range@ 320, 6, 1], #[[1]] + #[[6]] == #[[2]] + #[[5]] &] (* Giovanni Resta, Mar 08 2020 *)
  • Python
    from sympy import nextprime
    A333122_list, plist = [], [2,3,5,7,11,13]
    while len(A333122_list) < 10000:
        m = plist[0]+plist[5]
        if m == plist[1]+plist[4]:
            A333122_list.append(m)
        plist = plist[1:] + [nextprime(plist[-1])] # Chai Wah Wu, Mar 30 2020

A328179 Number of distinct primes required to satisfy the Strong Goldbach Conjecture for all even numbers <= 2n.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17
Offset: 1

Author

Marcin Barylski, Oct 06 2019

Keywords

Comments

The Strong Goldbach Conjecture asserts that all positive even integers >=4 can be expressed as the sum of two primes.
If the Strong Goldbach Conjecture is true, then a(n) > 0 for all n > 1 and a(n) <= a(n+1) for all n.

Examples

			a(1)=0 because 2 does not have any Goldbach partition.
a(2)=1 because 4=2+2 and 2 is the only prime required for all even numbers <= 4.
a(3)=2 because 4=2+2 and 6=3+3, thus 2 and 3 are required for expressing all even numbers <= 6.
a(7)=4 because using {2,3,5,7} it is possible to build all even numbers <= 14.
a(8)=5 because using either {2,3,5,7,11} or {2,3,5,7,13} it is possible to build all even numbers <= 16.
a(10)=5 because {2,3,5,7,13} are enough to build all even numbers <= 20.
		

A321221 Numbers of the form 6n-2 which are not a sum of two numbers that are the lesser of twin primes.

Original entry on oeis.org

4, 94, 400, 514, 784, 904, 1114, 1144, 1264, 1354, 3244, 4204
Offset: 1

Author

Marcin Barylski, Oct 31 2018

Keywords

Comments

Conjecture: This sequence is finite.
If this sequence is finite, then the Goldbach Strong Conjecture is true. If p1 and p2 are the lesser of twin primes, then q1=p1+2 and q2=p2+2 are also primes (they are the greater of twin primes). If 6n-2 = p1+p2, then 6n = q1+p2 and 6n+2 = q1+q2.

Examples

			a(1) = 4 because 4 = 2+2; there are no other Goldbach partitions and 2 is not the lesser of twin primes.
a(2) is not 6 because 6 = 3+3 and 3 is the lesser of twin primes.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_]:= (k=1; kmax=(n+2)/6; While[k<=kmax && !AllTrue[{6k-1,6k+1,6(kmax-k)-1,6(kmax-k)+1}, PrimeQ], k++]; k>kmax); Select[6*Range[0,10000]+4,aQ] (* Amiram Eldar, Nov 10 2018 *)
  • PARI
    ok(n)={if(n%6 == 4, forstep(k=3, n\2, 2, if(isprime(k) && isprime(k+2) && isprime(n-k) && isprime(n-k+2), return(0))); 1, 0)} \\ Andrew Howroyd, Nov 01 2018

A303603 a(n) is the maximum distance between primes in Goldbach partitions of 2n, or 2n if there are no Goldbach partitions of 2n.

Original entry on oeis.org

0, 0, 0, 2, 4, 2, 8, 10, 8, 14, 16, 14, 20, 18, 16, 26, 28, 26, 24, 34, 32, 38, 40, 38, 44, 42, 40, 50, 48, 46, 56, 58, 56, 54, 64, 62, 68, 70, 68, 66, 76, 74, 80, 78, 76, 86, 84, 82, 60, 94, 92, 98, 100, 98, 104, 106, 104, 110, 108, 106, 96, 102, 100, 90, 124, 122, 128, 126, 124, 134, 136, 134, 132
Offset: 1

Author

Marcin Barylski, Apr 26 2018

Keywords

Comments

The Goldbach Strong Conjecture is true if and only if a(n) = 2n for some n.
Terms are always even numbers because primes present in Goldbach partitions of n > 4 are odd and n = 4 has just one partition (2+2) where difference is 0.
Conjecture: Only first terms are 0 and all further terms are bigger than 0. Excluding a(1), a(n) = 0 iff the only Goldbach partition of 2n is n+n.

Examples

			a(1) = 0 for coherence with other related sequences.
a(2) = 0 because 2 * 2 = 4 = 2 + 2 and max_diff = 2 - 2 = 0.
a(8) = 10 because 2 * 8 = 16 = 5 + 11 = 3 + 13 and max_diff = 13 - 3 = 10.
		

Crossrefs

Cf. A002372, A002375, A047949, A066285 (minimum distance), A305883.

Programs

  • Mathematica
    a[1]=a[2]=0;
    a[n_]:=Module[{p=3},While[PrimeQ[2*n-p]!=True,p=NextPrime[p]];2*(n-p)];
    a/@Range[73] (* Ivan N. Ianakiev, Jun 27 2018 *)
  • PARI
    a(n) = if (n==1, 0, forprime(p=2, , if (isprime(2*n-p), return (2*n-2*p)))); \\ Michel Marcus, Jul 02 2018

Formula

a(n) = 2 * A047949(n) if A047949(n) > 0 for n >= 2; a(n) = 2n if A047949(n) = -1. - Alois P. Heinz, Jun 01 2020

A301776 Prime numbers p with the property that all even numbers n (2 < n <= 2p) are the sum of two primes <= p.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 109
Offset: 1

Author

Marcin Barylski, Mar 26 2018

Keywords

Comments

Conjecture: this sequence is finite - it has 7 terms only. Conjecture verified up to first 10^5 primes.
This sequence is related to the Goldbach Strong Conjecture.

Examples

			a(1)=2 because all even numbers 2 < n <= 2*2 (there is just one such number: 4) can be expressed as a sum of 2 only: 4=2+2.
a(2)=3 because 4=2+2, 6=3+3.
a(3)=5 because 4=2+2, 6=3+3, 8=5+3, 10=5+5.
a(4)=7 because 4=2+2, 6=3+3, 8=5+3, 10=5+5, 12=5+7, 14=7+7.
a(5)=13 (and is not 11) because 20 cannot be expressed as a sum of two primes from a set {2,3,5,7,11} but all even numbers 2 < n <= 26 can be expressed as a sum of two primes from a set {2,3,5,7,11,13}.
		

Crossrefs

Cf. A002372 (number of ordered Goldbach partitions).

Programs

  • Mathematica
    Select[Prime@ Range[500], Function[p, SameQ[Select[Union@ Map[Total, Tuples[Prime@ Range@ PrimePi@ p, 2]], And[EvenQ@ #, # > p] &], Range[p + 1 + Boole@ EvenQ@ p, 2 p, 2]]]] (* Michael De Vlieger, Apr 10 2018 *)
  • PARI
    isok(p) = {vp = primes(primepi(p)); slist = List(); for (i=1, #vp, for (j=1, i, if (!((vp[i]+vp[j]) % 2), listput(slist, vp[i]+vp[j])););); #Set(slist) == (p-1);}
    lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", "))); \\ Michel Marcus, Apr 09 2018

A295424 Number of distinct twin primes which are in Goldbach partitions of 2n.

Original entry on oeis.org

0, 0, 1, 2, 3, 2, 3, 4, 4, 4, 5, 6, 4, 3, 5, 4, 6, 7, 3, 4, 6, 5, 6, 9, 6, 4, 7, 4, 5, 8, 5, 7, 8, 3, 6, 10, 7, 7, 11, 6, 6, 10, 6, 6, 11, 6, 4, 7, 3, 7, 11, 7, 6, 10, 8, 10, 15, 8, 8, 14, 6, 6, 10, 4, 8, 12, 6, 3, 10, 9, 10, 15, 7, 7, 12, 7, 10, 14, 6, 9, 13, 5, 7
Offset: 1

Author

Marcin Barylski, Feb 12 2018

Keywords

Comments

Tomas Oliveira e Silva in 2012 experimentally confirmed that all even numbers 4 <= n <= 4 * 10^18 have at least one Goldbach partition (GP) with a prime 9781 or less. Detailed examination of all even numbers less than 10^6 showed that the most popular prime in all GPs is 3 (78497 occurrences), then 5 (70328), then 7 (62185), then 11 (48582), then 13 (40916), then 17 (31091), then 19 (29791) -- all these primes are twin primes. These results gave rise to a hypothesis that twin primes should be rather frequent in GP, especially those relatively small.
Conjecture. Further empirical examinations lead to a hypothesis that all even numbers n > 4 have at least 1 twin prime in GP(n).
a(n) <= A294185(n) + A294186(n).

Examples

			a(5) = 3 because 5 * 2 = 10 has 2 ordered Goldbach partitions: 3 + 7 and 5 + 5 and primes 3, 5, 7 are distinct twin primes in this set.
		

Crossrefs

Programs

  • PARI
    istwin(p) = isprime(p) && (isprime(p-2) || isprime(p+2));
    a(n) = {vtp = []; forprime(p= 2, n, if (isprime(2*n-p), if (istwin(p), vtp = concat(vtp, p)); if (istwin(2*n-p), vtp = concat(vtp, 2*n-p)););); #Set(vtp);} \\ Michel Marcus, Mar 01 2018

A294186 Number of distinct greater twin primes which are in Goldbach partitions of 2n.

Original entry on oeis.org

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

Author

Marcin Barylski, Feb 11 2018

Keywords

Comments

Tomas Oliveira e Silva in 2012 experimentally confirmed that all even numbers <= 4*10^18 have at least one Goldbach partition (GP) with a prime 9781 or less. Detailed examination of all even numbers < 10^6 showed that the most popular prime in all GPs is 3 (78497 occurrences), then 5 (70328), then 7 (62185), then 11 (48582), then 13 (40916), then 17 (31091), then 19 (29791) - all these primes are twin primes. These results gave rise to a hypothesis that twin primes should be rather frequent in GP, especially those relatively small.
Further empirical experiments demonstrated, surprisingly, there are in general two categories of even numbers n: category 1 - with 0, 1, or 2 distinct greater twin primes in all GPs(n), and category 2 - with fast increasing number of distinct greater twin primes in GPs(n).
Is a(n) = A294185(n-1)? - R. J. Mathar, Mar 22 2024

Examples

			a(5)=2 because 2*5=10 has two ordered Goldbach partitions: 3+7 and 5+5. 5 is a greater twin prime (because 3 and 5 are twin primes), 7 is a greater twin prime (because 5 and 7 are twin primes).
		

Crossrefs

Cf. A002372 (number of ordered Goldbach partitions), A006512 (greater of twin primes), A294185, A295424.

Programs

  • PARI
    isgtwin(p) = isprime(p) && isprime(p-2);
    a(n) = {vtp = []; forprime(p = 2, n, if (isprime(2*n-p), if (isgtwin(p), vtp = concat(vtp, p)); if (isgtwin(2*n-p), vtp = concat(vtp, 2*n-p)););); #Set(vtp);} \\ Michel Marcus, Mar 01 2018