A386475 Least prime starting a run of exactly n consecutive primes with identical counts of odd digits.
2, 5, 3, 11, 97, 503, 499, 491, 14303, 14293, 157259, 157253, 1525723, 4576997, 4576993, 4576991, 10411013, 33388093, 188332121, 194259301, 2853982501, 2853982499, 2853982477, 3913474277, 10883385143, 22809734971, 34883348389, 34883348369, 34883348341
Offset: 1
Examples
a(2) = 5, because the two primes in the sequence starting at 5, namely 5 and 7, each contain the same number of odd digits, and no earlier prime sequence meets this criterion. In [2], each number contains 0 odd digits. In [5, 7], each number contains 1 odd digit. In [3, 5, 7], each number contains 1 odd digit. In [11, 13, 17, 19], each number contains 2 odd digits. In [97, 101, 103, 107, 109], each number contains 2 odd digits. In [503, 509, 521, 523, 541, 547], each number contains 2 odd digits. In [499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits. In [491, 499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits. In [14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits. In [14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits.
Programs
-
Mathematica
oddn[n_] := Plus @@ Mod[IntegerDigits@ n, 2]; T = Table[0, {99}]; p = 1; While[p < 2 10^6, p = NextPrime[p]; c = oddn[p]; r=1; q=p; While[True, q = NextPrime[q]; If[oddn[q] == c, r++, Break[]]]; If[T[[r]] == 0, T[[r]] = p]]; Take[T, Position[T, 0][[1, 1]] - 1] (* Giovanni Resta, Jul 23 2025 *)
Extensions
More terms from Giovanni Resta, Jul 23 2025
Comments