login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Sequence in context: A300969 A120047 A300926 * A216539 A139122 A123216
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, Nov 21 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)