login
A066867
Numbers n such that 2^n has 7 as its fourth decimal digit from the right.
2
21, 24, 27, 32, 40, 46, 56, 62, 73, 85, 94, 141, 157, 164, 170, 175, 183, 188, 216, 228, 234, 237, 261, 265, 268, 293, 300, 317, 331, 339, 349, 355, 359, 369, 376, 379, 386, 403, 410, 430, 442, 447, 451, 454, 458, 463, 472, 495, 498
OFFSET
1,1
COMMENTS
A sequence of no importance apart from the reference, which attributes the solution of this to John von Neumann, beating a computer to the solution.
REFERENCES
Sylvia Nasar, A Beautiful Mind (1998), p. 80.
LINKS
EXAMPLE
32 is in the sequence as 2^32 = 4294967296 which has a 7 as the fourth decimal digit from the right. - David A. Corneth, Jun 21 2022
MATHEMATICA
Select[ Range[ 10, 500 ], IntegerDigits[ 2^# ][ [ -4 ] ] == 7 & ]
Select[Range[500], NumberDigit[2^#, 3]==7&] (* Harvey P. Dale, Jun 21 2022 *)
PROG
(PARI) is(n) = lift(Mod(2, 10000)^n) \ 1000 == 7 \\ David A. Corneth, Jun 21 2022
(Python)
def ok(n): return pow(2, n, 10000)//1000 == 7
print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Jun 21 2022 after David A. Corneth
CROSSREFS
Cf. A068345.
Sequence in context: A303313 A257642 A332922 * A111356 A344806 A295692
KEYWORD
nonn,easy,base
AUTHOR
Harvey P. Dale, Jan 21 2002
STATUS
approved