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

A377618 a(n) is the number of iterations of x -> 4*x - 1 until (# composites reached) = (# primes reached), starting with prime(n).

Original entry on oeis.org

5, 17, 3, 1, 15, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 5, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 3, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Nov 17 2024

Keywords

Comments

For a guide to related sequences, see A377609.

Examples

			Starting with prime(1) = 2, we have 4*2-1 = 7, then 4*7-1 = 27, etc.,
resulting in a chain 2, 7, 27, 107, 427, 1707 having 3 primes and 3 composites. Since every initial subchain has fewer composites than primes, a(1) = 6-1 = 5. (For more terms from the mapping x -> 4x-1, see A136412.)
		

Crossrefs

Programs

  • Mathematica
    chain[{start_, u_, v_}] := If[CoprimeQ[u, v] && start*u + v != start,
       NestWhile[Append[#, u*Last[#] + v] &, {start}, !
          Count[#, ?PrimeQ] == Count[#, ?(! PrimeQ[#] &)] &], {}];
    chain[{Prime[1], 4, -1}]
    Map[Length[chain[{Prime[#], 4, -1}]] &, Range[1, 100]] - 1
    (* Peter J. C. Moses, Oct 31 2024 *)

A352046 Primes of the form (5*4^k + 1)/3.

Original entry on oeis.org

2, 7, 107, 6827, 27962027, 1789569707, 114532461227, 7870610804782742022827, 37167908664217705235892863787747269176634027, 9743344248872686121357898884775220131039550286507, 623574031927851911766905528625614088386531218336427, 46011642311937091916231705748513503016340726481135910367750161491995307
Offset: 1

Views

Author

Patrick N. Valdivia, Mar 01 2022

Keywords

Comments

Primes in A136412.

Examples

			107 is a term because it is a prime and (5*4^3 + 1)/3 = 107.
		

Crossrefs

Programs

  • Maple
    select(isprime, [(5*4^k+1)/3$k=0..120])[];  # Alois P. Heinz, Mar 01 2022
  • Mathematica
    Select[(5*4^Range[0,200]+1)/3,PrimeQ] (* Harvey P. Dale, Sep 04 2024 *)

Formula

{ A000040 } intersect { A136412 }.
Previous Showing 11-12 of 12 results.