A060994 Duplicate of A031146.
0, 10, 42, 43, 79, 88, 100, 102, 189, 198, 242, 250, 252, 263, 305, 262, 370, 306, 368
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
2^31 = 2147483648 so a(31) = 0 and 2^42 = 4398046511104 so a(42) = 2.
a027870 = a055641 . a000079 -- Reinhard Zumkeller, Apr 30 2013
Table[ Count[ IntegerDigits[2^n], 0], {n, 0, 100} ] DigitCount[2^Range[0,110],10,0] (* Harvey P. Dale, Nov 20 2011 *)
A027870(n)=#select(d->!d,digits(2^n)) \\ M. F. Hasler, Jun 14 2018
def A027870(n): return str(2**n).count('0') # Chai Wah Wu, Feb 14 2020
2^53619497 is the smallest power of 2 to contain a run of 14 consecutive zeros in its decimal form. 2^119476156 (a 35965907-digit number) contains the sequence ...40030000000000000008341... about one third of the way through. 2^4627233991 (a 1392936229-digit number) contains the sequence "813000000000000000000538" about 99.5% of the way through. The computation took about six months.
import Data.List (elemIndex) import Data.Maybe (fromJust) a006889 = fromJust . (`elemIndex` a224782_list) -- Reinhard Zumkeller, Apr 30 2013
A[0]:= 0: m:= 1: for n from 1 while m <= 9 do S:= convert(2^n,string); if StringTools:-Search(StringTools:-Fill("0",m),S) <> 0 then A[m]:= n; m:= m+1; fi od: seq(A[i],i=0..9); # Robert Israel, Jan 22 2016
a = ""; Do[ a = StringJoin[a, "0"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {}, k++ ]; Print[k], {n, 1, 10} ] (* Robert G. Wilson v, edited by Clive Tooth, Jan 25 2016 *)
conseczerorec(n) = my(d=digits(n), i=0, r=0, x=#Str(n)); while(x > 0, while(d[x]==0, i++; x--); if(i > r, r=i); i=0; x--); r a(n) = my(k=0); while(conseczerorec(2^k) < n, k++); k \\ Felix Fröhlich, Sep 27 2016
N:= 100: # to get a(0)..a(N) A:= Array(0..N,-1): p:= 1: A[0]:= 0: count:= 1: for k from 1 while count <= N do p:= 3*p; m:= numboccur(0, convert(p,base,10)); if m <= N and A[m] < 0 then A[m]:= k; count:= count+1 fi od: seq(A[i],i=0..N); # Robert Israel, Dec 21 2016
a = {}; Do[k = 1; While[ Count[ IntegerDigits[3^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a Module[{l3=Table[{n,DigitCount[3^n,10,0]},{n,900}]},Transpose[Table[ SelectFirst[ l3,#[[2]]==i&],{i,0,50}]][[1]]] (* Harvey P. Dale, Dec 08 2014 *)
A063555(n)=for(k=0,oo,#select(d->!d,digits(3^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018
a = {}; Do[k = 0; While[ Count[ IntegerDigits[4^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a Module[{nn=750,p4},p4=Table[{n,DigitCount[4^n,10,0]},{n,nn}];Transpose[ Table[ SelectFirst[p4,#[[2]]==i&],{i,0,50}]][[1]]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 20 2016 *)
Count(x, d)= { local(c,f); c=0; while (x>9, f=x-10*(x\10); if (f==d, c++); x\=10); if (x==d, c++); return(c) } { for (n=0, 150, a=0; while (Count(4^a, 0) != n, a++); write("b063575.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 26 2009
A063575(n)=for(k=n,oo,#select(d->!d,digits(4^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018
a = {}; Do[k = 0; While[ Count[ IntegerDigits[6^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a With[{pwr6=Table[{n,DigitCount[6^n,10,0]},{n,1000}]},Join[{0},Transpose[ Table[ SelectFirst[pwr6,#[[2]]==i&],{i,60}]][[1]]]] (* Harvey P. Dale, Dec 15 2014 *)
A063596(n)=for(k=0, oo, #select(d->!d, digits(6^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018
The table reads: n \ k's 0 : 0, 1, ..., 9, 13, 14, 15, 16, 18, 19, 24, 25, 27, (...), 81, 86 (cf. A007377) 1 : 10, 11, 12, 17, 20, 21, 22, 23, 26, 29, 30, 38, 40, 41, 44, (...), 151, 184 2 : 42, 52, 54, 55, 56, 59, 60, 62, 63, 64, 78, 80, 82, 92, 107, (...), 171, 231 3 : 43, 53, 61, 69, 70, 83, 87, 89, 90, 93, 109, 112, 114, 115, (...), 221, 359 4 : 79, 91, 94, 97, 106, 118, 126, 127, 137, 139, 157, 159, 170, (...), 241, 283 5 : 88, 98, 99, 103, 104, 113, 120, 143, 144, 146, 152, 158, 160, (...), 343, 357 ... Column 0 is A031146: least k such that 2^k has n digits '0' in base 10. Row lengths = number of powers of 2 with exactly n '0's = (36, 41, 31, 34, 25, 32, 37, 23, 43, 47, 33, 35, 29, 27, 27, 39, 34, 34, 28, 29, ...): not in the OEIS. Largest number in row n = (86, 229, 231, 359, 283, 357, 475, 476, 649, 733, 648, 696, 824, 634, 732, 890, 895, 848, 823, 929, 1092, ...): not in the OEIS. Row number of n = Number of '0's in 2^n = A027870: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, ...). Inverse permutation (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 36, 37, 38, 10, 11, 12, 13, 39, 14, 15, 40, 41, 42, 43, 16, 17, 44, 18, 19, 45, 46, 20, 21, ...) is not in the OEIS.
mx = 1000; g[n_] := g[n] = DigitCount[2^n, 10, 0]; f[n_] := Select[Range@mx, g@# == n &]; Table[f@n, {n, 0, 4}] // Flatten (* Robert G. Wilson v, Jun 20 2018 *)
apply( A305932_row(n,M=200*(n+1))=select(k->A027870(k)==n,[0..M]), [0..20]) \\ A027870(k)=#select(d->!d, digits(2^k))
N:= 100: # to get a(0)..a(N) A:= Array(0..N, -1): p:= 1: A[0]:= 0: count:= 1: for k from 1 while count <= N do p:= 5*p; m:= numboccur(0, convert(p, base, 10)); if m <= N and A[m] < 0 then A[m]:= k; count:= count+1; od: convert(A,list); # Robert Israel, Dec 20 2018
a = {}; Do[k = 0; While[ Count[ IntegerDigits[5^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
A063585(n)=for(k=n,oo,#select(d->!d,digits(5^k))==n&&return(k)) \\ M. F. Hasler, Jun 14 2018
Comments