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

A231818 Least positive k such that k*n^n - 1 is a prime, or 0 if no such k exists.

Original entry on oeis.org

3, 1, 2, 5, 6, 3, 6, 39, 18, 6, 12, 19, 8, 23, 10, 3, 76, 13, 90, 26, 52, 45, 124, 12, 60, 27, 10, 99, 126, 11, 50, 27, 28, 59, 6, 80, 122, 71, 110, 21, 72, 111, 590, 147, 178, 84, 238, 12, 138, 236, 10, 53, 6, 60, 98, 72, 620, 30, 166, 5, 98, 18, 22, 384, 126
Offset: 1

Views

Author

Alex Ratushnyak, Nov 13 2013

Keywords

Crossrefs

Cf. A035092 (least k such that k*(n^2)+1 is a prime).
Cf. A175763 (least k such that k*(n^n)+1 is a prime).
Cf. A035093 (least k such that k*n!+1 is a prime).
Cf. A193807 (least k such that n*(k^2)+1 is a prime).
Cf. A231119 (least k such that n*(k^k)+1 is a prime).
Cf. A057217 (least k such that n*k!+1 is a prime).
Cf. A034693 (least k such that n*k +1 is a prime).
Cf. A231819 (least k such that k*(n^2)-1 is a prime).
Cf. A083663 (least k such that k*n!-1 is a prime).
Cf. A231734 (least k such that n*(k^2)-1 is a prime).
Cf. A231735 (least k such that n*(k^k)-1 is a prime).
Cf. A231820 (least k such that n*k!-1 is a prime).
Cf. A053989 (least k such that n*k -1 is a prime).

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[k*n^n - 1], k++]; k, {n, 65}] (* T. D. Noe, Nov 15 2013 *)

A238848 Smallest k such that k*n^3 - 1 is prime.

Original entry on oeis.org

3, 1, 2, 2, 4, 2, 14, 7, 6, 2, 4, 4, 14, 3, 4, 2, 16, 4, 12, 9, 2, 5, 16, 2, 2, 3, 16, 6, 10, 4, 2, 4, 22, 2, 6, 3, 6, 10, 6, 3, 22, 5, 2, 3, 4, 2, 18, 4, 26, 10, 4, 5, 6, 2, 2, 7, 6, 2, 10, 5, 2, 9, 4, 2, 16, 3, 6, 9, 2, 3, 30, 5, 14, 6, 24, 5, 16, 5
Offset: 1

Views

Author

Derek Orr, Mar 06 2014

Keywords

Examples

			a(1) = 3 because for k = 1, 1*(1^3) - 1 = 0 is not prime, for k = 2, 2*(1^3) - 1 = 1 is not prime, but for k = 3, 3*(1^3) - 1 = 2 is prime.
		

Crossrefs

Programs

  • Mathematica
    sk[n_]:=Module[{k=1,n3=n^3},While[!PrimeQ[k*n3-1],k++];k]; Array[sk,80] (* Harvey P. Dale, Jan 04 2023 *)
  • Python
    import sympy
    from sympy import isprime
    def f(n):
      for k in range(1,10**3):
        if isprime(k*(n**3)-1):
          return k
    n = 1
    while n < 10**3:
      print(f(n))
      n += 1

A307368 a(n) is the minimal positive integer such that 2*a(n)*prime(n)-1 equals another prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 2, 1, 3, 3, 1, 1, 2, 3, 3, 2, 3, 4, 3, 2, 7, 1, 2, 8, 1, 5, 3, 3, 3, 3, 3, 2, 2, 1, 5, 6, 1, 3, 5, 2, 5, 4, 11, 4, 2, 1, 1, 4, 2, 1, 8, 3, 7, 6, 6, 2, 3, 1, 6, 2, 3, 2, 1, 5, 3, 3, 1, 1, 3, 4, 5, 3, 1, 3, 1, 2, 3, 3, 11, 4, 8, 6, 2, 4, 1, 3, 3, 3, 6, 3, 2, 5, 6, 5, 1, 2, 9, 2, 3, 4, 1, 5, 2, 3, 4, 1, 2, 2, 3
Offset: 1

Views

Author

Ivan N. Ianakiev, Apr 17 2019

Keywords

Comments

A more general form of Rassias's conjecture states that for every positive integer a there are two primes p and q such that 2*a*p = q+1.
a(n)=1 for n in A137288. - Robert Israel, Apr 18 2019
By Dirichlet's theorem on primes in arithmetic progressions, a(n) exists. - Robert Israel, May 12 2019

References

  • Michael Th. Rassias, Problem-Solving and Selected Topics in Number Theory, Springer-Verlag, NY, 2011, pp. xi-xii.

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,p;
        p:= ithprime(n);
        for k from 1 do
          if isprime(2*k*p-1) then return k fi
        od
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 18 2019
  • Mathematica
    a[n_]:=Module[{a=1},While[!PrimeQ[2*a*Prime[n]-1],a++];a];
    a/@Range[110]
  • PARI
    a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(2*k*p-1), return(k))) \\ Felix Fröhlich, Apr 17 2019

Formula

a(n) = A053989(A000040(n))/2 for n <> 3. - Robert Israel, Apr 18 2019

A057160 Smallest value of k for which the expression k*2^(2^n-1)-1 is prime.

Original entry on oeis.org

3, 2, 1, 1, 4, 1, 6, 1, 90, 111, 244, 139, 880, 309, 22263, 56083, 130141, 49905
Offset: 0

Views

Author

Steven Harvey, Sep 14 2000

Keywords

Examples

			a(1)=2 because 2*2^(2^1-1)-1 = 2*2^1-1 = 3 which is prime. - _Sean A. Irvine_, May 25 2022
a(4)=4 because 4*2^(2^4-1)-1 = 4*2^15-1 = 4*32768-1 = 131071 which is prime.
		

Crossrefs

Cf. A053989, A058891, A077585 (2^(2^n-1)-1).

Programs

  • Mathematica
    svk[n_]:= Module[{k = 1, c = 2^(2^n-1)}, While[!PrimeQ[k*c-1],k++];k]; Join[{2}, svk /@ Range[17]] (* Harvey P. Dale, Feb 03 2021, adjusted for new offset by Michael De Vlieger, May 25 2022 *)
  • PARI
    a(n) = my(k=1); while (!isprime(k*2^(2^n-1)-1), k++); k; \\ Michel Marcus, May 27 2022
  • Python
    from sympy import isprime
    def a(n):
        k, c = 1, 2**(2**n-1)
        while not isprime(k*c - 1): k += 1
        return k
    print([a(n) for n in range(1, 12)]) # Michael S. Branicky, May 25 2022
    

Formula

a(n) = A053989(A058891(n+1)). - Pontus von Brömssen, May 27 2022

Extensions

Offset and a(1) corrected by Sean A. Irvine, May 25 2022
a(0) prepended by Michel Marcus, May 27 2022

A239020 Smallest number k such that k*n +/- 1 and k*n^2 +/- 1 are two sets of twin primes. a(n) = 0 if no such number exists.

Original entry on oeis.org

4, 3, 2, 15, 6, 2, 150, 75, 20, 6, 78, 85, 2490, 30, 18, 195, 5160, 490, 330, 12, 2, 870, 330, 13, 42, 105, 2280, 375, 12, 41, 1632, 720, 90, 3, 216, 2, 1380, 615, 98, 84, 438, 65, 600, 210, 148, 735, 3870, 115, 138, 39, 182, 2715, 16590, 48, 60, 63, 210, 120
Offset: 1

Views

Author

Derek Orr, Mar 09 2014

Keywords

Comments

If n>3 is odd and not a multiple of 3, then a(n) is a multiple of 6; e.g., a(5) = 6, a(7) = 150, a(11) = 78. If n>3 is even and not a multiple of 3, then a(n) is a multiple of 3. In short, for n>1, k*n should be a multiple of 6. - Zak Seidov, Mar 13 2014

Examples

			1*2 +/- 1 (1 and 3) and 1*2^2 +/- 1 (3 and 5) are not two sets of twin primes. 2*2 +/- 1 (3 and 5) and 2*2^2 +/- 1 (7 and 9) are not two sets of twin primes. However, 3*2 +/- 1 (5 and 7) and 3*2^2 +/- 1 (11 and 13) are two sets of twin primes. Thus, a(2) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = {k = 1; while (! (isprime(k*n+1) && isprime(k*n-1) && isprime(k*n^2+1) && isprime(k*n^2-1)), k++); k;} \\ Michel Marcus, Mar 15 2014
  • Python
    from sympy import isprime
    def b(n):
      for k in range(10**5):
        if isprime(k*n+1) and isprime(k*n-1) and isprime(k*(n**2)+1) and isprime(k*(n**2)-1):
          return k
    n = 1
    while n < 100:
      print(b(n))
      n += 1
    

A239021 Smallest number k such that k*n +/- 1, k*n^2 +/- 1, and k*n^3 +/- 1 are three sets of twin primes. a(n) = 0 if no such number exists.

Original entry on oeis.org

4, 105525, 10990, 15855, 344190, 2, 74580, 11580, 165592, 3759, 204918, 12670, 99090, 78, 3978, 11655, 8979180, 10605, 55188, 1221, 2, 23340, 4431420, 39158, 58464, 87318, 45420, 15780, 210, 91, 289422, 19740, 186410, 1293, 137664, 747, 443730, 94920, 278278
Offset: 1

Views

Author

Derek Orr, Mar 09 2014

Keywords

Examples

			1*6 +/- 1 (5 and 7), 1*6^2 +/- 1 (35 and 37), and 1*6^3 +/- 1 (215 and 217) are not three sets of twin primes. However, 2*6 +/- 1 (11 and 13), 2*6^2 +/- 1 (71 and 73), and 2*6^3 +/- 1 (431 and 433) are three sets of twin primes. Thus, a(6) = 2.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    def b(n):
      for k in range(10**8):
        if isprime(k*n+1) and isprime(k*n-1) and isprime(k*(n**2)+1) and isprime(k*(n**2)-1) and isprime(k*(n**3)+1) and isprime(k*(n**3)-1):
          return k
    n = 1
    while n < 100:
      print(b(n))
      n += 1
Previous Showing 11-16 of 16 results.