The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A095810 Numbers of the form 2^j (mod 10^k), where j >= 0 and k >= 1, with leading zeros suppressed. 4
1, 2, 4, 6, 8, 12, 16, 24, 28, 32, 36, 44, 48, 52, 56, 64, 68, 72, 76, 84, 88, 92, 96, 104, 112, 128, 136, 144, 152, 168, 176, 184, 192, 208, 216, 224, 232, 248, 256, 264, 272, 288, 296, 304, 312, 328, 336, 344, 352, 368, 376, 384, 392, 408, 416, 424, 432, 448 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Given only the last 5 (say) digits of a large integer N, can you determine whether N is not some power of 2? This is equivalent to ask which 5-digit numbers are of the form 2^j (mod 10^6) where j is any positive integer. So if the last 5 digits of N are not in this sequence, then N is not a power of 2.
If we have only the last k digits of an integer N, we can determine whether N is not a power of 2, if and only if the number given by those digits is divisible by 5 OR not a multiple of 2^k. - Francisco Salinas (franciscodesalinas(AT)hotmail.com), Aug 27 2004. [Edited for clarification and simplification by M. F. Hasler, Nov 06 2017, following discussions with David A. Corneth, Peter Munn and N. J. A. Sloane. The given condition says when a k-digit number is not in this sequence. In that case we know that N is not a power of 2, otherwise, we cannot know.]
LINKS
MATHEMATICA
Take[ Union[ Flatten[ Table[ PowerMod[2, j, 10^k], {j, 0, 100}, {k, 3}]]], 58] (* Robert G. Wilson v, Sep 11 2004 *)
PROG
(PARI) is(n) = valuation(n, 2)>=#digits(n)&&valuation(n, 5)==0 \\ David A. Corneth, Oct 17 2017
(PARI) nxt(n) = if(n==1, return(2)); q = #digits(n); n += 2^q; while(n%5==0, n += 2^q); n \\ David A. Corneth, Oct 17 2017
CROSSREFS
Sequence in context: A323508 A324850 A362804 * A025487 A333964 A279537
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Aug 30 2004
EXTENSIONS
Additional comments from Robert G. Wilson v, Oct 11 2005
Edited by M. F. Hasler, Nov 06 2017
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 May 23 09:59 EDT 2024. Contains 372760 sequences. (Running on oeis4.)