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

A354748 a(n) is the prime reached after A354747(n) steps when repeatedly applying the map x -> 3*x+2 to 2*n-1, or 0 if no prime is ever reached.

Original entry on oeis.org

5, 11, 17, 23, 29, 107, 41, 47, 53, 59, 197, 71, 233, 83, 89, 863, 101, 107, 113, 359, 2480057, 131, 137, 431, 149, 467, 4373, 167, 173, 179, 557, 191, 197, 5507, 1889, 647, 1997, 227, 233, 239, 2213, 251, 257, 263, 269, 827, 281, 863, 293, 2699, 2753, 311, 317
Offset: 1

Views

Author

Felix Fröhlich, Jun 06 2022

Keywords

Comments

Is a(100943) = 0?
If not 0, a(100943) >= 10^10000. - Michael S. Branicky, Jun 07 2022

Crossrefs

Programs

  • PARI
    a(n) = my(x=2*n-1); while(1, x=3*x+2; if(ispseudoprime(x), return(x)))
    
  • 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 fn
    print([a(n) for n in range(1, 54)]) # Michael S. Branicky, Jun 07 2022

A377364 a(n) = least k such that 2n*3^k-2 is prime, or 0 if no prime is reached.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 31 2024

Keywords

Examples

			a(20) = 5 because 40*3^5 + 1 is prime and 40*3^k + 1 is not prime for k=1..4.
		

Crossrefs

Programs

  • Mathematica
    {b, h} = {3, 2}; f[n_, k_] := n*b^k - h
    s[n_] := Select[Range[20], PrimeQ[f[n, #]] &, 1]
    Flatten[Table[s[n], {n, 1, 200}]]

A377365 a(n) = least k such that 2n*5^k+1 is prime, or 0 if no prime is reached.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 2, 3, 1, 4, 2, 1, 2, 1, 3, 8, 1, 1, 1036, 1, 3, 2, 1, 1, 2, 1, 1, 2, 4, 1, 2, 1, 3, 6, 2, 257, 2, 2, 1, 40, 1, 1, 4, 2, 1, 2, 10, 1, 4, 2, 1, 6, 1, 3, 2, 1, 15, 4, 1, 79, 48, 1, 1, 2, 1, 5, 6, 1, 1, 6, 4, 3, 2, 1, 1, 2, 3, 3, 2, 1, 1, 6
Offset: 1

Views

Author

Clark Kimberling, Oct 31 2024

Keywords

Examples

			a(20) = 1036 because 40*5^k+1 is prime for k=1036 and not prime for k=1..1035.
		

Crossrefs

Programs

  • Mathematica
    f[n_, k_] := 2 n*5^k + 1;
    s[n_] := Select[Range[5000], PrimeQ[f[n, #]] &, 1];
    Flatten[Table[s[n], {n, 1, 500}]]

A355142 a(n) = 33648*3^n - 1.

Original entry on oeis.org

33647, 100943, 302831, 908495, 2725487, 8176463, 24529391, 73588175, 220764527, 662293583, 1986880751, 5960642255, 17881926767, 53645780303, 160937340911, 482812022735, 1448436068207, 4345308204623, 13035924613871, 39107773841615, 117323321524847, 351969964574543
Offset: 0

Views

Author

Felix Fröhlich, Jun 20 2022

Keywords

Comments

For n > 0, this is the trajectory of 100943 under the map x -> 3*x+2.
100943 is the least starting value > 0 where the trajectory under the map in the previous comment does not reach a prime after a small number of steps.
Are there any primes > 100943 in the sequence (cf. A354747 and A354748)?

Crossrefs

Programs

  • Mathematica
    33648*3^Range[0,30]-1 (* or *) LinearRecurrence[{4,-3},{33647,100943},30] (* Harvey P. Dale, Mar 03 2023 *)
  • PARI
    a(n) = 33648*3^n-1
    
  • Python
    a = [33647]; [a.append(3*a[-1]+2) for n in range(21)]
    print(a) # Michael S. Branicky, Jun 20 2022

Formula

G.f.: (33647 - 33645*x)/((1 - x)*(1 - 3*x)). - Stefano Spezia, Jun 21 2022
Showing 1-4 of 4 results.