login
Numbers m with decimal expansion (d_1, ..., d_k) such that d_i = m ^ i mod 10 for i = 1..k.
2

%I #10 May 31 2021 02:11:21

%S 0,1,2,3,4,5,6,7,8,9,11,55,66,111,464,555,666,919,1111,5555,6666,

%T 11111,24862,39713,46464,55555,66666,79317,84268,91919,111111,555555,

%U 666666,1111111,4646464,5555555,6666666,9191919,11111111,55555555,66666666,111111111

%N Numbers m with decimal expansion (d_1, ..., d_k) such that d_i = m ^ i mod 10 for i = 1..k.

%C This sequence is infinite as it contains d * A002275(k) for any d in {1, 5, 6} and k > 0.

%C Also contains terms with patterns 4(64)^k, 9(19)^k, 2(4862)^k, 3(9713)^k, 7(9317)^k, 8(4268)^k for k >= 0, where ^ denotes repeated concatenation; all terms have first and last digits the same. - _Michael S. Branicky_, May 29 2021

%H Rémy Sigrist, <a href="/A344823/b344823.txt">Table of n, a(n) for n = 1..1253</a>

%H Rémy Sigrist, <a href="/A344823/a344823.gp.txt">PARI program for A344823</a>

%e - 4^1 = 4 mod 10,

%e - 4^2 = 6 mod 10,

%e - 4^3 = 4 mod 10,

%e - so 464 belongs to the sequence.

%o (PARI) is(n) = { my (d=digits(n), m=Mod(n,10)); for (k=1, #d, if (d[k] != m^k, return (0))); return (1) }

%o (PARI) See Links section.

%o (Python)

%o def ok(m):

%o d = str(m)

%o return all(d[i-1] == str((m**i)%10) for i in range(1, len(d)+1))

%o print(list(filter(ok, range(10**6)))) # _Michael S. Branicky_, May 29 2021

%o (Python)

%o def auptod(maxdigits):

%o alst = [0]

%o for k in range(1, maxdigits+1):

%o for d1 in range(1, 10):

%o d = [(d1**i)%10 for i in range(1, k+1)]

%o if d1 == d[-1]: alst.append(int("".join(map(str, d))))

%o return alst

%o print(auptod(9)) # _Michael S. Branicky_, May 29 2021

%Y Cf. A002275, A344555, A344749, A344822.

%K nonn,base

%O 1,3

%A _Rémy Sigrist_, May 29 2021