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

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

Original entry on oeis.org

1, 10, 19, 82, 148, 187, 208, 325, 346, 565, 943, 1300, 1564, 1573, 1606, 1804, 1891, 1942, 2101, 2227, 2530, 3172, 3484, 4378, 5134, 5533, 6298, 6721, 6949, 7222, 7726, 7969, 8104, 8272, 8881, 9784, 9913, 10111, 10984, 11653, 11929, 12220, 13546, 14416, 15727
Offset: 1

Views

Author

N. J. A. Sloane and J. H. Conway, Mar 15 1996

Keywords

Crossrefs

Programs

  • Haskell
    a007811 n = a007811_list !! (n-1)
    a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]
    -- Reinhard Zumkeller, Jul 18 2014
    
  • Magma
    [n: n in [0..10000] | forall{10*n+r: r in [1,3,7,9] | IsPrime(10*n+r)}]; // Bruno Berselli, Sep 04 2012
    
  • Maple
    for n from 1 to 10000 do m := 10*n: if isprime(m+1) and isprime(m+3) and isprime(m+7) and isprime(m+9) then print(n); fi: od: quit
  • Mathematica
    Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]
    Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* Ray Chandler, Jan 12 2007 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e5,if(s-p==8 && r-p==6 && q-p==2 && p%10==1, print1(p", ")); p=q;q=r;r=s) \\ Charles R Greathouse IV, Mar 21 2013
    
  • Perl
    use ntheory ":all"; my @s = map { ($-1)/10 } sieve_prime_cluster(10,1e9, 2,6,8); say for @s; # _Dana Jacobsen, May 04 2017

Formula

a(n) = 3*A014561(n) + 1. - Zak Seidov, Sep 21 2009

A125855 Numbers k such that k+1, k+3, k+7 and k+9 are all primes.

Original entry on oeis.org

4, 10, 100, 190, 820, 1480, 1870, 2080, 3250, 3460, 5650, 9430, 13000, 15640, 15730, 16060, 18040, 18910, 19420, 21010, 22270, 25300, 31720, 34840, 43780, 51340, 55330, 62980, 67210, 69490, 72220, 77260, 79690, 81040, 82720, 88810, 97840
Offset: 1

Views

Author

Artur Jasinski, Dec 12 2006

Keywords

Comments

It seems that, with the exception of 4, all terms are multiples of 10. - Emeric Deutsch, Dec 24 2006
In fact, all terms except 4 are congruent to 10 (mod 30). - Franklin T. Adams-Watters, Jun 05 2014
For n > 1: a(n) = 10*A007811(n-1). - Reinhard Zumkeller, Jul 18 2014 [Comment corrected by Jens Kruse Andersen, Jul 19 2014]

Examples

			For k = 10, the numbers 10 + 1 = 11, 10 + 3 = 13, 10 + 7 = 17, 10 + 9 = 19 are prime. - _Marius A. Burtea_, May 18 2019
		

Crossrefs

Cf. A010051, A245304 (subsequence), A007811.

Programs

  • Haskell
    a125855 n = a125855_list !! (n-1)
    a125855_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [1, 1, 1, 1]) [1, 3, 7, 9]
    -- Reinhard Zumkeller, Jul 18 2014
    
  • Magma
    [n:n in [1..100000]| IsPrime(n+1) and IsPrime(n+3) and IsPrime(n+7) and IsPrime(n+9)]; // Marius A. Burtea, May 18 2019
    
  • Maple
    a:=proc(n): if isprime(n+1)=true and isprime(n+3)=true and isprime(n+7)=true and isprime(n+9)=true then n else fi end: seq(a(n),n=1..500000); # Emeric Deutsch, Dec 24 2006
  • Mathematica
    Do[If[(PrimeQ[x + 1]) && (PrimeQ[x + 3]) && (PrimeQ[x + 7]) && (PrimeQ[x + 9]), Print[x]], {x, 1, 10000}]
    (* Second program *)
    Select[Range[10^5], Times @@ Boole@ Map[PrimeQ, # + {1, 3, 7, 9}] == 1 &] (* Michael De Vlieger, Jun 12 2017 *)
    Select[Range[100000],AllTrue[#+{1,3,7,9},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 02 2018 *)
  • PARI
    is(n) = my(v=[1, 3, 7, 9]); for(t=1, #v, if(!ispseudoprime(n+v[t]), return(0))); 1 \\ Felix Fröhlich, May 18 2019

Formula

a(n) = A007530(n) - 1. - R. J. Mathar, Jun 14 2017

Extensions

More terms from Emeric Deutsch, Dec 24 2006

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
Showing 1-3 of 3 results.