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 11-20 of 53 results. Next

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

A245304 Numbers m such that m+1, m+3, m+7, m+9 and m+13 are all primes.

Original entry on oeis.org

4, 10, 100, 1480, 16060, 19420, 21010, 22270, 43780, 55330, 144160, 165700, 166840, 195730, 201820, 225340, 247600, 268810, 326140, 347980, 361210, 397750, 465160, 518800, 536440, 633460, 633790, 661090, 768190, 795790, 829720, 857950, 876010, 958540
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 18 2014

Keywords

References

  • W. Sierpiński, 250 Problems in Elementary Number Theory. New York: American Elsevier, 1970. Problem #82, variant.

Crossrefs

Cf. A010051, A022006, A245305, A007811, subsequence of A125855.

Programs

  • Haskell
    a245304 n = a245304_list !! (n-1)
    a245304_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [1, 1, 1, 1, 1]) [1, 3, 7, 9, 13]
    
  • Magma
    [n: n in [0..10^6] | IsPrime(n+1) and IsPrime(n+3) and IsPrime(n+7) and IsPrime(n+9) and IsPrime(n+13)]; // Vincenzo Librandi, Jun 15 2015
  • Mathematica
    Select[Range[10^6],AllTrue[#+{1,3,7,9,13},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 07 2015 *)
  • PARI
    forprime(p=2, 10^7, m=p-1; if(isprime(m+3)&&isprime(m+7)&&isprime(m+9)&&isprime(m+13), print1(m", "))) \\ Jens Kruse Andersen, Jul 18 2014
    

Formula

a(n) = A022006(n)-1. - Jens Kruse Andersen, Jul 18 2014

A105052 Write a(n) as a four-bit number; those bits state whether 10n+1, 10n+3, 10n+7 and 10n+9 are primes.

Original entry on oeis.org

6, 15, 5, 10, 14, 5, 10, 13, 5, 2, 15, 4, 2, 11, 1, 10, 6, 5, 8, 15, 0, 8, 7, 5, 8, 10, 5, 10, 12, 4, 2, 14, 0, 10, 3, 5, 2, 5, 5, 2, 9, 1, 8, 13, 5, 2, 14, 1, 2, 9, 5, 0, 12, 0, 10, 2, 5, 10, 2, 5, 10, 7, 0, 8, 14, 5, 8, 6, 4, 8, 9, 1, 2, 5, 4, 10, 9, 4, 2, 2, 1, 8, 15, 1, 0, 7, 4, 2, 14, 0, 2, 9, 1, 2
Offset: 0

Views

Author

Robert G. Wilson v, Apr 01 2005

Keywords

Comments

Binary encoding of the prime-ness of the 4 integers r+10*n with remainder r=1, 3, 7 or 9. Classify the 4 integers 10n+r with r= 1, 3, 7, or 9, as nonprime or prime and associate bit positions 3=MSB,2,1,0=LSB with the 4 remainders in that order. Raise the bit if 10n+r is prime, erase it if 10n+r is nonprime. The sequence interprets the 4 bits as a number in base 2. a(n) is the decimal representation, obviously in the range 0<=a(n)<16. - Juri-Stepan Gerasimov, Jun 10 2008

Examples

			For n=2, the 4 numbers 21 (r=1), 23 (r=3), 27 (r=7), 29 (r=9) are nonprime, prime, nonprime, prime, which is rendered into 0101 = 2^0 + 2^2 = 5 = a(2).
These two hexadecimal lines represent the primes between 10 and 1010:
  F5AE5AD52F 42B1A658F0 8758A5AC42 E0A3525529 18D52E1295
  0C0A25A25A 708E586489 1254A94221 8F10742E02 912A42A4A1
		

Crossrefs

Cf. A140891 (analog in base 14, prime = bit 0, remainder 1 = LSB), A140387 (analog in base 30, prime = bit 0, remainder 1 = LSB).

Programs

  • Mathematica
    f[n_] := FromDigits[ PrimeQ[ Drop[ Range[10n + 1, 10n + 9, 2], {3, 3}]] /. {True -> 1, False -> 0}, 2]; Table[ f[n], {n, 2, 93}]
    f[n_] := If[ GCD[n, 10] == 1, If[PrimeQ@ n, 1, 0], -1]; FromDigits[#, 2] & /@ Partition[ DeleteCases[ Array[f, 940], -1], 4] (* Robert G. Wilson v, Jun 22 2012 *)
    Table[FromDigits[Boole[PrimeQ[10n+{1,3,7,9}]],2],{n,0,100}] (* Harvey P. Dale, Nov 07 2016 *)
  • PARI
    f(n)={s=0;if(isprime(10*n+1),s+=8);if(isprime(10*n+3), s+= 4);if(isprime(10*n+7),s+=2);if(isprime(10*n+9),s+=1); return(s)};for(n=0,93,print1(f(n),", ")) \\ Washington Bomfim, Jan 18 2011

Extensions

Edited by Don Reble, Nov 08 2005
Further edited by R. J. Mathar, Jun 18 2008
Further edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar

A245305 Numbers k such that 4k+1, 4k+3, and 6k+5 are all primes.

Original entry on oeis.org

1, 4, 7, 37, 142, 154, 202, 214, 307, 424, 469, 487, 499, 559, 577, 664, 742, 814, 847, 979, 982, 1054, 1129, 1159, 1162, 1252, 1369, 1522, 1612, 1642, 1672, 1837, 1987, 2107, 2134, 2149, 2209, 2242, 2359, 2407, 2419, 2482, 2632, 2677, 2767, 2887, 2929, 2944
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 18 2014

Keywords

Comments

Sequence is infinite (Sierpiński).
Infinitude of the sequence would follow from Dickson's (unproved) conjecture. - Jens Kruse Andersen, Jul 18 2014

References

  • W. Sierpiński, A Selection of Problems in the Theory of Numbers. Pergamon, 1964, p. 52, #15.

Crossrefs

Programs

  • Haskell
    a245305 n = a245305_list !! (n-1)
    a245305_list = map ((`div` 4) . (subtract 1) . head) $
       filter (all (== 1) . map a010051') $
              iterate (zipWith (+) [4, 4, 6]) [1, 3, 5]
    
  • Magma
    [n: n in [0..3*10^3] | IsPrime(4*n+1) and IsPrime(4*n+3) and IsPrime(6*n+5)]; // Vincenzo Librandi, Jun 15 2015
    
  • Mathematica
    Select[Range[0, 3000], PrimeQ[4 # + 1] && PrimeQ[4 # + 3] && PrimeQ[6 # + 5] &] (* Vincenzo Librandi, Jun 15 2015 *)
  • PARI
    isok(k) = isprime(4*k+1) && isprime(4*k+3) && isprime(6*k+5); \\ Michel Marcus, Jan 24 2022

A064962 Numbers k such that 1000k+1, 1000k+3, 1000k+7, 1000k+9 are all primes.

Original entry on oeis.org

13, 1447, 2062, 5527, 6760, 8062, 11554, 11890, 14467, 23113, 23482, 24952, 25150, 28201, 28300, 31072, 31576, 36217, 41584, 41599, 45331, 50635, 56914, 66688, 67639, 69376, 75079, 80002, 81157, 82240, 84517, 88948, 90010, 90376, 91018
Offset: 1

Views

Author

Robert G. Wilson v, Oct 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], PrimeQ[1000# + 1] && PrimeQ[1000# + 3] && PrimeQ[1000# + 7] && PrimeQ[1000# + 9] &]
  • PARI
    { n=0; for (m=1, 10^9, if(isprime(1000*m + 1) && isprime(1000*m + 3) && isprime(1000*m + 7) && isprime(1000*m + 9), write("b064962.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 01 2009

A097638 a(n) is the smallest n-digit number m such that 10*m+1, 10*m+3, 10*m+7 & 10*m+9 are primes.

Original entry on oeis.org

1, 10, 148, 1300, 10111, 100234, 1001395, 10000546, 100002526, 1000005742, 10000000753, 100000012369, 1000000005658, 10000000094572, 100000000006744, 1000000000134649, 10000000000032523, 100000000000043071, 1000000000000213927, 10000000000000256116, 100000000000000008172
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 18 2004

Keywords

Comments

a(n) is the smallest n-digit term of A007811. a(50)=10^49+10718757, can you find a(100)?

Examples

			a(4)=1300 because 13001,13003,13007 & 13009 are primes and 1300 is the smallest 4-digit number with this property.
		

Crossrefs

Programs

  • Magma
    F:= func< n,m | IsPrime(10^n +10*m+1) and IsPrime(10^n +10*m+3) and IsPrime(10^n +10*m+7) and IsPrime(10^n +10*m+9) >;
    function a(n)
      t:=0;
        while not F(n,t) do
          t+:=1;
        end while;
      return t+10^(n-1);
    end function;
    [a(n): n in [1..15]]; // G. C. Greubel, Aug 11 2023
    
  • Mathematica
    a[n_]:=(For[m=0, !(PrimeQ[10^n+10m+1] && PrimeQ[10^n+10m+3] && PrimeQ[10^n+10m+7] && PrimeQ[10^n+10m+9]), m++ ]; 10^(n-1)+m);
    Table[a[n], {n, 28}]
  • PARI
    isok(m, n) = my(s=10^(n-1)+ m); ispseudoprime(10*s+1) && ispseudoprime(10*s+3) && ispseudoprime(10*s+7) && ispseudoprime(10*s+9);
    a(n) = my(m=0); while (!isok(m, n), m++); 10^(n-1)+m; \\ Michel Marcus, Aug 09 2023
    
  • SageMath
    def isp(n,m,j): return is_prime(10^n +10*m+j)
    def f(n,m): return isp(n,m,1) and isp(n,m,3) and isp(n,m,7) and isp(n,m,9)
    def b(n):
        k=0
        while not f(n,k):
            k+=1
        return k
    def A097638(n): return b(n) + 10^(n-1)
    for n in range(1,23):
        print(A097638(n), end=", ") # G. C. Greubel, Aug 11 2023

Formula

Let f(n, m) be the set of primes 10^n + 10*m + 1, 10^n + 10*m + 3, 10^n + 10*m + 7, and 10^n + 10*m + 9, and let b(n) be the smallest number m that is not in f(n, m). a(n) is then 10^(n-1) + b(n).

Extensions

More terms from Michel Marcus, Aug 09 2023

A115095 Positions of 4's in A038800 with offset 1.

Original entry on oeis.org

1, 2, 11, 20, 83, 149, 188, 209, 326, 347, 566, 944, 1301, 1565, 1574, 1607, 1805, 1892, 1943, 2102, 2228, 2531, 3173, 3485, 4379, 5135, 5534, 6299, 6722, 6950, 7223, 7727, 7970, 8105, 8273, 8882, 9785, 9914, 10112, 10985, 11654, 11930, 12221, 13547
Offset: 1

Views

Author

Zak Seidov, Mar 01 2006

Keywords

Comments

Starting with a(2)=2, numbers m such that 10*(m-1)+{1,3,7,9} are all primes.
Essentially the same as A064975. - R. J. Mathar, Aug 11 2008

Examples

			11 is a term because 10*(11-1)+{1,3,7,9} = 101,103,107,109 are all prime.
		

References

  • 4 is the maximum possible number of primes between 10*n and 10*(n+1).

Crossrefs

Cf. A064975 (essentially the same).
Cf. A038800 (number of primes between 10*n and 10*n+9).
Cf. A007811.

Programs

  • Mathematica
    Join[{1}, Select[Range[2, 15000, 3], AllTrue[10*# - {1, 3, 7, 9}, PrimeQ] &]] (* Paolo Xausa, Jul 15 2025 *)

Formula

a(1) = 1; for n >= 2, a(n) = A007811(n-1) + 1. - Paolo Xausa, Jul 15 2025

Extensions

Name edited by Paolo Xausa, Jul 20 2025

A178084 Numbers k for which 10k + 1, 10k + 3, 10k + 7, 10k + 9 and 10k + 13 are primes.

Original entry on oeis.org

1, 10, 148, 1606, 1942, 2101, 2227, 4378, 5533, 14416, 16570, 16684, 19573, 20182, 22534, 24760, 26881, 32614, 34798, 36121, 39775, 46516, 51880, 53644, 63346, 63379, 66109, 76819, 79579, 82972, 85795, 87601, 95854, 100885, 102250, 106396
Offset: 1

Views

Author

Roger L. Bagula, May 19 2010

Keywords

Comments

These primes sets are just like 3k-4 and 3k-2 (or 6k-1 and 6*k+1) prime pairs, only five in a row.

Examples

			k =    1:    11,    13,    17,    19,    23,
k =   10:   101,   103,   107,   109,   113,
k =  148:  1481,  1483,  1487,  1489,  1493,
k = 1606: 16061, 16063, 16067, 16069, 16073,
k = 1942: 19421, 19423, 19427, 19429, 19433,
k = 2101: 21011, 21013, 21017, 21019, 21023,
k = 2227: 22271, 22273, 22277, 22279, 22283
		

Crossrefs

Cf. A007811.

Programs

  • Magma
    [n: n in [0..1000]| IsPrime(10*n+1) and IsPrime(10*n+3) and IsPrime(10*n+7) and IsPrime(10*n+9) and IsPrime(10*n+13)] // Vincenzo Librandi, Nov 30 2010
  • Mathematica
    Flatten[Table[If[PrimeQ[10* n + 1] && PrimeQ[10*n + 3] && PrimeQ[10*n + 7] && PrimeQ[10*n + 9] && PrimeQ[10*(n + 1) + 3], n, {}], {n, 0, 50000}]]

Extensions

More terms from Vincenzo Librandi, May 23 2010

A216295 Values of k such that 10k + 1 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

18, 21, 24, 42, 63, 66, 69, 81, 102, 105, 117, 120, 138, 147, 151, 153, 180, 181, 183, 195, 216, 222, 225, 231, 252, 262, 273, 286, 297, 300, 312, 319, 327, 333, 336, 339, 357, 393, 411, 420, 423, 426, 462, 469, 480, 483, 486, 501, 526, 528, 535, 553, 558
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1}, AppendTo[t, n]], {n, 0, 669}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012

A216296 Values of k such that 10k + 3 is the only prime between 10k and 10k + 9.

Original entry on oeis.org

11, 29, 68, 74, 77, 86, 95, 98, 116, 119, 137, 152, 158, 173, 182, 191, 200, 205, 215, 221, 224, 227, 242, 250, 263, 266, 275, 284, 302, 341, 343, 359, 362, 364, 380, 383, 386, 436, 437, 446, 449, 452, 458, 460, 466, 470, 473, 494, 497, 515, 532, 533, 548
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 3}, AppendTo[t, n]], {n, 0, 647}]; t (* T. D. Noe, Sep 03 2012 *)

Formula

a(n) ~ 0.4 n log n. - Charles R Greathouse IV, Sep 07 2012
Previous Showing 11-20 of 53 results. Next