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: Michel Eduardo Beleza Yamagishi

Michel Eduardo Beleza Yamagishi's wiki page.

Michel Eduardo Beleza Yamagishi has authored 9 sequences.

A380545 Cumulative sum of the smallest prime in the minimal Goldbach partition for 2*n, n>=2.

Original entry on oeis.org

2, 5, 8, 11, 16, 19, 22, 27, 30, 33, 38, 41, 46, 53, 56, 59, 64, 71, 74, 79, 82, 85, 90, 93, 98, 105, 108, 113, 120, 123, 126, 131, 138, 141, 146, 149, 152, 157, 164, 167, 172, 175, 180, 187, 190, 195, 202, 221, 224, 229, 232, 235, 240, 243, 246, 251, 254, 259
Offset: 2

Author

Keywords

Examples

			For n = 2, 4 = 2 + 2, the smallest prime p_1 = 2, so a(2) = A020481(2) = 2 = 2.
For n = 3, 6 = 3 + 3, the smallest prime p_2 = 3, so a(3) = a(2) + A020481(3) = 2 + 3 = 5.
For n = 4, 8 = 3 + 5, the smallest prime p_3 = 3, so a(4) = a(3) + A020481(4) = 5 + 3 = 8.
		

Crossrefs

Partial sums of A020481.

Programs

  • Mathematica
    GoldbachMinPrimeCumSum[N_] := If[N < 4, {}, Accumulate[Table[Select[Prime[Range[PrimePi[n]]], PrimeQ[n - #] &, 1][[1]], {n, 4, N, 2}]]]

Formula

a(2) = A020481(2) and a(n) = a(n-1) + A020481(n) for n>2.

A380546 Cumulative sum of the greatest prime in the minimal Goldbach partition for 2*n, n>=2.

Original entry on oeis.org

2, 5, 10, 17, 24, 35, 48, 61, 78, 97, 116, 139, 162, 185, 214, 245, 276, 307, 344, 381, 422, 465, 508, 555, 602, 649, 702, 755, 808, 867, 928, 989, 1050, 1117, 1184, 1255, 1328, 1401, 1474, 1553, 1632, 1715, 1798, 1881, 1970, 2059, 2148, 2227, 2324, 2421, 2522
Offset: 2

Author

Keywords

Crossrefs

Partial sums of A020482.

Programs

  • Mathematica
    GoldbachMaxPrimeCumSum[N_] := If[N < 4, {}, Accumulate[Table[n - Select[Prime[Range[PrimePi[n]]], PrimeQ[n - #] &, 1][[1]], {n, 4, N, 2}]]]

Formula

a(2) = A020482(2) and a(n) = a(n-1) + A020482(n) for n>2.

A382766 Odd primes p such that p + 4, p + 6 and p + 8 are composite.

Original entry on oeis.org

113, 137, 139, 179, 181, 197, 199, 211, 239, 241, 281, 283, 293, 317, 337, 409, 419, 421, 467, 509, 521, 523, 547, 577, 617, 619, 631, 659, 661, 691, 709, 773, 787, 797, 809, 811, 827, 829, 839, 863, 887, 919, 953, 997, 1019, 1021, 1039, 1049, 1051, 1069
Offset: 1

Author

Keywords

Crossrefs

Programs

  • Maple
    P:= select(isprime,{seq(i,i=3..10008,2)}):
    R:= P minus (P -~ 4) minus (P -~ 6) minus (P -~ 8):
    sort(convert(R,list)); # Robert Israel, Apr 28 2025
  • Mathematica
    Select[Table[
      Module[{p = 2, q},
       While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
        p = NextPrime[p]]; If[p == 11, q, Nothing]], {n, 2, 1000}], # =!=
       Nothing &]
  • PARI
    isok(p) = (p%2) && isprime(p) && !isprime(p+4) && !isprime(p+6) && !isprime(p+8); \\ Michel Marcus, Apr 07 2025

A377842 a(n) = q - 2*p, where q is the greatest prime such that p=2*n - q is also prime.

Original entry on oeis.org

-2, -3, -1, 1, -3, 5, 7, 3, 11, 13, 9, 17, 13, 9, 23, 25, 21, 17, 31, 27, 35, 37, 33, 41, 37, 33, 47, 43, 39, 53, 55, 51, 47, 61, 57, 65, 67, 63, 59, 73, 69, 77, 73, 69, 83, 79, 75, 41, 91, 87, 95, 97, 93, 101, 103, 99, 107, 103, 99, 83, 91, 87, 71, 121, 117, 125, 121, 117, 131, 133
Offset: 2

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Module[{p = 2, q},
      While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
       p = NextPrime[p]]; q - 2 p], {n, 2, 100}]
  • PARI
    a(n) = my(q=precprime(2*n)); while (!isprime(2*n - q), q = precprime(q-1)); q - 2*(2*n-q); \\ Michel Marcus, Dec 12 2024

A378201 a(n) = 2*n mod q, where q is the greatest prime such that 2*n - q is also prime.

Original entry on oeis.org

0, 0, 3, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5, 7, 3, 5, 3, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 19, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 13, 11, 13, 19, 3, 5, 3, 5, 7, 3, 3, 5, 7, 11, 11, 3, 3, 5, 7, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5, 7, 11, 11, 3, 3, 5
Offset: 2

Author

Keywords

Crossrefs

Cf. A002373.

Programs

  • Mathematica
    Table[Module[{p = 2, q},
      While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
       p = NextPrime[p]]; Mod[2 n, q]], {n, 2, 100}]

A378020 a(n) = pi(A020482(n)) - pi(A020481(n)).

Original entry on oeis.org

0, 0, 1, 2, 1, 3, 4, 3, 5, 6, 5, 7, 6, 5, 8, 9, 8, 7, 10, 9, 11, 12, 11, 13, 12, 11, 14, 13, 12, 15, 16, 15, 14, 17, 16, 18, 19, 18, 17, 20, 19, 21, 20, 19, 22, 21, 20, 14, 23, 22, 24, 25, 24, 26, 27, 26, 28, 27, 26, 23, 25, 24, 21, 29, 28, 30, 29, 28, 31, 32, 31, 30, 28, 29, 33, 34
Offset: 1

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Module[{p = 2, q},
      While[True, q = 2 n - p; If[PrimeQ[p] && PrimeQ[q], Break[]];
       p = NextPrime[p]]; PrimePi[q] - PrimePi[p]], {n, 2, 100}]

Formula

a(n) = A377972(n) - A377758(n).

A377972 a(n) is the greatest i such that 2n-prime(i) is also a prime, where prime(i) is the i-th prime.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9, 9, 10, 11, 11, 11, 12, 12, 13, 14, 14, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 19, 19, 20, 21, 21, 21, 22, 22, 23, 23, 23, 24, 24, 24, 22, 25, 25, 26, 27, 27, 28, 29, 29, 30, 30, 30, 29, 30, 30, 29, 31, 31, 32
Offset: 2

Author

Keywords

Examples

			For n=2, 2*2 - 2 = 2 and pi(2) = 1.
For n=3, 2*3 - 3 = 3, pi(3)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[Max[PrimePi[Flatten[Select[IntegerPartitions[2 n, {2}], AllTrue[#, PrimeQ] &]]]], {n, 2, 101}]
  • PARI
    a(n) = forprime(q=2, n, if(isprime(2*n-q), return(primepi(2*n-q)))); \\ Michel Marcus, Nov 16 2024

Formula

a(n) = A000720(A020482(n)).
prime(a(n)) + prime(A377758(n)) = 2*n.

A377758 a(n) is the least i such that 2n-prime(i) is also a prime, where prime(i) is the i-th prime.

Original entry on oeis.org

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

Author

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local i,p;
      p:= 1:
      for i from 1 do
        p:= nextprime(p);
        if isprime(2*n-p) then return i fi
      od
    end proc:
    map(f, [$2..100]); # Robert Israel, Nov 19 2024
  • Mathematica
    Table[Module[{i = 1}, While[i <= PrimePi[n] && ! PrimeQ[n - Prime[i]], i++]; If[i <= PrimePi[n], i, None]], {n, 4, 1000, 2}]
  • PARI
    a(n) = my(i=1); while (!isprime(2*n-prime(i)), i++); i; \\ Michel Marcus, Nov 06 2024
    
  • Python
    from sympy import primerange, isprime
    def A377758(n): return next(i for i, p in enumerate(primerange(2*n),1) if isprime((n<<1)-p)) # Chai Wah Wu, Nov 19 2024

Formula

a(n) = pi(A020481(n)).

A377540 Numbers k such that at least one of the numbers 6k-1 or 6k+1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 32, 33, 35, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 87
Offset: 1

Author

Keywords

Crossrefs

Union of A024898 and A024899.
Complement of A060461 (with respect to the positive integers) or A171696 (with respect to the nonnegative integers).

Programs

  • Mathematica
    Select[Range[100], PrimeQ[6 # - 1] || PrimeQ[6 # + 1] &]
  • PARI
    isok(k) = isprime(6*k-1) || isprime(6*k+1); \\ Michel Marcus, Oct 31 2024