%I #10 Aug 29 2021 01:56:33
%S 0,1,2,4,6,8,9,10,12,15,16,18,20,21,25,27,24,28,33,35,30,39,44,45,49,
%T 51,55,63,57,65,69,75,77,81,85,60,76,87,91,95,99,105,111,115,117,119,
%U 121,123,125,135,143,145,147,153,155,161,169,159,165,171,175,177
%N Indices of rows of n consecutive smallest primes in A333238, or -1 if n consecutive smallest primes do not appear in A333238.
%C Consider the irregular table where row m lists the distinct smallest primes p of prime partitions of m. Row n of this sequence contains all m that have n consecutive primes starting with 2.
%C Alternatively, positions of k-repunits in A333259.
%C A330507(n) = First terms in row n.
%C Null rows occur at n = {90, 151, 349, 352, 444, ...} and are thus filled with the term -1.
%e Table begins:
%e 0: 0 1
%e 1: 2 4
%e 2: 6 8 9
%e 3: 10 12 15 16
%e 4: 18 20 21 25 27
%e 5: 24 28 33 35
%e 6: 30 39 44 45 49
%e 7: 51 55 63
%e 8: 57 65
%e 9: 60 76 87 91 95
%e 10: 69 75 77 81 85
%e 11: 99 105
%e 12: 111 115 117 119 121
%e 13: 123 125 135
%e 14: 143 145
%e 15: 147 153 155 161 169
%e 16: 159 165 171 175
%e 17: 177 185 187
%e Consider the table plotting prime p in row m of A333238 at pi(p) place; intervening primes missing from row m are shown by "." as a place holder:
%e m Primes in row m of A333238
%e ---------------------------------
%e 2: 2
%e 3: . 3
%e 4: 2
%e 5: 2 . 5
%e 6: 2 3
%e 7: 2 . . 7
%e 8: 2 3
%e 9: 2 3
%e 10: 2 3 5
%e 11: 2 3 . . 11
%e 12: 2 3 5
%e 13: 2 3 . . . 13
%e 14: 2 3 . 7
%e 15: 2 3 5
%e 16: 2 3 5
%e 17: 2 3 5 . . . 17
%e ...
%e There are no primes in rows 0 or 1 of A333238, thus row 0 of this sequence contains {0, 1}.
%e The smallest prime, 2, appears alone in rows 2 and 4 of A333238, thus row 1 of this sequence contains {2, 4}.
%e We have the primes {2, 3} and no other primes in rows {6, 8, 9} in A333238, thus row 2 of this sequence contains {6, 8, 9}.
%e We have the primes {2, 3, 5} and no other primes in rows {10, 12, 15, 16} in A333238, thus row 3 of this sequence contains {10, 12, 15, 16}, etc.
%t Block[{m = 120, s, a}, a = ConstantArray[{}, m]; s = {Prime@ PrimePi@ m}; Do[If[# <= m, If[FreeQ[a[[#]], Last@ s], a = ReplacePart[a, # -> Union@ Append[a[[#]], Last@ s]], Nothing]; AppendTo[s, Last@ s], If[Last@ s == 2, s = DeleteCases[s, 2]; If[Length@s == 0, Break[], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]], s = MapAt[Prime[PrimePi[#] - 1] &, s, -1]]] &@ Total[s], {i, Infinity}]; s = {0}~Join~Map[Which[Length@ # == 0, 0, And[Length@ # == 1, First@ # == 2], 1, True, If[Union@ # == {1}, Length@ # + 1, -1] &[Differences@ PrimePi@ #, {} -> {2}]] &, a]; Array[-1 + Position[s, #][[All, 1]] /. k_ /; MissingQ@ k -> {-1} &, Max@ s + 1, 0]]
%Y Cf. A330507, A333238, A333259.
%K tabf,sign
%O 0,3
%A _Michael De Vlieger_, _David James Sycamore_, May 25 2020