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.

A295640 Smallest k not divisible by 5 such that k*5^n + 1 is prime.

Original entry on oeis.org

2, 4, 2, 18, 12, 4, 12, 24, 26, 18, 42, 28, 2, 16, 18, 34, 92, 4, 12, 46, 26, 16, 6, 36, 26, 16, 6, 16, 152, 18, 42, 136, 6, 162, 132, 58, 24, 142, 48, 22, 56, 16, 36, 84, 2, 12, 24, 108, 168, 4, 12, 214, 36, 114, 12, 444, 26, 54, 416, 42
Offset: 1

Views

Author

Pierre CAMI, Nov 25 2017

Keywords

Comments

The ratio (Sum_(n=1..t) a(n)) / (Sum_(n=1..t) n) tends to log(5) as t increases.

Crossrefs

Programs

  • Mathematica
    Array[Block[{k = 2}, While[Or[Divisible[k, 5], ! PrimeQ[k 5^# + 1]], k++]; k] &, 60] (* Michael De Vlieger, Dec 18 2017 *)
  • PARI
    a(n) = {k = 1; while (!isprime(k*5^n+1), k++; if (!(k%5), k++)); k;} \\ Michel Marcus, Nov 25 2017

A295641 Smallest k not divisible by 7 such that k*7^n + 1 is prime.

Original entry on oeis.org

4, 4, 4, 6, 10, 4, 4, 36, 6, 4, 4, 82, 36, 10, 24, 90, 4, 48, 12, 16, 118, 10, 72, 16, 94, 18, 24, 150, 76, 58, 34, 40, 156, 34, 52, 166, 16, 4, 36, 90, 120, 78, 34, 36, 10, 244, 60, 102, 18, 114, 172, 48, 94, 10, 66, 396, 234, 240, 166
Offset: 1

Views

Author

Pierre CAMI, Nov 25 2017

Keywords

Comments

The ratio (Sum_(n=1..t) a(n)) / (Sum_(n=1..t) n) tends to log(7) as t increases.

Crossrefs

Programs

  • Mathematica
    Array[Block[{k = 2}, While[Or[Divisible[k, 7], ! PrimeQ[k 7^# + 1]], k++]; k] &, 59] (* Michael De Vlieger, Dec 18 2017 *)
  • PARI
    a(n) = {k = 1; while (!isprime(k*7^n+1), k++; if (! (k%7), k++)); k;} \\ Michel Marcus, Nov 25 2017

A264098 Smallest odd number k divisible by 3 such that k*2^n + 1 is prime.

Original entry on oeis.org

3, 3, 9, 15, 3, 3, 9, 3, 15, 15, 9, 3, 33, 9, 81, 21, 9, 3, 27, 27, 33, 27, 45, 45, 33, 27, 15, 33, 45, 3, 39, 81, 9, 75, 81, 3, 15, 15, 81, 27, 3, 9, 9, 15, 189, 27, 27, 15, 105, 27, 75, 93, 51, 177, 57, 27, 75, 99, 27, 45, 105, 105, 9, 27, 9, 3, 9, 237
Offset: 1

Views

Author

Pierre CAMI, Nov 03 2015

Keywords

Comments

As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to approach 2*log(2), as can be seen by plotting the first 31000 terms.
This observation is consistent with the prime number theorem as the probability that k*2^n+1 is prime is 1/(n*log(2)+log(k))/2 for k multiple of 3 so ~ 1/(2*n*log(2)) as n increases, if k ~ 2*n*log(2) then k/(2*n*log(2)) ~ 1.

Examples

			3*2^1 + 1 = 7 is prime so a(1) = 3.
3*2^2 + 1 = 13 is prime so a(2) = 3.
3*2^3 + 1 = 25 is composite; 9*2^3 + 1 = 73 is prime so a(3) = 9.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do
      for k from 3 by 6 do
        if isprime(k*2^n+1) then
          A[n]:= k; break
       fi
     od
    od:
    seq(A[n],n=1..100); # Robert Israel, Jan 22 2016
  • Mathematica
    Table[k = 3; While[! PrimeQ[k 2^n + 1], k += 6]; k, {n, 68}] (* Michael De Vlieger, Nov 03 2015 *)
  • PARI
    a(n) = {k = 3; while (!isprime(k*2^n+1), k += 6); k;} \\ Michel Marcus, Nov 03 2015

A280004 Numbers k such that 9*2^k + 1 is a prime factor of a Fermat number 2^(2^m) + 1 for some m.

Original entry on oeis.org

67, 9431, 461081, 2543551
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 21 2017

Keywords

Comments

Fernando (Remark 5.2) shows that all terms are odd. - Jeppe Stig Nielsen, Jan 02 2025

Crossrefs

A334296 Smallest k such that (2k+1)*2^n+1 is prime.

Original entry on oeis.org

0, 0, 0, 2, 0, 1, 1, 2, 0, 7, 6, 4, 1, 2, 3, 2, 0, 4, 1, 5, 3, 5, 12, 22, 22, 2, 3, 7, 6, 11, 1, 17, 21, 4, 37, 29, 1, 7, 7, 2, 13, 1, 4, 4, 7, 17, 9, 13, 7, 11, 3, 8, 3, 25, 24, 2, 13, 14, 49, 13, 15, 26, 52, 4, 12, 4, 1, 4, 15, 11, 19, 19, 63, 11, 33, 2, 46
Offset: 0

Views

Author

Mike Speciner, Apr 21 2020

Keywords

Comments

A057775 is the corresponding sequence of primes.

Examples

			a(0)=a(1)=a(2)=0 because 2^0+1=2, 2^1+1=3, 2^2+1=5 are prime.
a(3)=2 because 2^8+1=9 and 3*2^8+1=25 are not prime, but 5*2^8+1=41 is.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, v, k;
       t:= 2^n; v:= -t+1;
       for k from 0 do
          v:= v+2*t;
          if isprime(v) then return k fi
       od
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 14 2020
  • Mathematica
    a[n_] := Block[{k = 0}, While[! PrimeQ[(2 k + 1) 2^n + 1], k++]; k]; Array[a, 77, 0] (* Giovanni Resta, May 08 2020 *)
  • PARI
    a(n) = my(k=0); while (!isprime((2*k+1)*2^n+1), k++); k; \\ Michel Marcus, Apr 30 2020
  • Python
    from itertools import count
    from sympy import isprime
    def pow2p1() : # generates the sequence
      for n in count() :
        for k in count() :
          if isprime(((2*k+1)<
    				

Formula

a(n) = (A057778(n)-1)/2.
a(n) = ((A057775(n)-1)/2^n-1)/2.
Previous Showing 11-15 of 15 results.