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 31 results. Next

A103153 a(n) is the smallest odd prime p such that 2*n+1 = 2*p + A000040(k) for some k>1, or 0 if no such prime exists.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Feb 09 2005

Keywords

Examples

			For n < 4 there are no such primes, thus a(1)-a(3)=0. For n=4, 2*4+1 = 9 = 2*3+3, thus a(4)=3. For n=7, 2*7+1 = 15 = 2*5+5, thus a(7)=7.
		

Crossrefs

a(n)=0 if A103507(n)=0, otherwise A000040(A103507(n)).
Cf. A195352 (similar definition, but p=2 is allowed).

Programs

  • Mathematica
    Do[m = 3; While[ ! (PrimeQ[m] && ((n - 2*m) > 2) && PrimeQ[n - 2*m]), m = m + 2]; Print[m], {n, 9, 299, 2}]
  • Scheme
    (define (A103153 n) (let ((ind (A103507 n))) (if (zero? ind) 0 (A000040 ind))))

Extensions

Edited and Scheme code added by Antti Karttunen, Jun 19 2007
Definition corrected by Hugo Pfoertner, Sep 16 2011

A049613 a(n) = 2n - (largest prime < 2n-2).

Original entry on oeis.org

3, 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, 9, 3, 5, 3, 3, 5, 3, 3, 5, 3, 5, 7, 9, 11, 13, 15, 3, 5, 3, 5, 7, 3, 3, 5, 7, 9, 11, 3, 3, 5, 7, 3, 5, 7, 3, 5, 3, 5, 7, 3, 5, 7, 3, 3, 5
Offset: 3

Views

Author

David M. Elder (elddm(AT)rhodes.edu)

Keywords

Examples

			a(14)=28 - (largest prime < 26) = 28 - 23 = 5.
		

Crossrefs

Programs

  • Haskell
    a049613 n = 2 * n - a007917 (2 * n - 2)
    -- Reinhard Zumkeller, Jan 02 2015
  • Mathematica
    Table[2n-NextPrime[2n-2,-1],{n,3,100}] (* Harvey P. Dale, Aug 16 2011 *)

Formula

a(n) <= A002373(n). - R. J. Mathar, Mar 19 2008
a(n) = 2*n - A007917(2*n-2). - Reinhard Zumkeller, Jan 02 2015

A279040 Even numbers 2k such that the smallest prime p satisfying p+q=2k (q prime) is greater than or equal to sqrt(k).

Original entry on oeis.org

4, 6, 8, 10, 12, 14, 16, 18, 24, 28, 30, 36, 38, 42, 48, 54, 60, 68, 80, 90, 96, 98, 122, 124, 126, 128, 148, 150, 190, 192, 208, 210, 212, 220, 222, 224, 302, 306, 308, 326, 330, 332, 346, 368, 398, 418, 458, 488, 518, 538, 540, 542, 556, 640, 692, 710, 796, 854, 908, 962, 968, 992, 1006
Offset: 1

Views

Author

Corinna Regina Böger, Dec 04 2016

Keywords

Comments

a(n) is an extension of A244408.
It is conjectured that a(230) = 503222 is the last term. Oliveira e Silva's work shows that there are no more terms below 4*10^18.
The sequence definition is equivalent to: "Even integers k such that there exists a prime p with p = min{q: q prime and (k - q) prime} and k < 2*p^2" and therefore this is a member of the EGN- family (Cf. A307782). - Corinna Regina Böger, May 01 2019

Examples

			The smallest prime for 42 is 5 with 5 > sqrt(21), but not smaller than sqrt(42), and therefore 42 does not belong to A244408. The smallest prime for 38 is 7, and 7 >= sqrt(38), and therefore 38 also belongs to A244408.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4, 1006, 2], Function[n, Select[#, PrimeQ@ Last@ # &][[1, 1]] >= Sqrt[n/2] &@ Map[{#, n - #} &, Prime@ Range@ PrimePi@ n]]] (* Michael De Vlieger, Dec 06 2016 *)
  • PARI
    isok(n) = forprime(p=2, n, if (isprime(n-p), if (p >= sqrt(n/2), return(1), return(0))));
    lista(nn) = forstep(n=2, nn, 2, if (isok(n), print1(n, ", "))) \\ Michel Marcus, Dec 04 2016

A002092 From a Goldbach conjecture: records in A185091.

Original entry on oeis.org

1, 3, 5, 7, 17, 29, 47, 61, 73, 83, 277, 317, 349, 419, 503, 601, 709, 829, 877, 1129, 1237, 1367, 1429, 1669, 1801, 2467, 2833, 2879, 3001, 3037, 3329, 3821, 4861, 5003, 5281, 5821, 5897, 6301, 6329, 6421, 6481, 6841, 7069, 7121, 7309, 7873, 8017, 8597, 8821
Offset: 1

Views

Author

Keywords

Comments

See A002091. The sequence gives the record values of q in the representations minimizing q of 2*k+1 = 2*p+q, p prime, q {1,prime}.
Checked up to 2*k = 10^13.

References

  • Brian H. Mayoh, On the second Goldbach conjecture. Nordisk Tidskr. Informations-Behandling 6, 1966, pp. 48-50.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Formula

a(n) = A185091((A002091(n)+1)/2).

Extensions

Comment added, a(19)-a(32) from Hugo Pfoertner, Sep 03 2011
a(33) from Jason Kimberley, a(34)-a(40) from Hugo Pfoertner, Sep 09 2011
a(41)-a(49) from Hugo Pfoertner, Sep 25 2011

A051610 Monotonic subsequence of A051169.

Original entry on oeis.org

3, 6, 15, 49, 110, 154, 278, 496, 1321, 2686, 3713, 21766, 27122, 31637, 56836, 64084, 97214, 97235, 206786, 251611, 538711, 1763479, 1903702, 5379961, 12053441, 13894939, 18999469, 30059956, 56816411, 93926431, 167535419, 209955962, 360506719, 923566921
Offset: 1

Views

Author

Paul Bruckman (pbruckman(AT)hotmail.com)

Keywords

Comments

Indices of records of A002373. - Ralf Stephan, Dec 29 2013

Crossrefs

Extensions

More terms from Paul S. Bruckman, Jan 20 2007
Edited by N. J. A. Sloane, Apr 15 2007, May 04 2007, Jun 10 2008

A063713 Numbers n such that there exist primes p, q, r with n*2 = p - r = r + q (values of r are given in A063714).

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 27, 28, 30, 32, 33, 35, 36, 38, 39, 42, 43, 45, 46, 48, 50, 51, 52, 53, 54, 55, 57, 58, 60, 63, 65, 66, 67, 69, 70, 71, 72, 75, 77, 78, 80, 81, 84, 85, 87, 88, 90, 93, 96, 97, 98, 99, 100, 101, 102, 105
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 10 2001

Keywords

Examples

			10*2 = 20 = 23 - 3 = 3 + 17, A063714(7) = 3; 11*2 = 22 = 41 - 19 = 19 + 3, A063714(8) = 19 28 is missing because we have the prime sums (Goldbach): 5 + 23 = 11 + 17 and differences with primes less 28: 31 - 3 = 41 - 13 = 47 - 19; none of these have a prime in common.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local k;
      k:= 1;
      while k < 2*n do
        k:= nextprime(k);
        if isprime(2*n+k) and isprime(2*n-k) then return true fi
      od;
      false
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 09 2017
  • Mathematica
    okQ[n_] := AnyTrue[Prime[Range[PrimePi[2 n - 2]]], PrimeQ[2 n + #] && PrimeQ[2 n - #]&]; Select[Range[105], okQ] (* Jean-François Alcover, Feb 12 2018 *)

A208662 Smallest m such that the n-th odd prime is the smallest prime for all decompositions of 2*m into two primes.

Original entry on oeis.org

3, 6, 15, 62, 61, 209, 49, 110, 173, 154, 637, 572, 481, 278, 1256, 1763, 691, 928, 2309, 496, 1909, 3716, 6389, 2989, 13049, 1321, 11633, 5134, 9848, 3004, 17096, 11303, 2686, 18884, 6781, 4798, 11416, 29957, 3713, 44393, 25156, 48884, 24001, 56279, 30031
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 29 2012

Keywords

Comments

A002373(a(n)) = A065091(n) and A002373(m) != A065091(n) for m < a(n).

Examples

			n=3, a(3)=15: 7 is the 3rd odd prime and the smallest prime in all Goldbach decompositions of 2*15 = 30 = {7+23, 11+19, 13+17}, and 7 doesn't occur as smallest prime in all Goldbach decompositions for even numbers less than 30.
		

Crossrefs

Programs

  • Haskell
    a208662 n = head [m | m <- [1..], let p = a065091 n,
       let q = 2 * m - p, a010051' q == 1,
       all ((== 0) . a010051') $ map (2 * m -) $ take (n - 1) a065091_list]
    -- Reinhard Zumkeller, Aug 11 2015, Feb 29 2012

A063714 Values of r occurring in A063713.

Original entry on oeis.org

3, 3, 5, 3, 3, 5, 3, 19, 5, 3, 7, 29, 3, 5, 3, 5, 3, 43, 5, 3, 7, 3, 7, 3, 5, 3, 11, 3, 5, 5, 3, 7, 89, 7, 3, 5, 3, 3, 5, 3, 13, 113, 7, 13, 127, 5, 3, 11, 137, 139, 5, 13, 3, 7, 3, 5, 5, 3, 7, 3, 13, 5, 19, 3, 3, 31, 197, 199, 7, 13, 17, 11, 3, 5, 3, 229, 5, 3, 11, 5, 11, 3, 19, 3, 7, 3, 7
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 10 2001

Keywords

Comments

This is not a mere union of A002373 and A020483 because of the minimality property of these sequences.

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
    k:= 2;
      while k < 2*n do
       k:= nextprime(k);
        if isprime(2*n+k) and isprime(2*n-k) then return k fi
      od;
      NULL
    end proc:
    map(f, [$1..400]); # Robert Israel, Oct 09 2017
  • Mathematica
    f[n_] := {AnyTrue[Prime[Range[PrimePi[2n-2]]], (r = #; PrimeQ[2n+r] && PrimeQ[2n-r])&], r}; Select[f /@ Range[200], #[[1]] =!= False &][[All, 2]] (* Jean-François Alcover, Feb 14 2018 *)

A064466 a(0) = 6 and a(n) = Min { m > a(n-1) | both a(n-1) - p and m - p are prime for some prime p } for n > 0.

Original entry on oeis.org

6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 72, 74, 76, 78, 80, 84, 86, 88, 90, 92, 94, 96, 98, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 126, 128, 132, 134, 136, 138, 140, 142
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 02 2001

Keywords

Comments

The initially very frequent case a(k+1) = a(k) + 2 means that there is a twin prime (q, q + 2) with a(k+1) = p + (q + 2) and a(k) = p + q. This might illustrate a certain coherence of two famous conjectures: Goldbach and twin primes.

Examples

			a(12) = 30 = 13 + 17: a(13) = 30 + 2 = 32 = 13 + 19 (common prime = 13). No common prime exists in Goldbach decompositions for a(16) = 38 and 40, so 40 <> a(17) = 42; a(16) = 38 = 7 + 31 = 19 + 19, 40 = 3 + 37 = 11 + 29 = 17 + 23, a(17) = 42 = 11 + 31 (for 38 and 42 common prime = 31); A064634(1) = 16, A064635(1) = 40 = 2 + 38 = 2 + a(A064634(1)).
		

Crossrefs

A235649 Define a(4)=3 then a(n+1)is the smallest prime P such that a(n)<=P< n with 2*n-P=Q prime and if not possible a(n+1) is the smallest prime P such that P

Original entry on oeis.org

3, 3, 5, 3, 3, 5, 7, 3, 5, 7, 11, 11, 13, 3, 5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 3, 5, 7, 19, 23, 23, 31, 3, 5, 7, 17, 17, 19, 23, 23, 3, 5, 7, 13, 23, 23, 31, 41, 41, 43, 47, 47, 3, 3, 5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 31, 47, 59, 61, 3, 5, 7, 11
Offset: 4

Views

Author

Pierre CAMI, Jan 13 2014

Keywords

Examples

			a(4)=3 as 2*4-3=5 prime by definition
a(5)=3 as 2*5-3=7 prime, a(5)=a(4), a(5)<5
a(6)=5 as 2*6-5=7 prime, a(6)>a(5), a(6)<6
a(7)=5 not possible as 14-5=9 composite
a(7)=7 not possible as 7=7
a(7)=3 as 2*7-3=11 prime
a(8)=3 as 2*8-3=13 prime
		

Crossrefs

Previous Showing 11-20 of 31 results. Next