cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A386475 Least prime starting a run of exactly n consecutive primes with identical counts of odd digits.

This page as a plain text file.
%I A386475 #32 Aug 13 2025 00:37:25
%S A386475 2,5,3,11,97,503,499,491,14303,14293,157259,157253,1525723,4576997,
%T A386475 4576993,4576991,10411013,33388093,188332121,194259301,2853982501,
%U A386475 2853982499,2853982477,3913474277,10883385143,22809734971,34883348389,34883348369,34883348341
%N A386475 Least prime starting a run of exactly n consecutive primes with identical counts of odd digits.
%C A386475 Consecutive previous primes of the selected prime are ignored even though the may also have an identical count of digits.
%e A386475 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.
%e A386475 In [2], each number contains 0 odd digits.
%e A386475 In [5, 7], each number contains 1 odd digit.
%e A386475 In [3, 5, 7], each number contains 1 odd digit.
%e A386475 In [11, 13, 17, 19], each number contains 2 odd digits.
%e A386475 In [97, 101, 103, 107, 109], each number contains 2 odd digits.
%e A386475 In [503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
%e A386475 In [499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
%e A386475 In [491, 499, 503, 509, 521, 523, 541, 547], each number contains 2 odd digits.
%e A386475 In [14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits.
%e A386475 In [14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389], each number contains 3 odd digits.
%t A386475 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 *)
%Y A386475 Cf. A000040, A196564,
%K A386475 nonn,base
%O A386475 1,1
%A A386475 _Jean-Marc Rebert_, Jul 23 2025
%E A386475 More terms from _Giovanni Resta_, Jul 23 2025