|
|
A337306
|
|
a(n) is the least start of a run of exactly n consecutive prime numbers which are digitally balanced numbers in base 2 (A031443).
|
|
0
|
|
|
2, 37, 557, 647, 9803, 192583, 698653, 150287, 34449209, 136017109, 191058199, 618408991, 564779279, 40434774727, 52195951979, 149416079731, 598718776379, 802636910771
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 2 since 2 is a prime and a digitally balanced number and the next prime, 3, is not.
a(2) = 37 since 37 is a prime, 37 and the next prime, 41, are both digitally balanced in base 2, and the primes previous to 37 (31) and next to 41 (43) are not.
|
|
MATHEMATICA
|
digBalQ[n_] := Module[{d = IntegerDigits[n, 2], m}, EvenQ@(m = Length@d) && Count[d, 1] == m/2]; s[max_] := Module[{seq = Table[0, {max}], count = 0, p = 2, pp, n}, While[count < max, If[digBalQ[p], pp = NextPrime[p]; n = 1; While[digBalQ[pp], n++; pp = NextPrime[pp]]; If[n <= max && seq[[n]] == 0, count++; seq[[n]] = p]; p = NextPrime[pp], p = NextPrime[p]]]; seq]; s[8]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|