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.

Showing 1-10 of 13 results. Next

A002373 Smallest prime in decomposition of 2n into sum of two odd primes.

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, 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, 3
Offset: 3

Views

Author

Keywords

Comments

See A020481 for another version.
a(A208662(n)) = A065091(n) and a(m) <> A065091(n) for m < A208662(n). - Reinhard Zumkeller, Feb 29 2012
Records are in A025019, their indices in A051610. - Ralf Stephan, Dec 29 2013
Note that these primes do not all belong to a twin prime pair. The first instance is a(110) = 23. - Michel Marcus, Aug 17 2020 from a suggestion by Pierre CAMI

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 80.
  • N. Pipping, Neue Tafeln für das Goldbachsche Gesetz nebst Berichtigungen zu den Haussnerschen Tafeln, Finska Vetenskaps-Societeten, Comment. Physico Math. 4 (No. 4, 1927), pp. 1-27.
  • 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

Programs

  • Haskell
    a002373 n = head $ dropWhile ((== 0) . a010051 . (2*n -)) a065091_list -- Reinhard Zumkeller, Feb 29 2012
    
  • Mathematica
    Table[k = 2; While[q = Prime[k]; ! PrimeQ[2*n - q], k++]; q, {n, 3, 100}] (* Jean-François Alcover, Apr 26 2011 *)
    Table[Min[Flatten[Select[IntegerPartitions[2*n,{2}],AllTrue[ #,OddQ] && AllTrue[#,PrimeQ]&]]],{n,3,100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 31 2020 *)
  • PARI
    a(n)=forprime(p=3,n,if(isprime(2*n-p), return(p))) \\ Charles R Greathouse IV, May 18 2015

Extensions

More terms from Ray Chandler, Sep 19 2003

A025018 Numbers k such that least prime in the Goldbach partition of k increases.

Original entry on oeis.org

4, 6, 12, 30, 98, 220, 308, 556, 992, 2642, 5372, 7426, 43532, 54244, 63274, 113672, 128168, 194428, 194470, 413572, 503222, 1077422, 3526958, 3807404, 10759922, 24106882, 27789878, 37998938, 60119912, 113632822, 187852862, 335070838
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    p = 1; r = {}; Do[ k = 2; While[ !PrimeQ[k] || !PrimeQ[2n - k], k++ ]; If[k > p, p = k; r = Append[r, 2n]], {n, 2, 10^8}]; r
  • PARI
    Gold(n)=forprime(p=2,min(n\2,default(primelimit)),if(isprime(n-p),return(p)))
    r=0;forstep(n=4,1e6,2,t=Gold(n);if(t>r,r=t;print1(n", "))) \\ Charles R Greathouse IV, Feb 21 2012

Extensions

Edited and extended by Robert G. Wilson v, Dec 13 2002

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

Original entry on oeis.org

4, 6, 8, 12, 18, 24, 30, 38, 98, 122, 126, 128, 220, 302, 308, 332, 346, 488, 556, 854, 908, 962, 992, 1144, 1150, 1274, 1354, 1360, 1362, 1382, 1408, 1424, 1532, 1768, 1856, 1928, 2078, 2188, 2200, 2438, 2512, 2530, 2618, 2642, 3458, 3818, 3848
Offset: 1

Views

Author

Jon Perry, Jun 27 2014

Keywords

Comments

a(74) = 63274 is probably the last term. Oliveira e Silva's work shows there are no more terms below 4*10^18. The largest p below that is p = 9781 for 2k = 3325581707333960528, where sqrt(2k) = 1823617752. - Jens Kruse Andersen, Jul 03 2014
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 <= 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 38 is 7, and 7 >= sqrt(38).
		

Crossrefs

Programs

  • Haskell
    a244408 n = a244408_list !! (n-1)
    a244408_list = map (* 2) $ filter f [2..] where
       f x = sqrt (fromIntegral $ 2 * x) <= fromIntegral (a020481 x)
    -- Reinhard Zumkeller, Jul 07 2014
  • PARI
    for(n=1, 50000, forprime(p=2, n, if(isprime(2*n-p), if(p>=sqrt(2*n), print1(2*n", ")); break))) \\ Jens Kruse Andersen, Jul 03 2014
    

A025017 a(n) = least 2k such that p is the least prime in a Goldbach partition of 2k, where p = prime(n).

Original entry on oeis.org

4, 6, 12, 30, 124, 122, 418, 98, 220, 346, 308, 1274, 1144, 962, 556, 2512, 3526, 1382, 1856, 4618, 992, 3818, 7432, 12778, 5978, 26098, 2642, 23266, 10268, 19696, 6008, 34192, 22606, 5372, 37768, 13562, 9596, 22832, 59914, 7426, 88786, 50312, 97768
Offset: 1

Views

Author

Keywords

Comments

Minimal integer m such that m=p(n)+q=sum of 2 primes, where p(n)<=q is the n-th prime and there is no prime rRobin Garcia, Feb 12 2005
The increasing subsequence k(n), such that for all m>n, k(m)>k(n) is A025018, and the associated sequence of primes is A025019. - David James Sycamore, Feb 05 2018

Examples

			a(4)=30=7+23 because p(4)=7, q=23 is prime and there is no prime r<p(4)=7 such that a(4)-r is prime.
		

Crossrefs

For records see A133427, A133428.

Programs

  • MATLAB
    p1 = primes(1000000); d(1, :) = p1; d(2, :) = d(1, :) - d(1, :); i = 4; k = 1; n = 0; while i <= 5000000 while not(isprime(i - d(1, k))) k = k + 1; end; if d(2, k) == 0 d(2, k) = i; if k == n + 1 while d(2, n+1) > 0 n = n + 1; end; if n > 0 d(2, 1:n) end; end; end; k = 1; i = i + 2; end; - Lei Zhou, Jan 26 2005
    
  • PARI
    Gold(n)=forprime(p=2,n,if(isprime(n-p),return(p)))
    a(n,p=prime(n))=my(k=2); while(Gold(k+=2)!=p,); k \\ Charles R Greathouse IV, Sep 28 2015

Extensions

Edited by N. J. A. Sloane, May 05 2007; b-file added Nov 27 2007

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

A216275 Fibonacci + Goldbach: a(1)=6, a(2)=8 and for n>=3, a(n)=g(a(n-1)) + g(a(n-2)), where for m>=3, g(2*m) is the maximal prime p < 2*m such that 2*m - p is prime.

Original entry on oeis.org

6, 8, 8, 10, 12, 14, 18, 24, 32, 48, 72, 110, 174, 274, 438, 704, 1134, 1830, 2952, 4762, 7698, 12450, 20128, 32560, 52660, 85168, 137752, 222844, 360564, 583392, 943902, 1527222, 2471074, 3998274, 6469334, 10467566, 16936850, 27404300, 44341050, 71745324
Offset: 1

Views

Author

Vladimir Shevelev, Mar 16 2013

Keywords

Comments

Conjecture. lim a(n+1)/a(n)=phi as n goes to infinity (phi=golden ratio).

Examples

			Let n=6. Since a(4) = 10, a(5) = 12 and g(10) = g(12) = 7, then a(6) = 7 + 7 = 14.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 6; a[2] = 8; g[n_] := Module[{tmp,k=1}, While[!PrimeQ[n-(tmp=NextPrime[n,-k])], k++]; tmp]; a[n_] := a[n] = g[a[n-1]] + g[a[n-2]]; Table[a[n], {n,1,100}]

Formula

For n>=5, a(n) = A216835(n-3) + A216835(n-4).

A216835 Fibonacci + Goldbach (dual sequence to A216275). a(1)=5, a(2)=7 and for n>=3, a(n) = g(a(n-1) + a(n-2)), where for m>=3, g(2*m) is the maximal prime p < 2*m such that 2*m - p is prime.

Original entry on oeis.org

5, 7, 7, 11, 13, 19, 29, 43, 67, 107, 167, 271, 433, 701, 1129, 1823, 2939, 4759, 7691, 12437, 20123, 32537, 52631, 85121, 137723, 222841, 360551, 583351, 943871, 1527203, 2471071, 3998263, 6469303, 10467547, 16936753, 27404297, 44341027, 71745313, 116086303
Offset: 1

Views

Author

Vladimir Shevelev, Mar 16 2013

Keywords

Comments

Conjecture. lim a(n+1)/a(n)=phi as n goes to infinity (phi=golden ratio).

Crossrefs

Programs

  • Mathematica
    a[1] = 5; a[2] = 7; g[n_] := Module[{tmp,k=1}, While[!PrimeQ[n-(tmp=NextPrime[n,-k])], k++]; tmp]; a[n_] := a[n] = g[a[n-1] + a[n-2]]; Table[a[n], {n,1,100}]

Formula

a(n) = g(A216275(n+2)).

A129301 Records in A082467.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 30, 33, 36, 42, 60, 75, 84, 87, 90, 93, 102, 117, 120, 135, 138, 168, 180, 183, 210, 228, 300, 333, 369, 474, 486, 525, 621, 720, 792, 810, 846, 1086, 1281, 1305, 1515, 1590, 1617, 1722, 1794
Offset: 1

Views

Author

Klaus Brockhaus, Apr 08 2007

Keywords

Examples

			As can be gathered from A082467, the first six records are A082467(4) = 1, A082467(5) = 2, A082467(7) = 4, A082467(11) = 6, A082467(19) = 12, A082467(43) = 24. Hence a(1) to a(6) are 1, 2, 4, 6, 12, 24.
		

Crossrefs

Cf. A082467, A129302 (where records occur).

Formula

a(n) = A082467(A129302(n)). - Jason Kimberley, Sep 04 2011

A097224 Nondecreasing subsequence of A020481.

Original entry on oeis.org

2, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 19, 19, 23, 31, 31, 47, 73, 103, 139, 173, 173, 173, 211, 233, 293, 313, 331, 359, 383, 389, 389, 523, 601, 727, 751, 829, 929, 997, 1039, 1093, 1163, 1321, 1427, 1583
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 09 2004

Keywords

Crossrefs

Programs

  • Mathematica
    c[n_] := Block[{m = 2}, While[ !PrimeQ[2n - Prime[m]], m++ ]; Prime[m]]; v={2}; Do[ p = c[n]; If[ p >= v1, v1 = p; AppendTo[v, p]; Print[p]], {n, 3, 215000000}]; v

Extensions

More terms from Robert G. Wilson v, Aug 10 2004

A273457 Even numbers 2n that do not have a Goldbach partition 2n = p + q (p < q; p, q prime) satisfying sqrt(n) < p <= sqrt(2n).

Original entry on oeis.org

2, 4, 6, 8, 12, 18, 20, 22, 24, 26, 30, 32, 38, 40, 44, 52, 56, 58, 62, 64, 70, 72, 76, 82, 84, 88, 92, 94, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 126, 128, 130, 132, 134, 136, 140, 144, 146, 152, 154, 156, 158, 164, 166, 172, 182, 188, 196, 198, 200, 214
Offset: 1

Views

Author

Corinna Regina Böger, Dec 11 2016

Keywords

Comments

This is an extension of A244408.
There are 74 elements of A279040 that are also in this sequence. These common elements are in A244408.
It is conjectured that a(12831) = 15702604 is the last term. There are no more terms below 4*10^10.

Examples

			32 is in the sequence because 32 has two Goldbach partitions: 32 = 3 + 29 with 3 < sqrt(16) and 32 = 13 + 19 with 13 > sqrt(32).
		

Crossrefs

Programs

  • Mathematica
    noGoldbatSqrQ[n_] := Block[{p = NextPrime[Sqrt[n/2]]}, While[2p < n && !PrimeQ[n - p], p = NextPrime@ p]; p > Sqrt[n]]; noGoldbatSqrQ[4] = True; Select[2Range[107], noGoldbatSqrQ] (* Robert G. Wilson v, Dec 15 2016 *)
  • PARI
    noSpecialGoldbach(n) = forprime(p=sqrtint(n/2-1) + 1, sqrtint(n), if(p<(n-p) && isprime(n-p), return(0))); 1
    is(n) = n%2 == 0 && noSpecialGoldbach(n)
Showing 1-10 of 13 results. Next