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!)
A137998 Least k such that floor(16^n / 10^k) = 1, 2, 4 or 8 (mod 10), or zero if no such k exists. 1

%I #14 Jan 05 2020 19:37:17

%S 1,2,3,0,3,1,2,2,5,4,1,4,2,4,4,1,2,4,2,2,1,3,2,7,5,1,2,4,3,3,1,2,2,3,

%T 4,1,4,2,4,3,1,2,4,2,2,1,5,2,5,3,1,2,5,7,4,1,2,2,3,4,1,3,2,7,3,1,2,4,

%U 2,2,1,12,2,3,7,1,2,3,5,7,1,2,2,3,4,1,3,2,5,3,1,2,3,2,2,1,6,2,3,5,1,2,3,4,3

%N Least k such that floor(16^n / 10^k) = 1, 2, 4 or 8 (mod 10), or zero if no such k exists.

%C Equivalent definition: position of least significant decimal digit in 16^n equal to one of {1,2,4,8}, or zero if none of these occur. Since this is the true meaning, the sequence is flagged "base", even if the actual definition does not explicitly refer to a base.

%C This is related to A071071, i.e., the conjecture by J. Shallit that {1,2,4,8,65536} is a minimal set for powers of 2 written in base 10. This amounts to saying that any power of 2 contains either a digit among {1,2,4,8}, or 65536 as subword (obtained by deleting zero or more digits of the number).

%C Any power 2^k ends in a digit among {1,2,4,8} except for k=4n, n>0, in which case 2^k=16^n ends in 6.

%C The present sequence gives the position of the first digit (starting with units) of these powers which is among {1,2,4,8}. It appears as if 16^4=65536 is the only power of 2 which does not contain any of these four digits. This would imply the conjecture (and be an even stronger statement).

%C The sequence has a repeating pattern of length 25 of the form

%C ( 1 2 A B C 1 2 2 D E 1 F 2 G H 1 2 J 2 2 1 K 2 L M )... where A-M follow again a repeating pattern:

%C A=(3,p,q,3,3)... ; C=(3,3,r,s,3)...; D=(t,3,3,3,u)...; etc.

%H J. Shallit, <a href="https://cs.uwaterloo.ca/~shallit/Papers/minimal5.ps">Minimal primes</a>, J. Recreational Mathematics 30 (2) (1999-2000), 113-117.

%e a(1)=1 since 16^1 has a 1 in position 1 (10^1).

%e a(2)=2 since 16^2=256 has a 2 in position 2 (10^2).

%e a(3)=3 since 16^3=4096 has a 4 in position 3 (10^3).

%e a(4)=0 since 16^4=65536 has no digit 1,2,4 or 8.

%e If we arrange the terms in a 25-column matrix, we can see the pattern:

%e [1 2 3 0 3 1 2 2 5 4 1 4 2 4 4 1 2 4 2 2 1 3 2 7 5]

%e [1 2 4 3 3 1 2 2 3 4 1 4 2 4 3 1 2 4 2 2 1 5 2 5 3]

%e [1 2 5 7 4 1 2 2 3 4 1 3 2 7 3 1 2 4 2 2 1 12 2 3 7]

%e [1 2 3 5 7 1 2 2 3 4 1 3 2 5 3 1 2 3 2 2 1 6 2 3 5]

%e [1 2 3 4 3 1 2 2 5 3 1 3 2 3 8 1 2 5 2 2 1 4 2 3 4]

%e [1 2 3 4 3 1 2 2 6 5 1 6 2 5 4 1 2 5 2 2 1 3 2 5 4]

%e [1 2 7 3 3 1 2 2 3 7 1 8 2 7 3 1 2 5 2 2 1 7 2 4 3]

%e [1 2 4 5 4 1 2 2 3 7 1 3 2 4 3 1 2 4 2 2 1 4 2 3 5]

%e [1 2 3 4 4 1 2 2 3 7 1 3 2 6 3 1 2 3 2 2 1 4 2 3 8]

%e [1 2 3 5 3 1 2 2 4 3 1 3 2 3 4 1 2 6 2 2 1 5 2 3 6]

%e [1 2 3 4 3 1 2 2 9 4 1 5 2 4 5 1 2 8 2 2 1 3 2 4 5] etc.

%o (PARI) A137998(n,S=Vec("1248"))={ forstep( i=#n=Vec(Str(16^n)),1,-1, setsearch(S,n[i]) & return( #n-i ))}

%o (PARI) t=0;matrix(25,20/*# of rows*/,i,j,A137998(t++))~

%Y Cf. A071071.

%K base,easy,nonn

%O 1,2

%A _M. F. Hasler_, Mar 26 2008

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 25 06:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)