cp's OEIS Frontend

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.

A176768 Smallest power of 8 whose decimal expansion contains n.

This page as a plain text file.
%I A176768 #15 Apr 04 2024 04:00:12
%S A176768 4096,1,512,32768,64,512,64,32768,8,4096,1073741824,4398046511104,512,
%T A176768 134217728,262144,2097152,16777216,134217728,1073741824,68719476736,
%U A176768 2097152,262144,2251799813685248,9223372036854775808,1073741824
%N A176768 Smallest power of 8 whose decimal expansion contains n.
%C A176768 This is to 8 as A176763 is to 3 and as A030001 is to 2.
%H A176768 Robert Israel, <a href="/A176768/b176768.txt">Table of n, a(n) for n = 0..9999</a>
%F A176768 a(n) = MIN{A001018(i) such that n in decimal representation is a substring of A001018(i)}.
%F A176768 a(n) = 8^A062525(n). - _Michel Marcus_, Sep 30 2014
%e A176768 a(1) = 1 because 8^0 = 1 has "1" as a substring (not a proper substring, though).
%e A176768 a(2) = 512 because 8^3 = 512 has "2" as a substring.
%e A176768 a(3) = 32768 because 8^5 = 32768 has "3" as a substring.
%p A176768 F:= proc(dmax) local R,count,x,N,L,d,i,v;
%p A176768 count:= 0: x:= 1/8: N:= 10^dmax:
%p A176768 while count < N do
%p A176768   x:= 8*x;
%p A176768   L:= convert(x,base,10);
%p A176768   for d from 1 to min(dmax, nops(L)) do
%p A176768     for i from 1 to nops(L)-d+1 do
%p A176768       v:= add(L[j]*10^(j-i),j=i..i+d-1);
%p A176768       if not assigned(R[v]) then count:= count+1; R[v]:= x fi
%p A176768 od od od:
%p A176768 seq(R[v],v=0..N-1);
%p A176768 end proc:
%p A176768 F(2); # _Robert Israel_, Dec 25 2019
%t A176768 A176768[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[8^++k], IntegerString[n]]]; 8^k]; Array[A176768, 50, 0] (* _Paolo Xausa_, Apr 04 2024 *)
%Y A176768 Cf. A001018, A030001, A176763, A176764-A176773.
%K A176768 base,easy,nonn
%O A176768 0,1
%A A176768 _Jonathan Vos Post_, Apr 25 2010
%E A176768 More terms from _Sean A. Irvine_ and _Jon E. Schoenfield_, May 05 2010
%E A176768 a(0)=4096 inserted by _Robert Israel_, Dec 25 2019