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 21-22 of 22 results.

A375155 a(n) = 2*a(n-1) + 1 for a(n-1) not prime, otherwise a(n) = prime(n) - 1; with a(1) = 147.

Original entry on oeis.org

147, 295, 591, 1183, 2367, 4735, 9471, 18943, 37887, 75775, 151551, 303103, 606207, 1212415, 2424831, 4849663, 9699327, 19398655, 38797311, 77594623, 155189247, 310378495, 620756991, 1241513983, 2483027967, 4966055935, 9932111871, 19864223743, 39728447487, 79456894975
Offset: 1

Views

Author

Chai Wah Wu, Aug 01 2024

Keywords

Comments

Variant of A374965 with initial condition a(1) = 147. If a(1) is prime, the trajectory is: a(1), 2, 4, 9, ... and matches A374965 after the second term. It appears that for most composite a(1), the trajectories also converge towards A374965. This could be due to A050412(n) being small for many composite n.
a(1) = 147 is the first composite number where the trajectory appears not to converge towards A374965.
Other values of a(1) for which the trajectory converges to this sequence are: 295, 591, 1183, 2278, 2367, 3328, 4557, 4602, 4735, 5950, 6072, 6657, 7227, 9115, 9205, 9471, 9612, 9912, 9955, ...

Crossrefs

Programs

  • Mathematica
    Module[{n = 1}, NestList[If[n++; PrimeQ[#], Prime[n] - 1, 2*# + 1] &, 147, 50]] (* Paolo Xausa, Aug 02 2024 *)
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def A375155_gen(): # generator of terms
        a, p = 147, 3
        while True:
            yield a
            a, p = p-1 if isprime(a) else (a<<1)|1, nextprime(p)
    A375155_list = list(islice(A375155_gen(),40))

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
Previous Showing 21-22 of 22 results.