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

A220144 The values of k in A220143.

Original entry on oeis.org

4, 6, 9, 18, 24, 42, 54, 120, 258, 396, 420, 594, 744, 840, 1074, 1800, 2130, 2172, 2256, 2304, 2550, 2778, 3282, 3792, 3894, 4170, 4488, 4578, 4626, 4848, 5562, 5754, 6192, 6252, 7260, 7428, 7920, 9654
Offset: 1

Views

Author

T. D. Noe, Jan 08 2013

Keywords

Crossrefs

Programs

  • Mathematica
    t = {{1, 4}}; Do[k = 1; While[! (PrimeQ[k*n - 1] && PrimeQ[k*n + 1]), k++]; If[k > t[[-1, 2]], AppendTo[t, {n, k}]], {n, 2, 100000}]; Transpose[t][[2]]

Extensions

More terms from Amiram Eldar, Dec 30 2019

A226949 Number of twin prime pairs of the form k*n +/- 1 with k <= n.

Original entry on oeis.org

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

Views

Author

Irina Gerasimova, Jun 23 2013

Keywords

Examples

			a(4) = 2 because there are two twin prime pairs of the form (4k - 1,4k + 1) with 1 <= k <= 4, namely (3, 5) for k = 1 and (11, 13) for k = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Boole[PrimeQ[k*n - 1] && PrimeQ[k*n + 1]], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Dec 25 2019 *)
  • PARI
    a(n)=sum(k=1,n,isprime(k*n-1)&&isprime(k*n+1)) \\ Charles R Greathouse IV, Jun 27 2013

Extensions

a(7), a(20), a(36) corrected by Charles R Greathouse IV, Jun 27 2013
a(54)-a(90) from Charles R Greathouse IV, Jun 27 2013

A257771 Numbers n such that n*k - 1 and n*k + 1 are not both prime for any k < n.

Original entry on oeis.org

1, 2, 5, 8, 11, 13, 31, 37, 53, 61, 73, 79, 97, 122, 127
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 07 2015

Keywords

Comments

Numbers n such that A071558(n) > n.

Crossrefs

Programs

  • PARI
    is(n)=for(k=1,n-1,if(isprime(n*k-1)&&isprime(n*k+1), return(0))); 1 \\ Charles R Greathouse IV, May 08 2015
    
  • PARI
    is(n)=my(s=6/gcd(n,6)); forstep(k=s,n-1,s, if(isprime(n*k-1)&&isprime(n*k+1), return(0))); 1 \\ Charles R Greathouse IV, May 08 2015

A227230 Numbers k such that 3*2^k + {5,7} are twin primes.

Original entry on oeis.org

1, 2, 3, 5, 6, 19, 22
Offset: 1

Views

Author

Zak Seidov, Sep 20 2013

Keywords

Comments

No more terms up to 10^4.
Any subsequent terms exceed 200,000. - Lucas A. Brown, Sep 02 2024
Any subsequent terms exceed 10^6, by non-primality of 3*2^k+7 for members of b-file at A057913 > 22 and table in Section 6 of Grantham and Granville link. - Michael S. Branicky, Sep 07 2024

Crossrefs

Intersection of A057913 and A059746. - Jason Yuen, Sep 02 2024

Programs

  • Mathematica
    Reap[Do[If[PrimeQ[a=3*2^n+5]&&PrimeQ[a+2],Sow[n]],{n,150}]][[2,1]]
  • PARI
    for(k = 1,10^4, if(ispseudoprime(a = 3*2^k + 5)&&ispseudoprime (a + 2), print1(k",")))

A238849 Smallest k such that k*n^3 - 1 and k*n^3 + 1 are twin primes.

Original entry on oeis.org

4, 9, 4, 3, 24, 2, 24, 30, 58, 3, 12, 19, 96, 3, 10, 165, 114, 11, 390, 159, 2, 30, 114, 10, 18, 12, 24, 6, 42, 19, 72, 24, 30, 72, 24, 3, 150, 189, 40, 54, 348, 5, 24, 93, 14, 33, 324, 9, 150, 81, 70, 39, 354, 3, 138, 42, 56, 51, 180, 16, 18, 9
Offset: 1

Views

Author

Derek Orr, Mar 06 2014

Keywords

Examples

			a(1) = 4 because for k = 1, 1*(1^3) - 1 = 0 and 1*(1^3) + 1 = 2 are not twin primes, for k = 2, 1 and 3 are not twin primes, for k = 3, 2 and 4 are not twin primes, so the smallest k that works is k = 4: 4*(1^3) - 1 = 3 and 4*(1^3) + 1 = 5 are twin primes.
		

Crossrefs

Programs

  • Python
    import sympy
    from sympy import isprime
    def f(n):
      for k in range(1,10**4):
        if isprime(k*(n**3)-1) and isprime(k*(n**3)+1):
          return k
    n = 1
    while n < 10**3:
      print(f(n))
      n += 1
Previous Showing 11-15 of 15 results.