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.

A373798 Divide A374965 into "blocks" by saying that each prime term ends a block; sequence gives lengths of successive blocks.

This page as a plain text file.
%I A373798 #51 Jul 09 2025 05:04:38
%S A373798 2,3,4,5,5,3,3,11,2,5,4,4,5,9,7,2,2,21,3,2,3,2,3,2,3,7,3,3,2,108,17,5,
%T A373798 12,12,2,4,3,3,4,16,9,6,231,3,2,8,3,29,3,2,5,10,5,17,2,3,212,9,3,4,5,
%U A373798 22,3,5,13,5,9,4,12,8,2,57,2,65,5,3,93,9,46
%N A373798 Divide A374965 into "blocks" by saying that each prime term ends a block; sequence gives lengths of successive blocks.
%C A373798 The first 286 terms of the sequence are the result of dividing the first 10000 terms of A374965 into "blocks."
%C A373798 Comment from _N. J. A. Sloane_, Aug 09 2024 (Start):
%C A373798 Suppose p = A374965(t) is a prime in A374965, and is the s-th prime to appear there (that is, A375028(s) = p and A373799(s) = t). The next term in A374965 is by definition A374965(t+1) = prime(t+1) - 1 = r (say). Then the block starting with r has length a(s+1) = A050412(r) + 1. For example, p = 19 = A374965(5) is the second prime in A374695, so we have s = 2, t = 5, and r = prime(6) - 1 = 13 - 1 = 12. Then A050412(12) = 3, which tells us that a(3) = 3 + 1 = 4. The block is [12, 25, 51, 103].
%C A373798 For a larger example, the s = 285th prime in A374965 is p = 160077823 = A374965(7686), so t = 7686. The next block begins with r = prime(7687) - 1 = 78282. After 39 steps of double-and-add-1 (corresponding to A050412(78282) = 39) we reach the 286th prime in A374965, A374965(7726) = 43036534378594303. (End)
%H A373798 N. J. A. Sloane, <a href="/A373798/b373798.txt">Table of n, a(n) for n = 1..289</a> [Terms 1 to 286 from Harvey P. Dale] Obtained using Harvey P. Dale's MMA program.
%e A373798 A374965 begins
%e A373798 1, 3/ 4, 9, 19/ 12, 25, 51, 103/ 28, 57, 115, 231, 463/ 46, 93, 187, 375, 751/ 70, 141, 283/ 82, 165, ...,
%e A373798 where the primes are followed by slashes, to indicate the blocks. The lengths of the initial blocks are 2, 3, 4, 5, 5, 3, ...
%t A373798 nxt[{n_, a_}] := {n + 1, If[! PrimeQ[a], 2 a + 1, Prime[n + 1] - 1]}; vvv=NestList[nxt,{1,1},9999][[;;,2]]; Total/@Partition[Length/@SplitBy[vvv,PrimeQ],2] (* _Harvey P. Dale_, Jul 28 2024 *)
%Y A373798 Cf. A374965, A375028.
%K A373798 nonn
%O A373798 1,1
%A A373798 _Harvey P. Dale_ and _N. J. A. Sloane_, Jul 28 2024