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-5 of 5 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

A032352 Numbers k such that there is no prime between 10*k and 10*k+9.

Original entry on oeis.org

20, 32, 51, 53, 62, 84, 89, 107, 113, 114, 126, 133, 134, 135, 141, 146, 150, 164, 167, 168, 171, 176, 179, 185, 189, 192, 196, 204, 207, 210, 218, 219, 232, 236, 240, 248, 249, 251, 256, 258, 282, 294, 298, 305, 309, 314, 315, 317, 323, 324, 326, 328, 342
Offset: 1

Views

Author

Keywords

Comments

Numbers k with property that appending any single decimal digit to k does not produce a prime.
A007920(n*10) > 10.

Examples

			m=32: 321=3*107, 323=17*19, 325=5*5*13, 327=3*109, 329=7*47, therefore 32 is a term.
		

Crossrefs

Cf. A124665 (subsequence), A010051, A007811, A216292, A216293.

Programs

  • Haskell
    a032352 n = a032352_list !! (n-1)
    a032352_list = filter
       (\x -> all (== 0) $ map (a010051 . (10*x +)) [1..9]) [1..]
    -- Reinhard Zumkeller, Oct 22 2011
    
  • Magma
    [n: n in [1..350] | IsZero(#PrimesInInterval(10*n, 10*n+9))]; // Bruno Berselli, Sep 04 2012
    
  • Maple
    a:=proc(n) if map(isprime,{seq(10*n+j,j=1..9)})={false} then n else fi end: seq(a(n),n=1..350); # Emeric Deutsch, Aug 01 2005
  • Mathematica
    f[n_] := PrimePi[10n + 10] - PrimePi[10n]; Select[ Range[342], f[ # ] == 0 &] (* Robert G. Wilson v, Sep 24 2004 *)
    Select[Range[342], NextPrime[10 # ] > 10 # + 9 &] (* Maciej Ireneusz Wilczynski, Jul 18 2010 *)
    Flatten@Position[10*#+{1,3,7,9}&/@Range@4000,{?CompositeQ ..}] (* _Hans Rudolf Widmer, Jul 06 2024 *)
  • PARI
    is(n)=!isprime(10*n+1) && !isprime(10*n+3) && !isprime(10*n+7) && !isprime(10*n+9) \\ Charles R Greathouse IV, Mar 29 2013
    
  • Python
    from sympy import isprime
    def aupto(limit):
      alst = []
      for d in range(2, limit+1):
        td = [10*d + j for j in [1, 3, 7, 9]]
        if not any(isprime(t) for t in td): alst.append(d)
      return alst
    print(aupto(342)) # Michael S. Branicky, May 30 2021

Formula

a(n) ~ n. - Charles R Greathouse IV, Mar 29 2013

Extensions

More terms from Miklos Kristof, Aug 27 2002

A008471 Exactly 3 out of 10m+1, 10m+3, 10m+7, 10m+9 are primes.

Original entry on oeis.org

4, 7, 13, 22, 31, 43, 46, 61, 64, 85, 88, 103, 106, 109, 130, 142, 145, 160, 166, 169, 178, 199, 238, 268, 271, 316, 367, 376, 391, 400, 409, 415, 421, 451, 472, 478, 493, 523, 541, 544, 547, 550, 574
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

A216293 Values of k such that there are exactly two primes between 10k and 10k + 9.

Original entry on oeis.org

2, 3, 5, 6, 8, 15, 16, 17, 23, 25, 26, 27, 28, 33, 34, 35, 37, 38, 40, 44, 49, 50, 52, 54, 56, 57, 59, 60, 65, 67, 70, 73, 75, 76, 91, 94, 97, 99, 101, 110, 112, 115, 118, 121, 122, 123, 127, 128, 129, 132, 136, 143, 149, 154, 155, 157, 161, 162, 172, 174
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Examples

			23 is in the sequence because between 230 and 239 there are exactly two primes: 233 and 239. [_Bruno Berselli_, Sep 04 2012]
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | #PrimesInInterval(10*n, 10*n+9) eq 2]; // Bruno Berselli, Sep 04 2012
  • Mathematica
    t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[Length[ps] == 2, AppendTo[t, n]], {n, 0, 229}]; t (* T. D. Noe, Sep 03 2012 *)
    Select[Range[200],Count[Range[10#,10#+9],?PrimeQ]==2&] (* _Harvey P. Dale, Jan 19 2017 *)

Formula

a(n) >> n log^2 n. - Charles R Greathouse IV, Sep 07 2012

A356690 Product of the prime numbers that are between 10*n and 10*(n+1).

Original entry on oeis.org

210, 46189, 667, 1147, 82861, 3127, 4087, 409457, 7387, 97, 121330189, 113, 127, 2494633, 149, 23707, 27221, 30967, 181, 1445140189, 1, 211, 11592209, 55687, 241, 64507, 70747, 75067, 79523, 293, 307, 30857731, 1, 111547, 121103, 126727, 367, 141367, 148987, 397, 164009, 419, 421
Offset: 0

Views

Author

Hemjyoti Nath, Aug 23 2022

Keywords

Comments

a(n) is prime iff n is in A216292. - Amiram Eldar, Aug 23 2022
For almost all n (in the sense of natural density), a(n) = 1. - Charles R Greathouse IV, Sep 30 2022

Examples

			210 = 2*3*5*7, 46189 = 11*13*17*19, 667 = 23*29, 1147 = 31*37, 82861 = 41*43*47.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ Select[Range[10 n + 1, 10 n + 9], PrimeQ]; Array[a, 43, 0]
  • PARI
    a(n) = vecprod(select(isprime, [10*n..10*(n+1)])); \\ Michel Marcus, Aug 24 2022
    
  • Python
    from math import prod
    from sympy import primerange
    def a(n): return prod(primerange(10*n, 10*(n+1)))
    print([a(n) for n in range(43)]) # Michael S. Branicky, Aug 23 2022
    
  • Python
    from math import prod
    from sympy import isprime
    def A356690(n): return prod(m for i in (1,3,7,9) if isprime(m:=10*n+i)) if n else 210 # Chai Wah Wu, Sep 23 2022

Formula

Let m(n) = {isprime(10n-9) * (10n-9), isprime(10n-8) * (10n-8), isprime(10n-7) * (10n-7), isprime(10n-5) * (10n-5), isprime(10n-3) * (10n-3), isprime(10n-1) * (10n-1)}, where isprime = A010051; then a(n) = product of nonzero terms from m(n).
a(n) = 1 for n in A032352. - Michel Marcus, Aug 23 2022
a(n) = Product_{i=1+pi(10*n)..pi(10*(n+1))} prime(i). - Alois P. Heinz, Aug 23 2022
Showing 1-5 of 5 results.