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

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

A206328 Primes of the form n^2+1 such that (n+2)^2+1 is also prime.

Original entry on oeis.org

5, 17, 197, 577, 2917, 15377, 41617, 147457, 215297, 401957, 414737, 509797, 1196837, 1308737, 1378277, 1547537, 1623077, 1726597, 1887877, 2446097, 2604997, 2802277, 2835857, 3857297, 4218917, 4343057, 4384837, 5779217, 6022117, 6421157, 7096897, 8031557
Offset: 1

Views

Author

Michel Lagneau, Feb 06 2012

Keywords

Comments

Primes corresponding to A096012 and subset of A002496.
For n > 1, a(n) ==7 (mod 10) because n ==4 (mod 10).
Conjecture: this sequence is infinite.

Examples

			For n = 4, n^2 + 1 = 17 is prime and  (n+2)^2 + 1 = 37 is also prime => 17 is in the sequence.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 4000 do: x:=n^2+1:y:=(n+2)^2+1:if type(x,prime)=true and type(y,prime)=true then printf(`%d, `,x): else fi:od:
  • Mathematica
    Select[Partition[Range[3000]^2+1,3,1],AllTrue[{#[[1]],#[[3]]},PrimeQ]&][[All,1]] (* Harvey P. Dale, Jan 16 2023 *)

A108814 Numbers k such that k^4 + 4 is semiprime.

Original entry on oeis.org

3, 5, 15, 25, 55, 125, 205, 385, 465, 635, 645, 715, 1095, 1145, 1175, 1245, 1275, 1315, 1375, 1565, 1615, 1675, 1685, 1965, 2055, 2085, 2095, 2405, 2455, 2535, 2665, 2835, 2925, 3135, 3305, 3535, 3755, 3775, 4025, 4155, 4175, 4365, 4605, 4615, 4735, 4785
Offset: 1

Views

Author

Jason Earls, Jul 10 2005

Keywords

Comments

Except for the first, all the terms above generate brilliant numbers.
Numbers n such that n - 1 + i and n + 1 + i are (twin) Gaussian primes, see Shanks. - Charles R Greathouse IV, Apr 20 2011

Crossrefs

Programs

  • Magma
    IsSemiprime:=func< n | &+[ k[2]: k in Factorization(n) ] eq 2 >; [ n: n in [1..5000] | IsSemiprime(n^4+4)]; // Vincenzo Librandi, Apr 20 2011
  • Mathematica
    Select[Range[5000],PrimeOmega[#^4+4]==2&] (* Harvey P. Dale, Sep 07 2017 *)
  • PARI
    forstep(n=1,1e5,2,if(isprime(n^2-2*n+2) && isprime(n^2+2*n+2), print1(n", "))) \\ Charles R Greathouse IV, Apr 20 2011
    

Formula

a(k) = A096012(k) + 1. (Because n^4+4 = ((n-1)^2+1)((n+1)^2+1).) - Jeppe Stig Nielsen, Feb 26 2016

A302021 Numbers k such that k^2+1, (k+2)^2+1 and (k+6)^2+1 are prime.

Original entry on oeis.org

4, 14, 124, 204, 464, 1144, 1314, 1564, 1964, 2454, 3134, 4174, 4364, 5584, 5874, 6234, 7804, 8174, 8784, 9874, 9894, 10424, 12354, 12484, 12874, 14034, 14194, 15674, 16224, 18274, 18994, 21134, 21344, 22344, 22624, 23134, 23784, 23944, 24974, 25554, 26504, 26934, 27064, 27804, 29364
Offset: 1

Views

Author

Seiichi Manyama, Mar 31 2018

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..30000] | IsPrime(n^2+1) and IsPrime((n+2)^2+1) and IsPrime((n+6)^2+1)]; // Vincenzo Librandi, Apr 02 2018
    
  • Maple
    select(k->isprime(k^2+1) and isprime((k+2)^2+1) and isprime((k+6)^2+1),[$1..40000]); # Muniru A Asiru, Apr 02 2018
  • Mathematica
    Select[Range[1, 30000], PrimeQ[#^2 + 1] && PrimeQ[(# + 2)^2 + 1] && PrimeQ[(# + 6)^2 + 1] &] (* Vincenzo Librandi, Apr 02 2018 *)
  • PARI
    isok(k) = isprime(k^2+1) && isprime((k+2)^2+1) && isprime((k+6)^2+1); \\ Altug Alkan, Apr 02 2018
  • Python
    from sympy import isprime
    k, klist, A302021_list = 0, [isprime(i**2+1) for i in range(6)], []
    while len(A302021_list) < 10000:
        i = isprime((k+6)**2+1)
        if klist[0] and klist[2] and i:
            A302021_list.append(k)
        k += 1
        klist = klist[1:] + [i] # Chai Wah Wu, Apr 01 2018
    

A302087 Numbers k such that k^2+1 and (k+6)^2+1 are both prime.

Original entry on oeis.org

4, 10, 14, 20, 84, 110, 120, 124, 150, 170, 204, 224, 230, 250, 264, 300, 400, 430, 464, 490, 570, 674, 680, 690, 930, 960, 1004, 1054, 1060, 1140, 1144, 1150, 1314, 1410, 1434, 1550, 1564, 1570, 1580, 1654, 1784, 1870, 1964, 1974, 2050, 2074, 2080, 2120, 2260, 2304, 2314
Offset: 1

Views

Author

Seiichi Manyama, Mar 31 2018

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..2500] | IsPrime(n^2+1) and IsPrime((n+6)^2+1)]; // Vincenzo Librandi, Apr 02 2018
    
  • Maple
    select(k->isprime(k^2+1) and isprime((k+6)^2+1),[$1..3000]); # Muniru A Asiru, Apr 02 2018
  • Mathematica
    Select[Range[3000], PrimeQ[#^2 + 1] && PrimeQ[(# + 6)^2 + 1]&] (* Vincenzo Librandi, Apr 02 2018 *)
  • PARI
    isok(k) = isprime(k^2+1) && isprime((k+6)^2+1); \\ Altug Alkan, Apr 02 2018
  • Python
    from sympy import isprime
    k, klist, A302087_list = 0, [isprime(i**2+1) for i in range(6)], []
    while len(A302087_list) < 10000:
        i = isprime((k+6)**2+1)
        if klist[0] and i:
            A302087_list.append(k)
        k += 1
        klist = klist[1:] + [i] # Chai Wah Wu, Apr 01 2018
    

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

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}]

A293621 Numbers k such that (2*k)^2 + 1 and (2*k+2)^2 + 1 are both primes.

Original entry on oeis.org

1, 2, 7, 12, 27, 62, 102, 192, 232, 317, 322, 357, 547, 572, 587, 622, 637, 657, 687, 782, 807, 837, 842, 982, 1027, 1042, 1047, 1202, 1227, 1267, 1332, 1417, 1462, 1567, 1652, 1767, 1877, 1887, 2012, 2077, 2087, 2182, 2302, 2307, 2367, 2392, 2397, 2477, 2507
Offset: 1

Views

Author

Amiram Eldar, Oct 13 2017

Keywords

Comments

Sierpiński proved that under Schinzel's hypothesis H this sequence is infinite. He gives the 24 terms below 10^3.
Sierpiński noted that the only triple of consecutive primes of the form (2n)^2 + 1 are for n = 1 (i.e., 1 and 2 are the only consecutive terms in this sequence), since every triple of consecutive terms contains at least one term which is divisible by 5.

Examples

			1 is in the sequence since (2*1)^2 + 1 = 5 and (2*1+2)^2 + 1 = 17 are both primes.
		

Crossrefs

Subsequence of A001912.

Programs

  • Mathematica
    Select[Range[10^4], AllTrue[{(2#)^2+1, (2#+2)^2+1}, PrimeQ] &]
  • PARI
    isok(n) = isprime((2*n)^2 + 1) && isprime((2*n+2)^2 + 1); \\ Michel Marcus, Oct 13 2017

Formula

a(n) = A096012(n)/2. - Amiram Eldar, Feb 24 2020

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
Showing 1-10 of 13 results. Next