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 51-60 of 108 results. Next

A344147 Primes in A191746.

Original entry on oeis.org

193, 53069, 58422233, 1348470667, 2847740783, 3237916229, 5029745827, 7643871979, 15107731019, 17902513283, 21052092827, 22187962591, 28412311451, 59363922119, 81459096899, 85780812149, 102742076659, 123894775231, 137692362377, 143889901511, 170038274723, 174648621811
Offset: 1

Views

Author

Hartmut F. W. Hoft, May 10 2021

Keywords

Examples

			a(1)=193=A191746(3) is the first prime in A191746 and a(2)=53069=A191746(11) is the second.
		

Crossrefs

Programs

  • Mathematica
    (* function a037074[ ] and support functions are defined in A074040 *)
    a191746[n_] := Rest[FoldList[Plus, 0, a037074[n]]]
    a344147x[n_] := Select[a191746[n], PrimeQ]
    a344147[550]

A357059 Decimal expansion of sum of squares of reciprocals of primes whose distance to the next prime is equal to 4, Sum_{j>=1} 1/A029710(j)^2.

Original entry on oeis.org

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

Views

Author

Artur Jasinski, Sep 10 2022

Keywords

Comments

Convergence table:
k A029710(k) Sum_{j=1..k} 1/A029710(j)^2
10000000 3285441223 0.031321620645456519799598611681
20000000 7067090263 0.031321620645890982910821292996
30000000 11044597393 0.031321620646019474620358985896
40000000 15153534937 0.031321620646079307404248696076
50000000 19360462153 0.031321620646113421819579063642
60000000 23647877233 0.031321620646135276227114122713
70000000 28000392817 0.031321620646150384406674037099

Examples

			0.031321620646...
		

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[g1[2 n] = 0, {n, 1, 1000}]; Do[g2[2 n] = 0, {n, 1, 1000}]; Do[g3[2 n] = 0, {n, 1, 1000}]; Do[g4[2 n] = 0, {n, 1, 1000}]; Do[g[2 n] = 0, {n, 1, 1000}];
    w1 = 3; n = 3; Monitor[While[n < 10^10, w2 = NextPrime[w1]; kk = w2 - w1;
      If[kk < 2000, g[kk] = g[kk] + 1; g1[kk] = g1[kk] + N[1/w1, 1000];g2[kk] = g2[kk] + N[1/w1^2, 1000];g3[kk] = g3[kk] + N[1/w1^3, 1000];g4[kk] = g4[kk] + N[1/w1^4, 1000];
    If[IntegerQ[g[kk]/1000000], Print[{n, w1, kk, g[kk]}];If[kk == 4,AppendTo[aa, {n, w1, kk, g[kk], g1[kk], g2[kk], g3[kk], g4[kk]}]]]];w1 = w2; n++], n];aa

A384102 Least x in absolute value, such that there exists y, |x| >= |y| > 0, such that n = |6xy + x + y|, or 0 if no such x exists. Choose x > 0 if x and -x are both possible.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Jun 20 2025

Keywords

Comments

(6n-1, 6n+1) are twin primes iff a(n) = 0, that is, if there are no nonzero integers x, y such that n = |6xy + x + y|. (These n are listed in A002822, the complement is A067611.)
a(n) <= (6*n-1)/5, with equality if 6*n+1 is prime and 6*n-1 is 5 times a prime. - Robert Israel, Jul 21 2025

Examples

			For n = 1, 2 and 3, there are no nonzero x,y such that n = |6xy + x + y|, and (6n-1, 6n+1) = (5, 7), (11, 13) and (17, 19) are indeed twin primes.
For n = 4 we have x = y = -1 such that |6xy + x + y| = |6 - 1 - 1| = 4 and (23, 25) is indeed not a twin prime pair.
		

Crossrefs

Cf. A384103 (the corresponding y-values).
Cf. A002822 (indices of zeros: n such that 6n-1 and 6n+1 are twin primes).
Cf. A077800 (list of twin primes), A060461, A171696 (none among 6n+-1 is prime), A067611 (n = 6xy +- x +- y: 6n-1 or 6n+1 is composite).

Programs

  • Maple
    f:= proc(n) local V, C, t, m,v, r;
           V:= numtheory:-divisors(6*n+1) minus {1,6*n+1};
           C:= map(u -> `if`(u mod 6 = 1,  [(u-1)/6, ((6*n+1)/u - 1)/6], [(-u-1)/6, (-(6*n+1)/u - 1)/6]), V);
           V:= numtheory:-divisors(6*n-1) minus {1,6*n-1};
           C:= C union map(u -> `if`(u mod 6 = 1, [(u-1)/6, ((-6*n+1)/u - 1)/6], [(-u-1)/6, ((-6*n+1)/u - 1)/6]), V);
           C:= select(t -> abs(t[1]) >= abs(t[2]), C)[..,1];
           if C = {} then return 0 fi;
           m:= infinity;
           for t in C do
             if abs(t) < m then m:= abs(t); r:= t;
             elif abs(t) = m and t > 0 then r:= t
             fi
           od;
           r
     end proc:
    map(f, [$1..100]); # Robert Israel, Jul 21 2025
  • PARI
    {A384102(n)=for(x=1,n\/5, my(p=6*x+1, q=6*x-1, r=if((n-x)%p==0, (n-x)\p, (n+x)%p==0, (n+x)\p, (n-x)%q==0, (x-n)\q, (n+x)%q==0,-(n+x)\q)); r && abs(r) <= x && return(sign(r)*x))}

A384103 a(n) = y with minimum |x| >= |y| > 0, such that n = |6xy + x + y|, or 0 if no such x, y exist. If x and -x are solutions, choose x > 0 > y = -x.

Original entry on oeis.org

0, 0, 0, -1, 0, -1, 0, 1, -1, 0, -1, 0, 1, -1, 1, -1, 0, 0, -1, -2, -1, 1, 0, -2, 0, -1, 1, 2, 1, 0, -2, 0, 0, 1, -2, 1, 2, 0, -1, 0, 2, -2, 1, -1, 0, -2, 0, -3, -1, 2, -1, 0, -2, -3, 1, -1, -2, 0, -1, 3, -1, 1, 2, -2, -3, -1, 2, -2, 1, 0, -3, 0, 3, -1, -2, 2, 0, 1, 3, 2, -1, -3, 1, -1, 1, -2, 0, -4, 2, -2
Offset: 1

Views

Author

M. F. Hasler, Jun 20 2025

Keywords

Comments

(6n-1, 6n+1) are twin primes iff a(n) = 0, that is, if there are no nonzero integers x, y such that n = |6xy + x + y|. These n are listed in A002822, the complement is A067611.
The corresponding x-values are listed in A384102.

Examples

			For n = 1, 2 and 3, there are no nonzero x,y such that n = |6xy + x + y|, and (6n-1, 6n+1) = (5, 7), (11, 13) and (17, 19) are indeed twin primes.
For n = 4 we have x = y = -1 such that |6xy + x + y| = |6 - 1 - 1| = 4 and (23, 25) is indeed not a twin prime pair.
		

Crossrefs

Cf. A384102 (the corresponding x-values).
Cf. A002822 (indices of zeros: n such that 6n-1 and 6n+1 are twin primes).
Cf. A077800 (list of twin primes), A060461, A171696 (none among 6n+-1 is prime), A067611 (n = 6xy +- x +- y: 6n-1 or 6n+1 is composite).

Programs

  • Maple
    f:= proc(n) local V, C, t, m, v, r;
           V:= numtheory:-divisors(6*n+1) minus {1, 6*n+1};
           C:= map(u -> `if`(u mod 6 = 1,  [(u-1)/6, ((6*n+1)/u - 1)/6], [(-u-1)/6, (-(6*n+1)/u - 1)/6]), V);
           V:= numtheory:-divisors(6*n-1) minus {1, 6*n-1};
           C:= C union map(u -> `if`(u mod 6 = 1, [(u-1)/6, ((-6*n+1)/u - 1)/6], [(-u-1)/6, ((6*n-1)/u - 1)/6]), V);
           C:= select(t -> abs(t[1]) >= abs(t[2]), C);
           if C = {} then return 0 fi;
           m:= infinity;
           for t in C do
             if abs(t[1]) < m then m:= abs(t[1]); r:= t[2];
             elif abs(t[1]) = m and t[1] > 0 then r:= t[2]
             fi
           od;
           r
     end proc:
    map(f, [$1..100]); # Robert Israel, Jul 21 2025
  • PARI
    apply( {A384103(n)=for(x=1,n\/5, my(p=6*x+1, q=6*x-1, y=if((n-x)%p==0, (n-x)\p, (n+x)%p==0, -(n+x)\p, (n-x)%q==0, (n-x)\q, (n+x)%q==0,-(n+x)\q)); y && abs(y) <= x && return(y))}, [1..90])

A100819 Composite numbers whose prime factors are twin primes.

Original entry on oeis.org

9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 117, 119, 121, 123, 125, 129, 133, 135, 143, 145, 147, 153, 155, 165, 169, 171, 175, 177, 183, 187, 189, 195, 203, 205, 209, 213, 215, 217, 219, 221
Offset: 1

Views

Author

Walter Carlini, Jan 06 2005; corrected Jan 22 2005

Keywords

Examples

			221 = 13 * 17 (13 is the twin prime of 11 and 17 is the twin prime to 19).
		

Crossrefs

Cf. A077800 (twin primes).

Programs

  • Mathematica
    nn = 100; p = Prime[Range[nn]]; t = {}; Do[If[p[[n + 1]] - p[[n]] == 2 || p[[n]] - p[[n - 1]] == 2, AppendTo[t, p[[n]]]], {n, nn - 1}]; Select[Range[2, t[[-1]]], ! PrimeQ[#] && Complement[Transpose[FactorInteger[#]][[1]], t] == {} &] (* T. D. Noe, May 21 2013 *)

Extensions

New name, typo in example fixed by Zak Seidov, May 20 2013

A114379 Sums of p-th to the q-th prime where p and q are twin primes.

Original entry on oeis.org

23, 41, 109, 187, 349, 551, 841, 1079, 1667, 1779, 2357, 2599, 3219, 3487, 3631, 4319, 4533, 5197, 5501, 6213, 7039, 8709, 9031, 9829, 11233, 12425, 13227, 13677, 14329, 14813, 18667, 18951, 19073, 19973, 20561, 24329, 24685, 25153, 25561, 26261
Offset: 1

Views

Author

Cino Hilliard, Feb 10 2006

Keywords

Comments

Conjecture: The number of terms in this sequence is infinite.

Examples

			3 and 5 are the first twin prime pair: prime(3) = 5, prime(4) = 7, prime(5) = 11
and 5+7+11 = 23, the first entry in the table.
		

Programs

  • Mathematica
    Plus @@ (Prime /@ Range[#, # + 2]) & /@ Select[Prime@ Range@ 200, PrimeQ[# + 2] &] (* Michael De Vlieger, Apr 01 2015 *)
  • PARI
    sumprimes(m, n) = { local(x); return(sum(x=m, n, prime(x))) }
    g(n)=forprime(x=3,n,if(isprime(x+2),print1(sumprimes(x,x+2)",")))

Formula

prime(k) = A000040(k) is the k-th prime number.
a(n) = Sum_{k=A077800(2n-1)..A077800(2n)} prime(k). - Danny Rorabaugh, Apr 01 2015

A144550 Largest non-twin prime < n-th and (n+1)-th twin primes.

Original entry on oeis.org

2, 23, 37, 53, 67, 97, 131, 173, 223, 233, 263, 277, 307, 337, 409, 457, 509, 563, 593, 613, 631, 653, 797, 853, 877, 1013, 1039, 1087, 1129, 1223, 1259, 1283, 1297, 1307, 1423, 1447, 1471, 1601, 1613, 1663, 1693, 1709, 1783, 1867, 1913, 1993, 2017, 2069
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 31 2008

Keywords

Crossrefs

Programs

  • Maple
    isA077800 := proc(n) isprime(n) and ( isprime(n+2) or isprime(n-2)) ; end proc:
    isA007510 := proc(n) isprime(n) and not isA077800(n) ; end proc:
    isA144550 := proc(n) isA007510(n) and isA077800( nextprime(n)) ; end proc:
    for n from 2 to 2500 do if isA144550(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, May 01 2010
  • Mathematica
    Module[{nn=400,tps},tps=Union[Flatten[Select[Partition[Prime[Range[nn]],2,1], #[[2]]-#[[1]] == 2&]]];Complement[NextPrime[#,-1]&/@tps,tps]] (* Harvey P. Dale, Jun 23 2022 *)

Formula

{A007510(k): nextprime(A007510(k)) in A077800}. - R. J. Mathar, May 01 2010

Extensions

Corrected (1993 inserted) by R. J. Mathar, May 01 2010

A153740 Smallest non-twin prime > n-th and (n+1)-th twin primes.

Original entry on oeis.org

23, 37, 47, 67, 79, 113, 157, 211, 233, 251, 277, 293, 317, 353, 439, 467, 541, 577, 607, 631, 647, 673, 839, 863, 887, 1039, 1069, 1097, 1163, 1237, 1283, 1297, 1307, 1327, 1433, 1459, 1493, 1613, 1627, 1693, 1709, 1733, 1801, 1889, 1973, 2003, 2039, 2099
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 31 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[NextPrime/@Transpose[Select[Partition[Prime[Range[500]],2,1], Last[#]-First[#] == 2&]][[2]],!PrimeQ[#-2]&&!PrimeQ[#+2]&] (* Harvey P. Dale, Feb 25 2012 *)

Extensions

863 inserted by R. J. Mathar, Jan 03 2009

A158284 List of pairs p, p+2 where p is prime and p and p+2 contain the same number of prime digits.

Original entry on oeis.org

3, 5, 5, 7, 13, 15, 23, 25, 29, 31, 43, 45, 53, 55, 73, 75, 83, 85, 89, 91, 103, 105, 109, 111, 113, 115, 163, 165, 173, 175, 193, 195, 223, 225, 229, 231, 233, 235, 263, 265, 283, 285, 293, 295, 313, 315, 353, 355, 373, 375, 383, 385, 389, 391, 409, 411, 433
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 15 2009

Keywords

Comments

Prime digits are 2, 3, 5 or 7.

Crossrefs

Cf. A077800.

Programs

Extensions

(13,15) inserted, (23,25) inserted, and all other numbers replaced by R. J. Mathar, May 19 2010
Definition changed to match the terms by N. J. A. Sloane, Dec 03 2017

A158342 List of twin primes p1 and p2 with odd sum of digits of p1 and even sum of digits of p2.

Original entry on oeis.org

29, 31, 179, 181, 269, 271, 809, 811, 1019, 1021, 1619, 1621, 1949, 1951, 2339, 2341, 2999, 3001, 3329, 3331, 3389, 3391, 3929, 3931, 4049, 4051, 4229, 4231, 4649, 4651, 5279, 5281, 5639, 5641, 5879, 5881, 6089, 6091, 6269, 6271, 6359, 6361, 6449, 6451
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 16 2009

Keywords

Crossrefs

Cf. A077800.

Programs

  • Mathematica
    Select[Partition[Prime[Range[1000]],2,1],#[[2]]-#[[1]]==2&&OddQ[Total[IntegerDigits[#[[1]]]]]&&EvenQ[Total[IntegerDigits[#[[2]]]]]&]//Flatten (* Harvey P. Dale, Jan 19 2025 *)

Extensions

Corrected (269,271 inserted, 1229,1231 removed, 3119,3121 removed...) by R. J. Mathar, May 19 2010
Previous Showing 51-60 of 108 results. Next