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-7 of 7 results.

A337606 Decimal expansion of the Gaussian twin prime constant: the Hardy-Littlewood constant for A096012.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Sep 04 2020

Keywords

Comments

The name of this constant was suggested by Finch (2003).
Gaussian twin primes on the line x + i in the complex plane are Gaussian primes pair of the form (m - 1 + i, m + 1 + i). The numbers m are numbers such that (m-1)^2 + 1 and (m+1)^2 + 1 are both primes (A096012 plus 1).
Shanks (1960) conjectured that the number of these pairs with m <= x is asymptotic to c * li_2(x), where li_2(x) = Integral_{t=2..n} (1/log(t)^2) dt, and c is this constant. He defined c as in the formula section and evaluated it by 0.4876.
The first 100 digits of 4*c were calculated by Ettahri et al. (2019).

Examples

			0.487622778111571768611646391452388423131677124429735...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 90.

Crossrefs

Similar constants: A005597, A331941, A337607, A337608.

Programs

  • Mathematica
    S[m_, n_, s_] := (t = 1; sums = 0; difs = 1; While[Abs[difs] > 10^(-digits - 5) || difs == 0, difs = (MoebiusMu[t]/t) * Log[If[s*t == 1, DirichletL[m, n, s*t], Sum[Zeta[s*t, j/m]*DirichletCharacter[m, n, j]^t, {j, 1, m}]/m^(s*t)]]; sums = sums + difs; t++]; sums);
    P[m_, n_, s_] := 1/EulerPhi[m] * Sum[Conjugate[DirichletCharacter[m, r, n]] * S[m, r, s], {r, 1, EulerPhi[m]}] + Sum[If[GCD[p, m] > 1 && Mod[p, m] == n, 1/p^s, 0], {p, 1, m}];
    Z[m_, n_, s_] := (w = 1; sumz = 0; difz = 1; While[Abs[difz] > 10^(-digits - 5), difz = P[m, n, s*w]/w; sumz = sumz + difz; w++]; Exp[sumz]);
    Zs[m_, n_, s_] := (w = 2; sumz = 0; difz = 1; While[Abs[difz] > 10^(-digits - 5), difz = (s^w - s) * P[m, n, w]/w; sumz = sumz + difz; w++]; Exp[-sumz]);
    $MaxExtraPrecision = 1000; digits = 121; RealDigits[Chop[N[Pi^2/8 * Zs[4, 1, 4]/Z[4, 1, 2]^2, digits]], 10, digits-1][[1]] (* Vaclav Kotesovec, Jan 15 2021 *)

Formula

Equals (Pi^2/8) * Product_{primes p == 1 (mod 4)} (1 - 4/p)*((p + 1)/(p - 1))^2.

Extensions

More digits from Vaclav Kotesovec, Jan 15 2021

A339007 Least k such that p = k^2 + 1 and q = (k+2n)^2 + 1 are prime numbers with q - p square.

Original entry on oeis.org

24, 6, 312984, 16896, 120, 734994, 10640, 10, 1946016, 150, 171864, 180, 31200, 17136, 120, 84, 8976, 54, 137256, 300, 231504, 66, 184, 360126, 24, 5824, 2496, 224, 261696, 90, 4359344, 66, 50160, 68816, 280, 864, 1524696, 570, 219336, 11520, 8487984, 126, 22704
Offset: 1

Views

Author

Michel Lagneau, Nov 18 2020

Keywords

Comments

4*n*(k + n) is a square. If n is a square, then k + n is also a square.
If n is prime, then n divides k.
If we add the additional condition that p and q are two consecutive primes of the form m^2 + 1, then we obtain the sequence A339008, with A339008(n) = a(n) for n = 1, 2, 3, 4, 6, 7 and 9.

Examples

			a(1) = 24 because 24^2 + 1 = 577, (24 + 2)^2 + 1 = 677 and 677 - 577 = 10^2 is a square. The other values m such that p = m^2 + 1 and q = (m+2)^2 + 1 are primes with q - p square are 11024, 133224, 156024, 342224, 416024,...
a(2) = 6 because 6^2 + 1 = 37, (6 + 4)^2 + 1 = 101 and 101 - 37 = 8^2 is a square. The other values m such that p = m^2 + 1 and q = (m+4)^2 + 1 are primes with q - p square are 16, 126, 1350, 1456, 1566, 2310, 5200,...
		

Crossrefs

Programs

  • Maple
    for n from 1 to 50 do:
    ii:=0:
    for k from 2 by 2 to 10^9 while(ii=0) do:
       p:=k^2+1:q:=(k+2*n)^2 +1:
        if isprime(p) and isprime(q) and sqrt(q-p)=floor(sqrt(q-p))
         then
         ii:=1:printf(`%d %d \n`,n,k):
         else
        fi:
      od:
    od:
  • PARI
    a(n) = my(k=1); while (!(isprime(p=k^2+1) && isprime(q=(k+2*n)^2 + 1) && issquare(q-p)), k++); k; \\ Michel Marcus, Nov 18 2020

A339008 Least k such that p = k^2 + 1 and q = (k+2n)^2 + 1 are two consecutive prime numbers of the same form with q - p square.

Original entry on oeis.org

24, 6, 312984, 16896, 240, 734994, 10640, 10360, 1946016, 2550, 13189264, 72996, 416520, 2184336, 1584360, 202484, 232696, 1700150, 2394456, 375360, 8736504, 9237866, 53629744, 360126, 87000, 574339974, 82404216, 23237760, 1249877496, 826650, 127119344, 1527720
Offset: 1

Views

Author

Michel Lagneau, Nov 18 2020

Keywords

Comments

4*n*(k + n) is a square. If n is a square, then k + n is also a square.
If n is prime, then n divides k.
a(n) = A339007(n) for n = 1, 2, 3, 4, 6, 7 and 9.

Examples

			a(1) = 24 because 24^2 + 1 = 577, (24 + 2)^2 + 1 = 677. The numbers 577 and 677 are two consecutive primes of the form m^2+1, and 677 - 577 = 10^2 is a square. The other values m such that p = m^2 + 1 and q = (m+2)^2 + 1 are consecutive primes with q - p square are 11024, 133224, 156024, 342224, 416024, ...
a(2) = 6 because 6^2 + 1 = 37, (6 + 4)^2 + 1 = 101. The numbers 37 and 101 are two consecutive primes of the form m^2+1, and 101 - 37 = 8^2 is a square. The other values m such that p = m^2 + 1 and q = (m+4)^2 + 1 are consecutive primes with q - p square are 16, 126, 1350, 1456, 1566, 2310, 5200, ...
		

Crossrefs

Programs

  • Maple
    for n from 1 to 25 do:
    ii:=0:n1:=0:q:=2:
      for k from 2 by 2 to 10^9 while(ii=0) do:
        p:=k^2+1:
       if isprime(p)
        then
         x:=p-q:q:=p:z:=sqrt(x):
          if z=floor(z) and k-n1=2*n
           then
            ii:=1:printf(`%d %d \n`,n,n1):
             else
             n1:=k:
           fi:
        fi:
      od:
    od:
  • PARI
    consecutive(p, q) = {forprime(r = nextprime(p+1), precprime(q-1), if (isprime(r) && issquare(r-1), return(0));); return(1);}
    a(n) = my(k=1); while (!(isprime(p=k^2+1) && isprime(q=(k+2*n)^2 + 1) && issquare(q-p) && consecutive(p, q)), k++); k; \\ Michel Marcus, Nov 30 2020

Extensions

a(26)-a(32) from Chai Wah Wu, Dec 06 2020

A261803 a(n) is the smallest number satisfying a(n)^2+1 = p(n)*q(n), p(n) < q(n) both prime, such that q(n+1)/p(n+1) < q(n)/p(n) with the initial condition q(1)/p(1) < 3/2.

Original entry on oeis.org

50, 334, 516, 670, 844, 1164, 1250, 1800, 2450, 9800, 14450, 20000, 24200, 101250, 105800, 135200, 162450, 168200, 204800, 304200, 336200, 451250, 480200, 490050, 530450, 696200, 924800, 966050, 1008200, 1125000, 1155200, 1428050, 1805000, 2332800, 2420000
Offset: 1

Views

Author

Michel Lagneau, Sep 01 2015

Keywords

Comments

The sequence is probably infinite. [This follows from Schinzel's hypothesis H, for example. - Charles R Greathouse IV, Aug 31 2021]
A majority of numbers in the sequence are of the form 2*q^2 with q = 5, 25, 30, 35, 70, 85, 100, 110, 225, 230, 260, 285, 290, 320, 390, 410, ... So, it seems that {a(n)} = {334, 516, 670, 844, 1164} union {2*A109306(n)^2} where A109306 are the numbers k such that k^2 + (k-1)^2 and k^2 + (k+1)^2 are both primes.

Examples

			a(1) = 50 because 50^2+1 = 41*61 => 61/41 = 1.4878... < 1.5
a(2) = 334 because 334^2+1 = 281*397 => 397/281 = 1.4128... < 1.4878...
a(3) = 516 because 516^2+1 = 449*593 => 593/449 = 1.3207... < 1.4128...
a(4) = 670 because 670^2+1 = 593*757 => 757/593 = 1.2765... < 1.3207...
		

Crossrefs

Subsequence of A085722.

Programs

  • Maple
    with(numtheory):nn:=100:d:=1.5:
    for n from 1 to nn do:
      x:=factorset(n^2+1):n0:=bigomega(n^2+1):
       if n0=2
       then
       q:=evalf(x[2]/x[1]):
       if q
    				
  • Mathematica
    (* Assumption: n>7 ==> a(n)=0 mod 50 *) a[n_] := a[n] = For[k = Which[n==1, 0, n <= 7, a[n-1]+1, True, a[n-1] + 50], True, k = Which[n <= 7, k+1, k == a[n-1]+1, k+49, True, k+50], f = FactorInteger[k^2+1]; If[Length[f] == 2, If[f[[All, 2]] == {1, 1}, {p1, q1} = f[[All, 1]]; If[q1/p1 < If[n == 1, 3/2, q[n-1]/p[n-1]], p[n] = p1; q[n] = q1; Return[k]]]]]; Table[Print["a(", n, ") = ", a[n], "  p = ", p[n], "  q = ", q[n],  "  q/p = ", N[q[n]/p[n], 10], "  q-p = ", q[n]-p[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Sep 28 2015 *)

A268867 Number of integers of the form m^2+1 between two consecutive pairs of primes of the same form.

Original entry on oeis.org

0, 7, 7, 27, 67, 77, 177, 77, 167, 7, 67, 377, 47, 27, 67, 27, 37, 57, 187, 47, 57, 7, 277, 87, 27, 7, 307, 47, 77, 127, 167, 87, 207, 167, 227, 217, 17, 247, 127, 17, 187, 237, 7, 117, 47, 7, 157, 57, 37, 197, 217, 87, 17, 137, 147, 287, 67, 547, 37, 187, 787
Offset: 1

Views

Author

Michel Lagneau, Feb 15 2016

Keywords

Comments

Or number of integers of the form m^2+1 between two consecutive twin k^2+1 primes.
a(n)==7 mod 10 for n>1.
The primes of the sequence are 7, 17, 37, … (A030432), subsequence of A017353.
Conjecture 1: the sequence is infinite.
Conjecture 2: for n>1, the sequence sorted in ascending order with distinct values generates the set B = {b(k)} = {7, 17, 27, 37, …} = {7 + 10k}, k = 0,1,2,… and {a(n)}/qZ = B/qZ with q = 2^m, m = 1, 2,… is a multiplicative group.
This has been verified for n up to 10^8.
A remarkable simple way to perceive properties of invariability in this sequence (or other particular sequences) is the use of finite groups of integers modulo q. This study can provide interesting interpretations for some regularities which describe properties in other mathematical spaces.
However, this concept is based on a conjecture if it is impossible to prove the infinity character of a sequence. This requires, for the calculations, a large number of elements in the sequence.
The groups of integers modulo 2^m are:
q = 2 => B/2Z = {1}, the trivial group.
q = 4 => B/4Z = {1,3}, the cyclic group of order 2 with two elements.
q = 8 => B/8Z = {1,3,5,7}, the group of order 4 with generating set {3,7} => the Klein four-group of order 2. The square of each element of B/8Z is 1. The group is not cyclic.
q = 16 => B/16Z = {1,3,5,7,9,11,13,15}, the group of order 8 with generating set {3,15}. The powers of 3 {1,3,9,11} are a subgroup of order 4, as are the powers of 5, {1,5,9,13}. The group B/16Z is not cyclic.
For higher powers q = 2^k, k>2, B/(2^k)Z = {1,3,5,…,2^k-1}, with generating set {3, 2^k-1}. The group B/(2^k)Z is not cyclic.
The order of the group is given by Euler’s totient function (A000010): this is the product of the orders of the cyclic groups in the direct product (see the links).

Examples

			a(1)=0 because there exists 0 number of the form m^2+1 between the two consecutive pairs of primes(2^2+1, 4^2+1) and (4^2+1, 6^2+1);
a(2) = 7 because there exists 7 numbers of the form m^2+1 between the two consecutive pairs of primes(4^2+1, 6^2+1) and (14^2+1, 16^2+1): 50, 65, 82, 101, 122, 145 and 170.
		

Crossrefs

Programs

  • Maple
    nn:=10000:T:=array(1..200):kk:=0:
    for n from 4 by 2 to nn do:
       p1:=n^2+1:p2:=(n+2)^2+1:
        if isprime(p1) and isprime(p2)
         then
         kk:=kk+1:T[kk]:=n:
         else
        fi:
      od:
        for m from 1 to kk-1 do:
          q:=T[m+1]-T[m]-3:printf(`%d, `,q):
        od:
  • Mathematica
    lst={};Do[If[PrimeQ[n^2+1],AppendTo[lst,n]],{n,1,10000}];Module[{tr=Transpose[Select[Partition[lst,2,1],#[[2]]-#[[1]]==2&]],fir,las},fir=Rest[tr[[1]]];las=Most[tr[[2]]];Flatten[Abs[Differences/@Thread[{fir,las}]]]-1/.{-1->0}]

A351170 Consider the primes of the form p(m)=m^2+1 such that p(m+2) is also prime for some m. The sequence lists the sums p(m) + p(m+2).

Original entry on oeis.org

22, 54, 454, 1254, 6054, 31254, 84054, 296454, 432454, 806454, 832054, 1022454, 2398054, 2622054, 2761254, 3100054, 3251254, 3458454, 3781254, 4898454, 5216454, 5611254, 5678454, 7722454, 8446054, 8694454, 8778054, 11568054, 12054054, 12852454, 14204454, 16074454
Offset: 1

Views

Author

Michel Lagneau, Feb 04 2022

Keywords

Examples

			a(3) = 454 because A096012(3) = 14, 14^2+1 = 197, (14+2)^2+1 = 257, and 197 + 257 = 454.
		

Crossrefs

Programs

  • Maple
    nn:=3000:
    for n from 2 by 2 to nn do:
      p1:=n^2+1:p2:=(n+2)^2+1:
       if isprime(p1) and isprime(p2)
        then
        s:=p1+p2:printf(`%d, `,s):
        else
       fi:
    od:
  • Mathematica
    f[n_] := 2*n^2 + 4*n + 6; f /@ Select[Range[3000], And @@ PrimeQ[{#^2 + 1, (# + 2)^2 + 1}] &] (* Amiram Eldar, Feb 04 2022 *)
  • PARI
    lista(nn) = {for (m=1, nn, if (isprime(m^2+1) && isprime(m^2+4*m+5), print1(2*m^2+4*m+6, ", ")););} \\ Michel Marcus, Feb 04 2022

Formula

For n>1, a(n) == 54 (mod 100) (see proof above).
a(n) = 2*(A096012(n)+1)^2+4 = 2*A108814(n)^2+4. - Alois P. Heinz, Feb 04 2022
For n > 1, a(n) mod 400 = 54; a(n) mod 1200 = 54 or 454; a(n) mod 2000 = 54, 454, or 1254; a(n) mod 54, 454, 1254, or 2454. - Jon E. Schoenfield, Feb 04 2022

A316189 Decimal expansion of Sum(1/p + 1/q) as (p, q) runs through the twin m^2 + 1 primes.

Original entry on oeis.org

3, 5, 7, 7, 4, 5, 1, 4, 7
Offset: 0

Views

Author

Michel Lagneau, Jun 26 2018

Keywords

Comments

Or decimal expansion of (1/5 + 1/17) + Sum_{i>=0} (1/p(i) + 1/q(i)) where p(i) and q(i) are primes of the form p(i) = m^2 + 1 = (10*i+4)^2 + 1 and q(i) = (m + 2)^2 + 1 = (10*i + 6)^2 + 1 (for m > 1, m == 4 (mod 10)). See A096012.
The sum is convergent; it must be less than 0.81459657... (see A172168).
Conjecture: the series of all twin m^2 + 1 prime reciprocals converges to 0.357745147...
It is probable that a(9) = 1.
A good approximation to the constant is (2*log(7/3)/log(17))^2 = 0.35774506... which agrees with the constant through the first 6 significant digits.

Examples

			0.3577451... = (1/5 + 1/17) + (1/17 + 1/37) + (1/197 + 1/257) + ...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, pp. 94-98.
  • J. W. L. Glaisher, On the Sums of Inverse Powers of the Prime Numbers, Quart. J. Math. 25, 347-362, 1891.

Crossrefs

Programs

  • Mathematica
    s=N[1/5+1/17,20];Do[p=(10*k+4)^2+1;q=(10*k+6)^2+1;If[PrimeQ[p]&&PrimeQ[q],s=s+1/p+1/q],{k,0,10^7}];Print[N[s,20]]

Formula

Equals (1/5 + 1/17) + Sum_{n>=1} (1/(A096012(n)^2 + 1) + 1/(A096012(n) + 2)^2 + 1).
Showing 1-7 of 7 results.