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 37 results. Next

A078860 Least positive residues [mod 210] representing those residue classes which can be lesser of prime pairs from A029710.

Original entry on oeis.org

7, 13, 19, 37, 43, 67, 79, 97, 103, 109, 127, 139, 163, 169, 187, 193
Offset: 1

Views

Author

Labos Elemer, Dec 13 2002

Keywords

Crossrefs

Programs

  • Mathematica
    t=Flatten[Position[Table[GCD[w, 210], {w, 1, 210}], 1]] t2=Intersection[t, t+4]-4

Formula

Intersection[RRS(210), 4+RRS{210)]-4 and {7}. RRS[210]=reduced residue system of 210=first 48=phi[210] terms of A008364; additional term 7 is a singular cases; 210k+r generates complete A029710 with suitable k and r taken from these 15+1 numbers.

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

A078863 Smallest primes from A029710, each belonging to those different residue class of mod 210 which are listed in A078860. Arranged according to possible least positive residues mod 210.

Original entry on oeis.org

7, 13, 19, 37, 43, 67, 79, 97, 103, 109, 127, 349, 163, 379, 397, 193
Offset: 1

Views

Author

Labos Elemer, Dec 13 2002

Keywords

Examples

			Several terms are equal to corresponding ones in A078860, while others are larger like: 397=210.1+187 where r=187 is in A078860.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := Mod[Prime[x], 210] d[x_] := Prime[x+1]-Prime[x] t=Table[0, {210}]; Do[s=f[n]; If[Equal[d[n], 4]&&s<211&&t[[s]]==0, t[[s]]=Prime[n]], {n, 1, 10000}]; t

A023200 Primes p such that p + 4 is also prime.

Original entry on oeis.org

3, 7, 13, 19, 37, 43, 67, 79, 97, 103, 109, 127, 163, 193, 223, 229, 277, 307, 313, 349, 379, 397, 439, 457, 463, 487, 499, 613, 643, 673, 739, 757, 769, 823, 853, 859, 877, 883, 907, 937, 967, 1009, 1087, 1093, 1213, 1279, 1297, 1303, 1423, 1429, 1447, 1483
Offset: 1

Views

Author

Keywords

Comments

Smaller member p of cousin prime pairs (p, p+4).
A015913 contains the composite number 305635357, so it is different from both the present sequence and A029710. (305635357 is the only composite member of A015913 < 10^9.) - Jud McCranie, Jan 07 2001
Apart from the first term, all terms are of the form 6n + 1.
Complement of A067775 (primes p such that p + 4 is composite) with respect to A000040 (primes). With prime 2 also primes p such that q^2 + p is prime for some prime q (q = 3 if p = 2, q = 2 if p > 2). Subsequence of A232012. - Jaroslav Krizek, Nov 23 2013
Conjecture: The sequence is infinite and for every n, a(n+1) < a(n)^(1+1/n). Namely a(n)^(1/n) is a strictly decreasing function of n. - Jahangeer Kholdi and Farideh Firoozbakht, Nov 24 2014
From Alonso del Arte, Jan 12 2019: (Start)
If p splits in Z[sqrt(-2)], p + 4 is an inert prime in that domain. Likewise, if p splits in Z[sqrt(2)], p + 4 is an inert prime in that domain.
The only way for p or p + 4 to split in both domains is if it is congruent to 1 modulo 24, in which case the other prime is inert in both domains.
For example, 3 = (1 - sqrt(-2))*(1 + sqrt(-2)) but is inert in Z[sqrt(2)], while 7 = (3 - sqrt(2))*(3 + sqrt(2)) but is inert in Z[sqrt(-2)]. And also 11 = (3 - sqrt(-2))*(3 + sqrt(-2)) but 15 is composite in Z or any quadratic integer ring.
And 97 = (5 - 6*sqrt(-2))*(5 + 6*sqrt(-2)) = (1 - 7*sqrt(2))*(1 + 7*sqrt(2)), but 101 is inert in both Z[sqrt(-2)] and Z[sqrt(2)]. (End)

Crossrefs

Exactly the same as A029710 except for the exclusion of 3.

Programs

  • Haskell
    a023200 n = a023200_list !! (n-1)
    a023200_list = filter ((== 1) . a010051') $
                   map (subtract 4) $ drop 2 a000040_list
    -- Reinhard Zumkeller, Aug 01 2014
  • Magma
    [p: p in PrimesUpTo(1500) | NextPrime(p)-p eq 4]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    A023200 := proc(n) option remember; if n = 1 then 3; else p := nextprime(procname(n-1)) ; while not isprime(p+4) do p := nextprime(p) ;  end do: p ; end if; end proc: # R. J. Mathar, Sep 03 2011
  • Mathematica
    Select[Range[10^2], PrimeQ[#] && PrimeQ[# + 4] &] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    Select[Prime[Range[250]],PrimeQ[#+4]&] (* Harvey P. Dale, Oct 09 2023 *)
  • PARI
    print1(3);p=7;forprime(q=11,1e3,if(q-p==4,print1(", "p)); p=q) \\ Charles R Greathouse IV, Mar 20 2013
    

Formula

a(n) = A046132(n) - 4 = A087679(n) - 2.
a(n) >> n log^2 n via the Selberg sieve. - Charles R Greathouse IV, Nov 20 2016

Extensions

Definition modified by Vincenzo Librandi, Aug 02 2009
Definition revised by N. J. A. Sloane, Mar 05 2010

A046132 Larger member p+4 of cousin primes (p, p+4).

Original entry on oeis.org

7, 11, 17, 23, 41, 47, 71, 83, 101, 107, 113, 131, 167, 197, 227, 233, 281, 311, 317, 353, 383, 401, 443, 461, 467, 491, 503, 617, 647, 677, 743, 761, 773, 827, 857, 863, 881, 887, 911, 941, 971, 1013, 1091, 1097, 1217, 1283, 1301, 1307, 1427, 1433
Offset: 1

Views

Author

Keywords

Comments

A pair of cousin primes are primes of the form p and p+4 (where p+2 may or may not be a prime). - N. J. A. Sloane, Mar 18 2021

Crossrefs

Essentially the same as A031505. Cf. A023200, A029710, A098429.

Programs

  • Haskell
    a046132 n = a046132_list !! (n-1)
    a046132_list = filter ((== 1) . a010051') $ map (+ 4) a000040_list
    -- Reinhard Zumkeller, Aug 01 2014
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p4=p+4], (*Print[p4];*)AppendTo[lst, p4]], {n, 10^2}];lst (* Vladimir Joseph Stephan Orlovsky, Aug 21 2008 *)
    Select[Prime[Range[300]],PrimeQ[#+4]&]+4 (* Harvey P. Dale, Dec 15 2017 *)
  • PARI
    forprime(p=2,1e5,if(isprime(p-4),print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
    

Formula

a(n) = A023200(n) + 4 = A087679(n) + 2.
a(n) = 3*A157834(n-1) + 2 = A029710(n-1) + 4 = 6*A056956(n-1) + 5 (thus a(n) mod 6 == 5), for all n>1. - M. F. Hasler, Jan 15 2013

A022005 Initial members of prime triples (p, p+4, p+6).

Original entry on oeis.org

7, 13, 37, 67, 97, 103, 193, 223, 277, 307, 457, 613, 823, 853, 877, 1087, 1297, 1423, 1447, 1483, 1663, 1693, 1783, 1867, 1873, 1993, 2083, 2137, 2377, 2683, 2707, 2797, 3163, 3253, 3457, 3463, 3847, 4153, 4513, 4783, 5227, 5413, 5437, 5647, 5653, 5737, 6547
Offset: 1

Views

Author

Keywords

Comments

Subsequence of A029710. - R. J. Mathar, May 06 2017
All terms are congruent to 1 (modulo 6). - Matt C. Anderson, May 22 2015

Crossrefs

Subsequence of A029710 and of A002476.
Subsequence of A007529.

Programs

A029709 Numbers k such that k-th and (k+1)st primes differ by 4.

Original entry on oeis.org

4, 6, 8, 12, 14, 19, 22, 25, 27, 29, 31, 38, 44, 48, 50, 59, 63, 65, 70, 75, 78, 85, 88, 90, 93, 95, 112, 117, 122, 131, 134, 136, 143, 147, 149, 151, 153, 155, 159, 163, 169, 181, 183, 198, 207, 211, 213, 224, 226, 229, 235, 237, 244, 247, 249, 251
Offset: 1

Views

Author

Keywords

Comments

Positions of 4 in A001223. - Zak Seidov, Apr 28 2015

Crossrefs

Programs

  • Magma
    [n: n in [0..300] | NthPrime(n+1) - NthPrime(n) eq 4]; // Vincenzo Librandi, Apr 28 2015
  • Mathematica
    Select[Range[2, 300], 4 == (Prime[# + 1] - Prime[#]) &] (* Vincenzo Librandi, Apr 28 2015 *)

Formula

A029710(n) = prime(a(n)). - R. J. Mathar, Apr 30 2024

A015913 Numbers k such that sigma(k) + 4 = sigma(k+4).

Original entry on oeis.org

3, 7, 13, 19, 37, 43, 67, 79, 97, 103, 109, 127, 163, 193, 223, 229, 277, 307, 313, 349, 379, 397, 439, 457, 463, 487, 499, 613, 643, 673, 739, 757, 769, 823, 853, 859, 877, 883, 907, 937, 967, 1009, 1087, 1093, 1213, 1279, 1297, 1303, 1423
Offset: 1

Views

Author

Keywords

Comments

This sequence contains the composite number 305635357, so is different from A023200 and A029710 (305635357 is the only composite member of the present sequence below 10^9). - Jud McCranie, Jan 07 2001

Crossrefs

Programs

A341512 a(n) = A341529(n) - A341528(n) = (sigma(n)*A003961(n)) - (n*sigma(A003961(n))).

Original entry on oeis.org

0, 1, 2, 11, 2, 36, 4, 85, 46, 58, 2, 324, 4, 120, 120, 575, 2, 693, 4, 566, 248, 172, 6, 2340, 94, 270, 788, 1176, 2, 1800, 6, 3661, 348, 358, 336, 5967, 4, 492, 548, 4210, 2, 3744, 4, 1820, 2490, 744, 6, 15372, 380, 2271, 720, 2826, 6, 11304, 392, 8760, 992, 946, 2, 15480, 6, 1232, 5164, 22631, 636, 5904, 4, 3866
Offset: 1

Views

Author

Antti Karttunen, Feb 22 2021

Keywords

Crossrefs

Cf. Sequences A001359, A029710, A031924 give the positions of 2's, 4's and 6's in this sequence, or at least subsets of such positions.

Programs

  • Mathematica
    Array[#2 DivisorSigma[1, #1] - #1 DivisorSigma[1, #2] & @@ {#, Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1]} &, 68] (* Michael De Vlieger, Feb 22 2021 *)
  • PARI
    A003961(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ From A003961
    A341528(n) = (n*sigma(A003961(n)));
    A341529(n) = (sigma(n)*A003961(n));
    A341512(n) = (A341529(n)-A341528(n));

Formula

a(n) = A341529(n) - A341528(n) = (sigma(n)*A003961(n)) - (n*sigma(A003961(n))).
For all primes p, a(p) = (q*(p+1)) - (p*(q+1)) = (pq + q) - (pq + p) = q - p = A001223(A000720(p)), where q = nextprime(p) = A003961(p).
And in general, a(p^e) = (q^e * (p^(e+1)-1)/(p-1)) - ((p^e) * (q^(e+1)-1)/(q-1)), where q = A003961(p).
Thus, a(p^2) = (p + 1)*q^2 - p^2*q - p^2,
a(p^3) = (p^2 + p + 1)*q^3 - p^3*q^2 - p^3*q - p^3,
a(p^4) = (p^3 + p^2 + p + 1)*q^4 - p^4*q^3 - p^4*q^2 - p^4*q - p^4,
etc.

A031505 Upper prime of a difference of 4 between consecutive primes.

Original entry on oeis.org

11, 17, 23, 41, 47, 71, 83, 101, 107, 113, 131, 167, 197, 227, 233, 281, 311, 317, 353, 383, 401, 443, 461, 467, 491, 503, 617, 647, 677, 743, 761, 773, 827, 857, 863, 881, 887, 911, 941, 971, 1013, 1091, 1097, 1217, 1283, 1301, 1307, 1427, 1433, 1451
Offset: 1

Views

Author

Keywords

Crossrefs

Essentially the same as A046132.

Programs

  • Maple
    for i from 1 to 232 do if ithprime(i+1) = ithprime(i) + 4 then print({ithprime(i+1)}); fi; od; # Zerinvary Lajos, Mar 19 2007
  • Mathematica
    Select[Partition[Prime[Range[250]],2,1],#[[2]]-#[[1]]==4&][[All,2]] (* Harvey P. Dale, Feb 02 2023 *)

Formula

a(n) = A029710(n-1) + 4 = A029708(n) + 2.

Extensions

Corrected and extended by Henry Bottomley, Jul 18 2000
Definition clarified by Harvey P. Dale, Feb 02 2023
Showing 1-10 of 37 results. Next