A373798 Divide A374965 into "blocks" by saying that each prime term ends a block; sequence gives lengths of successive blocks.
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, 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, 22, 3, 5, 13, 5, 9, 4, 12, 8, 2, 57, 2, 65, 5, 3, 93, 9, 46
Offset: 1
Keywords
Examples
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, ...
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.
Programs
-
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 *)
Comments