login
This site is supported by donations 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. 5
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

David A. Corneth, Table of n, a(n) for n = 1..10000

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

Cf. A097574, A113022, A113023.

Sequence in context: A065386 A048951 A058629 * A025487 A279537 A070175

Adjacent sequences:  A095807 A095808 A095809 * A095811 A095812 A095813

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 20 08:20 EST 2018. Contains 299372 sequences. (Running on oeis4.)