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.

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

This page as a plain text file.
%I A377614 #4 Nov 17 2024 07:32:27
%S A377614 1,11,1,15,1,17,1,3,1,1,15,17,1,1,1,1,1,13,13,1,19,7,1,1,13,1,15,1,7,
%T A377614 1,1,1,1,9,1,17,1,3,1,1,1,9,1,1,1,1,1,1,1,9,1,1,3,1,1,1,1,5,1,1,3,1,3,
%U A377614 1,5,1,1,1,1,1,1,1,7,7,1,1,1,1,1,7,1,1,1
%N A377614 a(n) is the number of iterations of x -> 2*x + 5 until (# composites reached) = (# primes reached), starting with prime(n).
%C A377614 For a guide to related sequences, see A377609.
%e A377614 Starting with prime(1) = 2, we have 2*2+5 = 9; the chain (2,9) has 1 prime and 1 composite. So a(1) =   2-1 = 1.
%t A377614 chain[{start_, u_, v_}] := NestWhile[Append[#, u*Last[#] + v] &, {start}, !
%t A377614      Count[#, _?PrimeQ] == Count[#, _?(! PrimeQ[#] &)] &];
%t A377614 chain[{Prime[1], 2, 5}]
%t A377614 Map[Length[chain[{Prime[#], 2, 5}]] &, Range[100]] - 1
%t A377614 (* _Peter J. C. Moses_ Oct 31 2024 *)
%Y A377614 Cf. A377609.
%K A377614 nonn
%O A377614 1,2
%A A377614 _Clark Kimberling_, Nov 13 2024