[go: up one dir, main page]

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!)
A363196 a(n) is the least k such that the rightmost 7 in the decimal expansion of 3^k is in the (10^n)'s position, or -1 if there is no such k. 0
3, -1, 6, 37, 50, 14, 18, 38, 28, 25, 48, 188, 34, 93, 45, 40, 44, 134, 54, 60, 96, 86, 61, 81, 229, 57, 133, 321, 89, 412, 628, 210, 200, 257, 429, 256, 313, 672, 885, 530, 2418, 649, 270, 641, 848, 258, 2676, 121, 450, 1448, 3254, 696, 9857, 4961, 804, 6101, 1049, 1476, 5044, 3186, 437, 12560 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Conjecture: a(n) = -1 only for n = 1.
LINKS
EXAMPLE
a(4) = 50 because 3^50 = 717897987691852588770249 has its rightmost 7 in the (10^4)'s position, and no k < 50 works.
MAPLE
W:= Array(0..70): count:= 0: W[1]:= -1:
for k from 1 while count < 70 do
L:= convert(3^k, base, 10);
for j from 1 to min(nops(L), 101) do
if L[j] = 7 then
if W[j-1] = 0 then W[j-1]:= k; count:= count+1; fi;
break
fi
od
od:
convert(W[0..70], list);
PROG
(Python)
from itertools import count
def aupto(N):
M, adict, n, k = 10**(N+1), {-1:None, 0:3, 1:-1}, 0, 0
while n < N:
while n in adict: yield adict[n]; n += 1
v = str(pow(3, k, M))[::-1].find("7")
if v not in adict:
adict[v] = k
k += 1
print(list(aupto(62))) # Michael S. Branicky, May 21 2023
CROSSREFS
Cf. A000244.
Sequence in context: A283432 A157866 A221852 * A025230 A152456 A128605
KEYWORD
sign,base
AUTHOR
Robert Israel, May 20 2023
STATUS
approved

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 August 29 16:28 EDT 2024. Contains 375517 sequences. (Running on oeis4.)