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.

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

This page as a plain text file.
%I A377623 #7 Dec 05 2024 09:26:14
%S A377623 15,5,5,3,3,13,7,1,5,1,1,3,1,1,7,1,1,7,1,1,3,1,7,1,1,9,5,3,1,1,1,5,3,
%T A377623 1,1,5,1,1,1,3,1,5,1,1,1,1,1,1,1,1,3,1,3,1,3,3,1,5,3,1,3,5,1,5,7,1,9,
%U A377623 1,3,1,1,1,5,5,1,1,1,3,1,1,1,1,1,1,1,9
%N A377623 a(n) is the number of iterations of x -> 6*x + 1 until (# composites reached) = (# primes reached), starting with prime(n).
%C A377623 For a guide to related sequences, see A377609.
%e A377623 Starting with prime(1) = 2, we have 6*2+1 = 13, then 6*13+1 = 79, etc., resulting in a chain 2, 13, 79, 475, 2851, 17107, 102643, 615859, 3695155, 22170931, 133025587, 798153523, 4788921139, 28733526835, 172401161011, 1034406966067 having 8 primes and 8 composites. Since every initial subchain has fewer composites than primes, a(1) = 16-1 = 15. (For more terms from the mapping x -> 6x-5, see A198849.)
%t A377623 chain[{start_, u_, v_}] := If[CoprimeQ[u, v] && start*u + v != start,
%t A377623    NestWhile[Append[#, u*Last[#] + v] &, {start}, !
%t A377623       Count[#, _?PrimeQ] == Count[#, _?(! PrimeQ[#] &)] &], {}];
%t A377623 chain[{Prime[1], 6, -5}]
%t A377623 Map[Length[chain[{Prime[#], 6, -5}]] &, Range[1, 100]] - 1
%t A377623 (* _Peter J. C. Moses_, Oct 31 2024 *)
%Y A377623 Cf. A377609, A198849.
%K A377623 nonn
%O A377623 1,1
%A A377623 _Clark Kimberling_, Nov 20 2024