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
David A. Corneth, Table of n, a(n) for n = 1..10000
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.
KEYWORD
nonn,easy,base
AUTHOR
Harvey P. Dale, Jan 21 2002
STATUS
approved