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-20 of 28 results. Next

A052334 Record primes reached in A052333.

Original entry on oeis.org

3, 5, 7, 19, 31, 43, 103, 223, 367, 463, 5503, 738197503
Offset: 1

Views

Author

Christian G. Bower, Dec 19 1999

Keywords

Comments

Start with n=1, take 2n+1, if composite take 2n+1 again, keep going until you reach a prime. Repeat for n=2, 3... If prime is a record, add to sequence. If never reach a prime, skip that value of n.
a(13) is a 771-digit prime reached after 2552 iterations starting from 73. - Warut Roonguthai. This was proved to be a prime by Paul Jobling (Paul.Jobling(AT)WhiteCross.com) using PrimeForm and by Ignacio Larrosa Cañestro using Titanix (http://www.znz.freesurf.fr/pages/titanix.html). [Oct 30 2000]

Crossrefs

Programs

  • Mathematica
    record = 2; Reap[For[n = 1, n <= 100, n++, k = n; While[ !PrimeQ[k = 2*k + 1]]; If[k > record, Print[k]; Sow[k]; record = k]]][[2, 1]] (* Jean-François Alcover, Jul 19 2013 *)

Formula

a(n) = A052333(A051914(n)). - Amiram Eldar, Jul 25 2019

A051914 Values of n at which record values in A052334 are reached.

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 12, 13, 22, 28, 42, 43, 73
Offset: 1

Views

Author

Keywords

Examples

			43 leads to composites 87, 175 etc. and eventually to the prime 738197503.
		

References

  • Posting to sci.math in Dec 1999, New Question?

Crossrefs

Extensions

Corrected and clarified by Christian G. Bower, Dec 19 1999
a(13)=73 confirmed by Warut Roonguthai

A052339 Values of n at which record values in A052340 are reached.

Original entry on oeis.org

1, 4, 12, 13, 42, 43, 73, 658
Offset: 1

Views

Author

Christian G. Bower, Dec 23 1999

Keywords

Comments

A subsequence of A050412.

Crossrefs

Extensions

659*2^n-1 is composite for n<2^17.
One more term supplied by David Broadhurst, Jan 02 2000

A078680 Smallest m > 0 such that n*2^m + 1 is prime, or 0 if no such m exists.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 3, 2, 1, 1, 4, 3, 1, 6, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 8, 3, 1, 2, 1, 1, 2, 5, 1, 4, 1, 3, 2, 1, 2, 8, 583, 1, 2, 1, 1, 6, 1, 1, 4, 1, 2, 2, 5, 2, 4, 7, 1, 2, 1, 5, 2, 1, 1, 2, 3, 3, 2, 1, 1, 4, 3, 1, 2, 3, 1, 10, 1, 2, 4, 1, 2, 2, 1, 1, 8, 7, 2, 582, 1, 1, 2, 1, 1, 2, 3, 2
Offset: 1

Views

Author

Benoit Cloitre, Dec 17 2002

Keywords

Comments

Sierpiński proved that a(n)=0 for an infinite number of n. The first proven zero is n=78557. There is a conjecture that the first zero is n=65536 (which is equivalent to the statement that 2^(2^k)+1 is composite for k>4). - T. D. Noe, Feb 25 2011 [Edited by Jeppe Stig Nielsen, Jul 01 2020]

Crossrefs

Cf. A050412, A040076, A078683 (primes n*2^m+1).

Programs

  • Maple
    A078680 := proc(n) for m from 1 do if isprime(n*2^m+1) then return m; end if; end do: end proc:
    seq(A078680(n),n=1..30) ; # R. J. Mathar, Feb 25 2011
  • Mathematica
    Table[m=1; While[! PrimeQ[n*2^m+1], m++]; m, {n, 100}] (* T. D. Noe, Feb 25 2011 *)
  • PARI
    a(n)=if(n<0, 0, m=1; while(isprime(n*2^m+1)==0, m++); m)

Formula

If a(n) = 0, then a(2n) is also 0. If a(n) = m with m > 1, then a(2n) = m-1. - Jeppe Stig Nielsen, Feb 12 2023

Extensions

Offset corrected by Jaroslav Krizek, Feb 13 2011

A375028 Primes in A374965 in order of their occurrence.

Original entry on oeis.org

3, 19, 103, 463, 751, 283, 331, 103423, 313, 2671, 1543, 1783, 3823, 68863, 20287, 733, 757, 407896063, 2083, 1093, 2251, 1153, 2371, 1213, 2467, 41023, 2707, 2803, 1453, 119909605576788675546376149602926591, 98238463, 25903, 3405823, 3590143, 3733, 14983, 7603, 7723, 15607, 65306623, 537343, 69151, 3859801644442622798122887215978426484283282692686288680974641672159756287
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane_, Jul 28 2024

Keywords

Comments

Sequences A050412 and A052333 suggest that it is possible that the present sequence has only finitely many terms. - N. J. A. Sloane, Jul 29 2024

Crossrefs

A373799 gives the indices where the primes appear in A374965.
A373804 gives the primes sorted into increasing or5der.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[!PrimeQ[a],2a+1,Prime[n+1]-1]}; Select[NestList[nxt, {1, 1}, 999][[;; , 2]], PrimeQ]
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A375028_gen(): # generator of terms
        a, p = 1, 3
        while True:
            if isprime(a):
                yield a
                a = p-1
            else:
                a = (a<<1)+1
            p = nextprime(p)
    A375028_list = list(islice(A375028_gen(),30)) # Chai Wah Wu, Jul 29 2024

A354747 Start with 2*n-1; repeatedly triple and add 2 until reaching a prime. a(n) = number of steps until reaching a prime > 2*n-1, or 0 if no prime is ever reached.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1, 2, 10, 1, 1, 2, 1, 2, 4, 1, 1, 1, 2, 1, 1, 4, 3, 2, 3, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 2, 1, 3, 3, 1, 1, 2, 3, 3, 5, 1, 1, 1, 2, 3, 9, 1, 1, 2, 1, 2, 4, 1, 2, 1, 6, 1, 1, 2, 1, 1, 5, 1, 3, 1, 2, 1, 1, 3, 1
Offset: 1

Views

Author

Felix Fröhlich, Jun 06 2022

Keywords

Comments

a(n) is the smallest m >= 1 such that 2*n*3^m - 1 is prime.
The smallest unknown case is n = 100943. Is a(100943) = 0?
If it exists, a(100943) > 30000. - Michael S. Branicky and Jon E. Schoenfield, Jun 07 2022

Examples

			For n = 21: Successively applying the map x -> 3*x+2 to 2*21-1 = 41 yields the sequence 41, 125, 377, 1133, 3401, 10205, 30617, 91853, 275561, 826685, 2480057, reaching the prime 2480057 after 10 steps, so a(21) = 10.
		

Crossrefs

Programs

  • PARI
    a(n) = my(x=2*n-1, i=0); while(1, x=3*x+2; i++; if(ispseudoprime(x), return(i)))
    
  • Python
    from sympy import isprime
    def f(x): return 3*x + 2
    def a(n):
        fn, c = f(2*n-1), 1
        while not isprime(fn): fn, c = f(fn), c+1
        return c
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Jun 06 2022

A250205 Riesel problem in base 6: Least k > 0 such that n*6^k-1 is prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 1, 1, 2, 0, 1, 1, 2, 1, 0, 2, 1, 1, 1, 0, 1, 1, 2, 2, 0, 4, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 4, 1, 3, 0, 1, 1, 6, 2, 0, 5, 1, 1, 1, 0, 6, 2, 1, 1, 0, 1, 2, 10, 1, 0, 1, 3, 1, 1, 0, 1, 1, 2, 1, 0, 1, 8, 1, 1, 0, 1, 2, 2, 4, 0, 49, 1, 1, 1, 0, 2, 1, 1, 1, 0, 2, 1, 6, 2, 0, 1, 1, 1, 1, 0, 5, 1, 1, 2, 0, 1, 10, 2, 1
Offset: 1

Views

Author

Eric Chen, Mar 13 2015

Keywords

Comments

a(5j+1) = 0 except for a(1), since (5j+1)*6^k-1 is always divisible by 5, but there are infinitely many numbers not in the form 5j+1 such that a(n) = 0.
a(n) = 0 for n == 84687 mod 10124569, because then n*6^k-1 is always divisible by at least one of 7, 13, 31, 37, 97. - Robert Israel, Mar 17 2015
Conjecture: if n is not in the form 5j+1 and n < 84687, then a(n) > 0.

Crossrefs

Cf. A250204 (Least k > 0 such that n*6^k+1 is prime).

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N), using k up to 10000
    a[1]:= 1:
    for n from 2 to N do
    if n mod 5 = 1 then a[n]:= 0
    else
        for k from 1 to 10000 do
        if isprime(n*6^k-1) then
           a[n]:= k;
             break
          fi
        od
    fi
    od:
    seq(a[n],n=1..N); # Robert Israel, Mar 17 2015
  • Mathematica
    (* m <= 10000 is sufficient up to n = 1000 *)
    a[n_] := For[k = 1, k <= 10000, k++, If[PrimeQ[n*6^k - 1], Return[k]]] /. Null -> 0; Table[a[n], {n, 1, 120}]
  • PARI
    a(n) = if(n%5==1 && n>1, 0, for(k = 1, 10000, if(ispseudoprime(n*6^k-1), return(k))))

Formula

a(A024898(n)) = 1. - Michel Marcus, Mar 16 2015

A318291 a(n) is the minimum k > 0 such that n*2^k - 3 is prime, or 0 if no such k exists.

Original entry on oeis.org

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

Views

Author

Martin Michael Musatov, Aug 23 2018

Keywords

Comments

Question: Other than multiples of 3, do there exist any numbers n > 3 such that a(n) = 0?
From Robert Israel, Aug 24 2018: (Start)
The answer is yes. The situation is similar to that of Riesel or Sierpinski numbers.
Every integer k is in at least one of the following residue classes:
2 (mod 3)
1 (mod 4)
4 (mod 5)
3 (mod 8)
4 (mod 9)
8 (mod 10)
6 (mod 12)
10 (mod 15)
7 (mod 16)
16 (mod 18)
12 (mod 20)
12 (mod 24)
16 (mod 25)
1 (mod 25)
0 (mod 30)
10 (mod 36)
27 (mod 36)
16 (mod 40)
1 (mod 45)
33 (mod 45)
15 (mod 48)
31 (mod 48)
where 3,4,5,...,48 are the multiplicative orders of 2 modulo the primes 7, 5, 31, 17, 73, 11, 13, 151, 257, 19, 41, 241, 1801, 601, 331, 109, 37, 61681, 23311, 631, 673, 97 respectively.
Now 7 | n*2^k-3 for k == 2 (mod 3) if n == 6 (mod 7),
5 | n*2^k-3 for k == 1 (mod 4) if n == 4 (mod 5), ...,
97 | n*2^k-3 for k == 31 (mod 48) if n == 75 (mod 97).
Using the Chinese remainder theorem, we get infinitely many n for which all these congruences hold, and thus for which n*2^k-3 is always divisible by at least one of those 22 primes.
One such n is 72726958979572419805016319140106929109473069209 (which is not divisible by 3). (End)
For the record high values in this sequence, see A316493; for the indices at which those values occur, see A318561. - Jon E. Schoenfield, Aug 26 2018
Conjecture: For every odd prime p, there exist infinitely many numbers j that are non-multiples of p and have the property that j*2^k - p is composite for every k > 0. - Martin Michael Musatov, Sep 04 2018

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      if n mod 3 = 0 then return 0 fi;
      for k from 1 do if isprime(n*2^k-3) then return k fi od
    end proc:
    f(3):= 1:
    map(f, [$1..100]); # Robert Israel, Sep 03 2018
  • Mathematica
    Array[If[And[Mod[#, 3] == 0, # > 3], 0, Block[{k = 1}, While[! PrimeQ[# 2^k - 3], k++]; k]] &, 105] (* Michael De Vlieger, Sep 04 2018 *)
  • PARI
    a(n)={my(k=0); if(n%3||n==3, k++; while(!isprime((n<Andrew Howroyd, Aug 24 2018

Extensions

a(3) corrected and a(19)-a(87) from Andrew Howroyd, Aug 25 2018
a(47), a(62), and a(86) corrected by Jon E. Schoenfield, Aug 29 2018

A373798 Divide A374965 into "blocks" by saying that each prime term ends a block; sequence gives lengths of successive blocks.

Original entry on oeis.org

2, 3, 4, 5, 5, 3, 3, 11, 2, 5, 4, 4, 5, 9, 7, 2, 2, 21, 3, 2, 3, 2, 3, 2, 3, 7, 3, 3, 2, 108, 17, 5, 12, 12, 2, 4, 3, 3, 4, 16, 9, 6, 231, 3, 2, 8, 3, 29, 3, 2, 5, 10, 5, 17, 2, 3, 212, 9, 3, 4, 5, 22, 3, 5, 13, 5, 9, 4, 12, 8, 2, 57, 2, 65, 5, 3, 93, 9, 46
Offset: 1

Views

Author

Harvey P. Dale and N. J. A. Sloane, Jul 28 2024

Keywords

Comments

The first 286 terms of the sequence are the result of dividing the first 10000 terms of A374965 into "blocks."
Comment from N. J. A. Sloane, Aug 09 2024 (Start):
Suppose p = A374965(t) is a prime in A374965, and is the s-th prime to appear there (that is, A375028(s) = p and A373799(s) = t). The next term in A374965 is by definition A374965(t+1) = prime(t+1) - 1 = r (say). Then the block starting with r has length a(s+1) = A050412(r) + 1. For example, p = 19 = A374965(5) is the second prime in A374695, so we have s = 2, t = 5, and r = prime(6) - 1 = 13 - 1 = 12. Then A050412(12) = 3, which tells us that a(3) = 3 + 1 = 4. The block is [12, 25, 51, 103].
For a larger example, the s = 285th prime in A374965 is p = 160077823 = A374965(7686), so t = 7686. The next block begins with r = prime(7687) - 1 = 78282. After 39 steps of double-and-add-1 (corresponding to A050412(78282) = 39) we reach the 286th prime in A374965, A374965(7726) = 43036534378594303. (End)

Examples

			A374965 begins
1, 3/ 4, 9, 19/ 12, 25, 51, 103/ 28, 57, 115, 231, 463/ 46, 93, 187, 375, 751/ 70, 141, 283/ 82, 165, ...,
where the primes are followed by slashes, to indicate the blocks. The lengths of the initial blocks are 2, 3, 4, 5, 5, 3, ...
		

Crossrefs

Programs

  • Mathematica
    nxt[{n_, a_}] := {n + 1, If[! PrimeQ[a], 2 a + 1, Prime[n + 1] - 1]}; vvv=NestList[nxt,{1,1},9999][[;;,2]]; Total/@Partition[Length/@SplitBy[vvv,PrimeQ],2] (* Harvey P. Dale, Jul 28 2024 *)

A050413 Numbers k such that 74*2^k-1 is prime.

Original entry on oeis.org

0, 2552, 4892, 7896, 14352, 32124, 51476
Offset: 1

Views

Author

David Broadhurst, Dec 22 1999

Keywords

Comments

Equals A050544 minus one; A050544 is the main entry for this sequence. - Jeppe Stig Nielsen, Oct 09 2019

References

  • Computed by Joe K. Crump (joecr(AT)carolina.rr.com) and (mostly) by David Broadhurst.

Crossrefs

Programs

Extensions

David Broadhurst, Dec 26 1999 reports that primality up to n=51476 is now proved, using Yves Gallot's proth.exe.
Previous Showing 11-20 of 28 results. Next