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.

A256823 Numbers n such that A257378(n)=A257379(n), so the prime numbers k*n*2^n-1 and k*n*2^n+1 are twin primes for the smallest k such that k*n*2^n-1 is a prime number.

Original entry on oeis.org

4, 7, 9, 11, 27, 40, 63, 80, 120, 173, 227, 358, 445, 525, 767, 1164, 2180, 5368, 7898
Offset: 1

Views

Author

Pierre CAMI, Apr 24 2015

Keywords

Comments

The k values are in A257378 and A257379.

Crossrefs

Programs

  • PARI
    a8(n) = my(k=1); while(!isprime(k*n*2^n+1), k+=2); k;
    a9(n) = my(k=1); while(!isprime(k*n*2^n-1), k+=2); k;
    isok(n) = a8(n) == a9(n); \\ Michel Marcus, Sep 15 2019

A257379 Smallest odd number k such that k*n*2^n - 1 is a prime number.

Original entry on oeis.org

3, 1, 1, 3, 3, 1, 3, 3, 5, 5, 9, 5, 7, 7, 3, 17, 11, 11, 7, 9, 11, 15, 3, 7, 9, 67, 3, 45, 3, 1, 33, 21, 15, 23, 17, 3, 7, 9, 19, 15, 17, 63, 51, 3, 9, 33, 53, 61, 13, 45, 75, 39, 83, 43, 7, 19, 13, 41, 5, 19, 31, 165, 13, 27, 3, 13, 135, 33, 31, 15, 33, 87
Offset: 1

Views

Author

Pierre CAMI, Apr 21 2015

Keywords

Comments

Conjecture: a(n) exists for every n.
The conjecture follows from Dirichlet's theorem on primes in arithmetic progressions. - Robert Israel, Jan 05 2016
As N increases, (Sum_{n=1..N} k) / (Sum_{n=1..N} n) approaches 0.833.
If k=1 then n*2^n-1 is a Woodall prime (see A002234).
Generalized Woodall primes have the form n*b^n-1, I propose to name the primes k*n*2^n-1 generalized Woodall primes of the second type.

Examples

			1*1*2^1 - 1 = unity, 3*1*2^1 - 1 = 5, which is prime, so a(1) = 3.
1*2*2^2 - 1 = 7, which is prime, so a(2) = 1.
1*3*2^3 - 1 = 23, which is prime, so a(3) = 1.
		

Crossrefs

Programs

  • Maple
    Q:= proc(m) local k;
      for k from 1 by 2 do if isprime(k*m-1) then return k fi od
    end proc:
    seq(Q(n*2^n),n=1..100); # Robert Israel, Jan 05 2016
  • Mathematica
    Table[k = 1; While[!PrimeQ[k*n*2^n - 1], k += 2]; k, {n, 72}] (* Michael De Vlieger, Apr 21 2015 *)
  • PARI
    a(n) = k=1; while(!isprime(k*n*2^n-1), k+=2); k \\ Colin Barker, Apr 21 2015

A266909 Table read by rows: for each k < n and coprime to n, the least x>=0 such that x*n+k is prime.

Original entry on oeis.org

1, 2, 0, 1, 0, 2, 0, 0, 3, 1, 0, 4, 0, 0, 1, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 3, 0, 1, 0, 1, 2, 3, 1, 0, 0, 0, 4, 0, 0, 1, 0, 1, 0, 3, 4, 1, 0, 7, 2, 0, 0, 1, 0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 1, 6, 0, 0, 5, 0, 1, 0, 3, 2, 3, 0, 1, 0, 1, 4, 3, 1, 0, 0, 0, 0, 0, 10, 0
Offset: 1

Views

Author

Robert Israel, Jan 05 2016

Keywords

Comments

By Dirichlet's theorem, such x exists whenever k is coprime to n.
By Linnik's theorem, there exist constants b and c such that T(n,k) <= b n^c for all n and all k < n coprime to n.
T(n,1) = A034693(n).
T(n,n-1) = A053989(n)-1.
T(prime(n),1) = A035096(n).
T(2^n,1) = A035050(n).
A085427(n) = T(2^n,2^n-1) + 1.
A126717(n) = 2*T(2^(n+1),2^n-1) + 1.
A257378(n) = 2*T(n*2^(n+1),n*2^n+1) + 1.
A257379(n) = 2*T(n*2^(n+1),n*2^n-1) + 1.

Examples

			The first few rows are
n=2: 1
n=3: 2, 0
n=4: 1, 0
n=5: 2, 0, 0, 3
n=6: 1, 0
		

Crossrefs

Programs

  • Maple
    T:= proc(n,k) local x;
        if igcd(n,k) <> 1 then return NULL fi;
        for x from 0 do if isprime(x*n+k) then return x fi
        od
    end proc:
    seq(seq(T(n,k),k=1..n-1),n=2..30);
  • Mathematica
    Table[Map[Catch@ Do[x = 0; While[! PrimeQ[x n + #], x++]; Throw@ x, {10^3}] &, Range@ n /. k_ /; GCD[k, n] > 1 -> Nothing], {n, 2, 19}] // Flatten (* Michael De Vlieger, Jan 06 2016 *)
Showing 1-3 of 3 results.