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

A122565 Twin primes of form 4k+1, 4k+3.

Original entry on oeis.org

5, 7, 17, 19, 29, 31, 41, 43, 101, 103, 137, 139, 149, 151, 197, 199, 269, 271, 281, 283, 461, 463, 521, 523, 569, 571, 617, 619, 641, 643, 809, 811, 821, 823, 857, 859, 881, 883, 1049, 1051, 1061, 1063, 1229, 1231, 1277, 1279, 1289, 1291, 1301, 1303, 1481
Offset: 1

Views

Author

Miklos Kristof, Sep 21 2006

Keywords

Comments

Twin primes with Hamming distance 1 between them. - Vladimir Shevelev, Jan 29 2012

Examples

			a(3) = 17 = 4*4 + 1, a(4) = 19 = 4*4 + 3.
		

Crossrefs

Programs

  • Maple
    i:=1:for k from 1 to 600 do if isprime(4*k+1) and isprime(4*k+3) then a[i]:=4*k+1:a[i+1]:=4*k+3: i:=i+2 fi od: seq(a[n],n=1..i-1);
  • Mathematica
    Flatten[Select[Table[4k+{1,3},{k,400}],And@@PrimeQ[#] &]] (* Jayanta Basu, May 26 2013 *)

A364678 Maximum number of primes between consecutive multiples of n, as permitted by divisibility considerations.

Original entry on oeis.org

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

Views

Author

Brian Kehrig, Aug 24 2023

Keywords

Comments

Alternatively: a(n) = the maximum number of elements of an admissible k-tuple strictly contained in (0,n) such that all elements are relatively prime to n. Recall that an admissible tuple is defined as a tuple of integers with the property that all primes p have at least one residue class that has no intersection with the tuple.
For n > 1, we have a(n) <= A023193(n-1), with equality if (but not only if) n is prime or a power of 2. The smallest n for which it is not an equality is n=14.
Conjecture 1: Every nonnegative integer appears in this sequence.
Conjecture 2: For all n, there is an infinitude of k's such that there are a(n) primes between n*k and n*(k+1).
Conjecture 2 resembles the k-tuples conjecture a.k.a. the first Hardy-Littlewood conjecture, although it is not the same.
A notable value is a(35) = 8. Compare with A000010(210) = 48. This says that between any two consecutive multiples of 210 the 48 values that are not divisible by 2, 3, 5 or 7 are equally distributed between 6 equal divisions of 210; that is, 8 are in the interval [0, 34], 8 in the interval [35, 69], etc. - Peter Munn, Feb 16 2024

Examples

			Between two multiples of 15 (n and n+15), only n+1, n+2, n+4, n+7, n+8, n+11, n+13, and n+14 could possibly be prime based on divisibility by 3 and 5. However, 4 of these are even and 4 are odd, so at most 4 of them can be prime. Thus, a(15)=4.
		

Crossrefs

Multiples of n following which the maximum number of primes occur for particular n: A005097 (2), A144769 (3), A123986 (4), A056956 (6), A007811 (10), A123985 (12), A309871 (18).

Programs

  • Python
    # see Links section

A309871 Numbers n for which 18n+1, 18n+5, 18n+7, 18n+11, 18n+13 and 18n+17 are primes.

Original entry on oeis.org

892, 2432, 156817, 806697, 822937, 1377022, 1389412, 1418007, 1619642, 1753552, 2017732, 2058647, 2329302, 2554142, 2703347, 3058772, 3135107, 3326522, 3391797, 3723457, 4126867, 4132782, 4171422, 4411837, 4610252, 6378487, 6440087, 6878987, 6897782, 6991547
Offset: 1

Views

Author

Ely Golden, Aug 21 2019

Keywords

Crossrefs

Programs

  • Mathematica
    tot[n_] := Select[Range[n], CoprimeQ[#, n] &]; m = 18; t = tot[m]; aQ[n_] := AllTrue[m * n + t, PrimeQ]; Select[Range[10^6], aQ] (* Amiram Eldar, Aug 22 2019 *)
  • SageMath
    x = 1
    for i in range(5000000):
        if (18*i+1 in Primes()
        and 18*i+5 in Primes()
        and 18*i+7 in Primes()
        and 18*i+11 in Primes()
        and 18*i+13 in Primes()
        and 18*i+17 in Primes()):
            print(str(x)+" "+str(i))
            x += 1

A254288 Numbers k such that 4*k + {1, 3, 7, 9, 13, 19} are all prime.

Original entry on oeis.org

1, 370, 41425, 81535, 255625, 267175, 311590, 365350, 1054570, 1381750, 2533600, 2975125, 3266080, 3930205, 4684210, 4782385, 4802860, 5940850, 6414610, 7986565, 8429245, 8570470, 8636305, 8810080, 9270715, 9857980, 10459525, 13708225, 13917490, 15127720, 15252460
Offset: 1

Views

Author

K. D. Bajpai, Jan 27 2015

Keywords

Comments

All terms in this sequence are congruent to 1 mod 3.
Subsequence of A123986.

Examples

			a(2) = 370;
4*370 +  1 = 1481;
4*370 +  3 = 1483;
4*370 +  7 = 1487;
4*370 +  9 = 1489;
4*370 + 13 = 1493;
4*370 + 19 = 1499;
All six are prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10^8] | forall{4*n+i: i in [1, 3, 7, 9, 13, 19] |  IsPrime(4*n+i)}]; // Vincenzo Librandi, Mar 12 2015
  • Mathematica
    Select[Range[5*10^7], PrimeQ[4*# + 1] && PrimeQ[4*# + 3] && PrimeQ[4*# + 7] && PrimeQ[4*# + 9] && PrimeQ[4*# + 13] && PrimeQ[4*# + 19] &]
    Select[Range[5*10^6], And @@ PrimeQ /@ ({1, 3, 7, 9, 13, 19} + 4 #) &]
  • PARI
    for(n=1,10^7, if( isprime(4*n + 1) && isprime(4*n + 3) &&isprime(4*n + 7) &&isprime(4*n + 9) &&isprime(4*n + 13) &&isprime(4*n + 19) , print1(n,", ")))
    

A254376 Numbers n such that 4n+1, 4n+3, 4n+7, 4n+9 and 4n+13 are prime.

Original entry on oeis.org

1, 25, 370, 4015, 4855, 10945, 36040, 41425, 41710, 50455, 56335, 61900, 81535, 86995, 116290, 129700, 134110, 158365, 207430, 239635, 255625, 265990, 267175, 272815, 293395, 311590, 335080, 337810, 339700, 342115, 365350, 393385, 403960, 481345, 488590, 550990
Offset: 1

Views

Author

K. D. Bajpai, Jan 29 2015

Keywords

Comments

All terms in this sequence are 1 mod 3.
Each term yields a set of five consecutive primes.
Alternatively: Numbers n such that 4n+k forms a set of five consecutive primes for k = {1,3,7,9,13}.
Subsequence of A123986.

Examples

			25 is in the list because 4*25 + 1 = 101, 4*25 + 3 = 103, 4*25 + 7 = 107, 4*25 + 9 = 109 and 4*25 + 13 = 113 are all prime.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10^6] | forall{4*n+r: r in [1,3,7,9,13] | IsPrime(4*n+r)}]; // Vincenzo Librandi, Feb 16 2015
  • Mathematica
    Select[Range[1, 500000], PrimeQ[4*# + 1] && PrimeQ[4*# + 3] && PrimeQ[4*# + 7] && PrimeQ[4*# + 9] && PrimeQ[4*# + 13] &]
    Select[Range[5*10^6], And @@ PrimeQ /@ ({1, 3, 7, 9, 13} + 4 #) &]
  • PARI
    for(n=1,10^7, if( isprime(4*n + 1) && isprime(4*n + 3) &&isprime(4*n + 7) &&isprime(4*n + 9) &&isprime(4*n + 13), print1(n,", ")))
    

A174235 The absolute values of (n-th number k such that k*4-+1 is twin prime pair minus n-th number m such that m*4+2-+1 is twin prime pair).

Original entry on oeis.org

0, 1, 8, 8, 2, 11, 11, 8, 7, 8, 28, 25, 34, 4, 5, 5, 50, 44, 53, 26, 65, 50, 44, 50, 77, 35, 7, 17, 1, 4, 8, 2, 4, 32, 26, 71, 77, 41, 86, 98, 95, 113, 83, 26, 11, 20, 17, 4, 23, 13, 16, 23, 23, 20, 26, 14, 80, 137, 116, 128, 122, 146, 149, 158, 200, 158, 158, 113, 110, 164, 200
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 13 2010

Keywords

Crossrefs

Formula

a(n)=Abs(A045753(n)-A123986(n)).

Extensions

Values from a(63) onwards corrected by R. J. Mathar, Apr 16 2010

A174236 n-th number k such that k*4-+1 is twin prime pair plus n-th number m such that m*4+2-+1 is twin prime pair.

Original entry on oeis.org

2, 7, 22, 28, 52, 79, 85, 106, 127, 148, 202, 235, 250, 304, 325, 409, 460, 472, 493, 550, 595, 664, 682, 694, 727, 775, 841, 877, 937, 970, 1006, 1042, 1060, 1102, 1144, 1225, 1267, 1315, 1414, 1462, 1489, 1513, 1567, 1654, 1675, 1714, 1747, 1774, 1813, 1897
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 13 2010

Keywords

Crossrefs

Formula

a(n)=A045753(n)+A123986(n).

Extensions

Corrected (108 replaced by 106) by R. J. Mathar, Apr 16 2010

A201541 Numbers n such that 12n+5 and 12n+7 are primes.

Original entry on oeis.org

0, 1, 2, 3, 8, 11, 12, 16, 22, 23, 38, 43, 47, 51, 53, 67, 68, 71, 73, 87, 88, 102, 106, 107, 108, 123, 141, 143, 156, 162, 166, 173, 177, 178, 186, 192, 198, 212, 221, 227, 232, 233, 247, 271, 277, 282, 288, 296, 298, 318, 326, 327, 333, 337, 346, 351, 352
Offset: 0

Views

Author

Zak Seidov, Dec 02 2011

Keywords

Comments

A123979 and A123985 are subsequences.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 352], PrimeQ[12 # + 5] && PrimeQ[12 # + 7] &] (* T. D. Noe, Dec 05 2011 *)

Formula

a(n)=(A123986(n)-1)/3.
Showing 1-8 of 8 results.