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!)
A176768 Smallest power of 8 whose decimal expansion contains n. 2

%I #15 Apr 04 2024 04:00:12

%S 4096,1,512,32768,64,512,64,32768,8,4096,1073741824,4398046511104,512,

%T 134217728,262144,2097152,16777216,134217728,1073741824,68719476736,

%U 2097152,262144,2251799813685248,9223372036854775808,1073741824

%N Smallest power of 8 whose decimal expansion contains n.

%C This is to 8 as A176763 is to 3 and as A030001 is to 2.

%H Robert Israel, <a href="/A176768/b176768.txt">Table of n, a(n) for n = 0..9999</a>

%F a(n) = MIN{A001018(i) such that n in decimal representation is a substring of A001018(i)}.

%F a(n) = 8^A062525(n). - _Michel Marcus_, Sep 30 2014

%e a(1) = 1 because 8^0 = 1 has "1" as a substring (not a proper substring, though).

%e a(2) = 512 because 8^3 = 512 has "2" as a substring.

%e a(3) = 32768 because 8^5 = 32768 has "3" as a substring.

%p F:= proc(dmax) local R,count,x,N,L,d,i,v;

%p count:= 0: x:= 1/8: N:= 10^dmax:

%p while count < N do

%p x:= 8*x;

%p L:= convert(x,base,10);

%p for d from 1 to min(dmax, nops(L)) do

%p for i from 1 to nops(L)-d+1 do

%p v:= add(L[j]*10^(j-i),j=i..i+d-1);

%p if not assigned(R[v]) then count:= count+1; R[v]:= x fi

%p od od od:

%p seq(R[v],v=0..N-1);

%p end proc:

%p F(2); # _Robert Israel_, Dec 25 2019

%t A176768[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[8^++k], IntegerString[n]]]; 8^k]; Array[A176768, 50, 0] (* _Paolo Xausa_, Apr 04 2024 *)

%Y Cf. A001018, A030001, A176763, A176764-A176773.

%K base,easy,nonn

%O 0,1

%A _Jonathan Vos Post_, Apr 25 2010

%E More terms from _Sean A. Irvine_ and _Jon E. Schoenfield_, May 05 2010

%E a(0)=4096 inserted by _Robert Israel_, Dec 25 2019

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)