%I #31 Jan 31 2023 12:20:04
%S 3,6,6,6,6,12,6,6,6,12,12,6,12,6,6,18,6,12,18,6,6,12,6,30,6,6,12,6,6,
%T 6,12,12,18,6,30,6,6,24,6,12,18,12,12,6,12,6,12,12,12,6,12,36,6,6,18,
%U 6,6,18,24,6,6,6,18,6,18,18,24,18,12,24,12,12,6,12,18,6,18,6,24
%N a(n) = A003627(n+1) - A003627(n).
%C Sequence of differences between consecutive primes of the form 3n-1, which is the sequence A003627.
%C For n > 1, this is the sequence of first differences of A007528. The longest run of 6's will have length 4 (corresponding to 5, 11, 17, 23, 29 in A007528). Since no other prime ends in 5, thereafter, a run of 6's cannot exceed length 3 (e.g., 41, 47, 53, 59 in A007528). Similarly, a run of 12's cannot exceed length 3 (e.g., 467, 479, 491, 503 in A007528), a run of 18's cannot exceed length 3 (e.g., 2843, 2861, 2879, 2897 in A007528), and a run of 24's cannot exceed length 3 (e.g., 154619, 154643, 154667, 154691 in A007528). This run limit of length 3 also extends to other multiples of 6 that are not divisible by 5. - _Timothy L. Tiffin_, Dec 22 2022
%C For multiples of 6 that are divisible by 5, the length of the longest run does not appear to be bounded. For example, if k, k+30, k+60, k+90, ..., k+30(k-1) = 31k-30 are k consecutive primes in A002476, then this will produce a run of k-1 30's in this sequence. - _Timothy L. Tiffin_, Jan 06 2023
%H Harvey P. Dale, <a href="/A358548/b358548.txt">Table of n, a(n) for n = 1..1000</a>
%e For n=3, a(3) = A003627(4) - A003627(3) = 17 - 11 = 6.
%t A007528 := Select[6 Range[10000] - 1, PrimeQ]; m := Table[A007528[[n+1]] - A007528[[n]], {n, 1, 3040}]; PrependTo[m, 3] - _Timothy L. Tiffin_, Jan 5 2023
%t Differences[Select[Prime[Range[200]],Mod[#,3]==2&]] (* _Harvey P. Dale_, Jan 31 2023 *)
%o (Python)
%o from itertools import islice
%o from sympy import isprime
%o def A358548_gen(): # generator of terms
%o p, q = 2, 5
%o while True:
%o while not isprime(q):
%o q += 3
%o yield q-p
%o p = q
%o q += 3
%o A358548_list = list(islice(A358548_gen(),30)) # _Chai Wah Wu_, Jan 05 2023
%Y Cf. A003627, A359257.
%K nonn,easy
%O 1,1
%A _Jordan Gunter_, Nov 19 2022