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 61-70 of 172 results. Next

A261627 Number of primes p such that n-(p*n'-1) and n+(p*n'-1) are both prime, where n' is 1 or 2 according as n is odd or even.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 27 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6, and a(n) = 1 only for n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142.
This is stronger than Goldbach's conjecture (A002375) and Lemoine's conjecture (A046927).
I have verified the conjecture for n up to 10^8.
Verified for n up to 10^9. - Mauro Fiorentini, Jul 05 2023
Conjecture verified for n < 1.2 * 10^12. - Jud McCranie, Aug 26 2023

Examples

			a(19) = 1 since 13, 19-(13-1) = 7 and 19+(13-1) = 31 are all prime.
a(142) = 1 since 41, 142-(2*41-1) = 61 and 142+(2*41-1) = 223 are all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-(3+(-1)^n)/2*Prime[k]+1]&&PrimeQ[n+(3+(-1)^n)/2*Prime[k]-1],r=r+1],{k,1,PrimePi[2n/(3+(-1)^n)]}];Print[n," ",r];Continue,{n,1,80}]

A274987 Primes p such that A274601(p) is a prime.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, 127, 137, 139, 149, 173, 179, 193, 223, 229, 257, 263, 293, 307, 313, 337, 347, 349, 359, 367, 389, 397, 409, 419, 439, 449, 461, 467, 487, 491, 521, 547, 571, 577, 599, 601, 619, 631
Offset: 1

Views

Author

Lei Zhou, Nov 11 2016

Keywords

Comments

It is conjectured that the sequence is infinite.
This sequence is also the list of primes with k trits that are used in decomposition of 2*3^k into the sum of such two primes. k>=1.

Examples

			For p=2, A274601(p) = 4, which is not a prime, so ignore 2.
For p=3, A274601(p) = 3, which is a prime, so a(1)=3.
For p=5, A274601(p) = 13, which is a prime, so a(2)=5.
		

Crossrefs

Programs

  • Mathematica
    p = 2; Table[While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; !PrimeQ[cp]]; p, {n, 1, 56}]

A137791 Number of ways to write n as sum of two positive numbers having no prime gaps in their factorization.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 11 2008

Keywords

Examples

			a(20) = #{1+19,2+18,3+17,4+16,5+15,7+13,8+12,9+11} = 8;
a(21) = #{2+19,3+18,4+17,5+16,6+15,8+13,9+12} = 7;
a(22) = #{3+19,4+18,5+17,6+16,7+15,9+13,11+11} = 7;
a(23) = #{4+19,5+18,6+17,7+16,8+15,11+12} = 6;
a(24) = #{1+23,5+19,6+18,7+17,8+16,9+15,11+13,12+12} = 8.
		

Crossrefs

A202472 Goldbach's Problem extended to subtraction: number of decompositions of 2n into unordered differences of two primes, p, q, where p < 2n < q.

Original entry on oeis.org

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

Views

Author

James D. Klein, Dec 19 2011

Keywords

Crossrefs

Extension of A002375.
Bisection of A092953.

Programs

  • Mathematica
    Table[Length[Select[Prime[Range[PrimePi[2*n]]], PrimeQ[2*n + #] &]], {n, 100}] (* T. D. Noe, Apr 16 2013 *)
  • PARI
    a(n)=my(s);forprime(p=2,2*n,s+=isprime(2*n+p));s \\ Charles R Greathouse IV, Dec 19 2011
    (C++)
    #include 
    using namespace std;
    int main()
    { int p[25] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
      int count, istart = 2;
      for(int n=1; n<=25; n++)
      {
          if(2*n>p[istart]) istart++;
          count = 0;
          for(int j=1; p[j]<2*n; j++)
            for(int i=istart; p[i]-p[j]<=2*n; i++)
              if(p[i]-p[j]==2*n) count++;
          cout << n << ". " << count << endl;
      }
        return 0;
    } // code for the first 25 integers, James D. Klein, Dec 21 2011

Formula

a(n) = A092953(2*n). - Bill McEachen, May 24 2024

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)).

A230227 Primes p with 3*p - 10 also prime.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 31, 37, 41, 47, 53, 59, 61, 67, 79, 83, 89, 97, 101, 107, 109, 131, 137, 151, 157, 163, 167, 173, 191, 193, 199, 223, 229, 251, 257, 269, 277, 283, 307, 313, 317, 331, 347, 353, 367, 373, 397, 401, 409
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 12 2013

Keywords

Comments

Conjecture: For any integer n > 4 not equal to 76, we have 2*n = p + q for some terms p and q from the sequence.
This is stronger than Goldbach's conjecture for even numbers.

Examples

			a(1) = 5 since 3*5 - 10 = 5 is prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[p_]:=PQ[p]=p>3&&PrimeQ[3p-10]
    m=0
    Do[If[PQ[Prime[n]],m=m+1;Print[m," ",Prime[n]]],{n,1,80}]
    Select[Prime[Range[100]],PrimeQ[3#-10]&] (* Harvey P. Dale, Jun 28 2015 *)

A230254 Number of ways to write n = p + q with p and (p+1)*q/2 + 1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 14 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
We have verified this for n up to 10^8.
We also have some similar conjectures, for example, any integer n > 3 not equal to 17 or 66 can be written as p + q with p and (p+1)*q/2 - 1 both prime.

Examples

			a(15) = 1 since 15 = 5 + 10 with 5 and (5+1)*10/2+1 = 31 both prime.
a(30) = 1 since 30 = 2 + 28 with 2 and (2+1)*28/2+1 = 43 both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[(Prime[i]+1)(n-Prime[i])/2+1],1,0],{i,1,PrimePi[n-1]}]
    Table[a[n],{n,1,100}]

A258713 A001172(n)/2: Least k such that 2k is a sum of two odd primes in exactly n ways.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 14 2015

Keywords

Comments

Up to a(14) also indices of records in A002375, number of ways to write 2n as sum of two odd primes. - M. F. Hasler, Aug 21 2017

Crossrefs

Programs

  • Maple
    g:= add(x^ithprime(i),i=2..1000):
    G:= series((g^2+add(x^(2*ithprime(i)),i=2..1000))/2,x,ithprime(1001)+3):
    A[0]:= 0:
    for k from 1 to (ithprime(1001)+1)/2 do
      m:= coeff(G,x,2*k);
      if not assigned(A[m]) then A[m]:= k fi;
    od:
    for m from 1 while assigned(A[m]) do od:
    seq(A[i],i=0..m-1); # Robert Israel, Aug 21 2017
  • Mathematica
    With[{s = Array[Count[Select[IntegerPartitions[2 #, 2], Length@ # == 2 &], p_ /; AllTrue[p, And[PrimeQ@ #, OddQ@ #] &]] &, 10^3]}, Table[FirstPosition[s, n][[1]] /. 1 -> 0, {n, 0, 53}]] (* Michael De Vlieger, Aug 21 2017 *)

Extensions

Edited by M. F. Hasler, Aug 21 2017
Edited by Robert Israel, Aug 21 2017

A306513 The number of unordered pairs of coprime integers q and r such that phi(q) + phi(r) = 2n.

Original entry on oeis.org

1, 1, 5, 7, 12, 10, 19, 18, 20, 21, 35, 32, 39, 42, 38, 37, 48, 46, 45, 58, 64, 63, 69, 73, 58, 93, 71, 70, 81, 92, 72, 113, 96, 94, 90, 100, 79, 158, 120, 95, 131, 153, 84, 147, 129, 132, 126, 150, 92, 179, 157, 150, 149, 187, 92, 224, 177, 166, 173, 207, 124
Offset: 1

Views

Author

Robert G. Wilson v, Feb 20 2019

Keywords

Comments

Paul Erdős and Leo Moser conjectured that, for any even number 2n, there exist integers q and r such that phi(q) + phi(r) = 2n with gcd(q, r) = 1. Adding to this conjecture the requirement that q and r be prime yields the Goldbach Conjecture. The replacement of the requirement that q and r be prime with the relaxed requirement that they be coprime was done in an effort to solve the Goldbach Conjecture.

Examples

			a(1) = 1 with {q, r} = {1,2};
a(2) = 1 with {q, r} = {3,4};
a(3) = 5 because phi(q) + phi(r) = 6 for the pairs {q, r} = {3,5}, {3,8}, {3,10}, {4,5} & {5,6}; etc.
		

References

  • George E. Andrews, Number Theory, Chapter 6, Arithmetic Functions, Section 6-1, Combinatorial Study of Phi(n), pp. 75-82, Dover Publishing, NY, 1971.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 0, q = 1}, While[q < 12n, epq = EulerPhi[q]; r = 12n + 125; While[r > q, If[ GCD[q, r] == 1 && epq + EulerPhi[r] == 2 n, c++]; r--]; q++]; c]; Array[f, 61]
Previous Showing 61-70 of 172 results. Next