login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A062525 8^a(n) is smallest power of 8 containing the string 'n'. 3
4, 0, 3, 5, 2, 3, 2, 5, 1, 4, 10, 14, 3, 9, 6, 7, 8, 9, 10, 12, 7, 6, 17, 21, 10, 17, 6, 5, 9, 20, 26, 25, 5, 21, 9, 15, 12, 10, 13, 14, 4, 10, 9, 14, 6, 11, 14, 12, 17, 13, 18, 3, 7, 29, 13, 13, 16, 25, 11, 11, 20, 25, 6, 27, 2, 14, 24, 8, 5, 20, 23, 7, 8, 10, 10, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Robert Israel, Table of n, a(n) for n = 0..9999

MAPLE

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

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

for p from 0 while count < N do

  x:= 8*x;

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

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

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

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

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

od od od;

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

end proc:

F(2); # Robert Israel, Dec 25 2019

MATHEMATICA

Table[k = 0; While[ StringPosition[ ToString[8^k], ToString[n] ] == {}, k++ ]; k, {n, 0, 75} ]

Join[{4, 0}, With[{c=Table[{n, IntegerDigits[8^n]}, {n, 50}]}, Table[ SelectFirst[ c, SequenceCount[ #[[2]], IntegerDigits[k]]>0&], {k, 2, 80}]][[All, 1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 13 2019 *)

CROSSREFS

Cf. A030000, A063571, A176768.

Sequence in context: A092512 A060568 A073466 * A085655 A153615 A281531

Adjacent sequences:  A062522 A062523 A062524 * A062526 A062527 A062528

KEYWORD

base,nonn

AUTHOR

Robert G. Wilson v, Jun 24 2001

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 22:24 EDT 2020. Contains 337291 sequences. (Running on oeis4.)