OFFSET
1,1
COMMENTS
The first 286 terms of the sequence are the result of dividing the first 10000 terms of A374965 into "blocks."
Comment from N. J. A. Sloane, Aug 09 2024 (Start):
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].
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)
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..289 [Terms 1 to 286 from Harvey P. Dale] Obtained using Harvey P. Dale's MMA program.
EXAMPLE
A374965 begins
1, 3/ 4, 9, 19/ 12, 25, 51, 103/ 28, 57, 115, 231, 463/ 46, 93, 187, 375, 751/ 70, 141, 283/ 82, 165, ...,
where the primes are followed by slashes, to indicate the blocks. The lengths of the initial blocks are 2, 3, 4, 5, 5, 3, ...
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Harvey P. Dale and N. J. A. Sloane, Jul 28 2024.
STATUS
approved