login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
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
LINKS
EXAMPLE
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.
PROG
(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
CROSSREFS
Sequence in context: A359305 A138330 A128591 * A254444 A102005 A051700
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jun 06 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 8 10:29 EDT 2024. Contains 374153 sequences. (Running on oeis4.)