login
A395027
The exponent k of the first pair of powers of 2 (2^j, 2^k), j < k, where 2^k is the smallest power whose last n digits are a non-identical anagram (besides n=1), no leading zeros, of the last n digits of 2^j.
2
5, 14, 21, 31, 85, 152, 40, 40, 195, 195, 528, 363, 465, 637, 465, 511, 661, 1108, 637, 637, 1721, 830, 2826, 2265, 807, 1157, 2005, 1268, 5465, 3791, 3488, 3709, 2896, 3986, 5555, 8692, 7647, 3442, 3715, 3912, 2709, 2147, 6146, 4154, 3760, 7421, 7421, 4549, 11985, 3675
OFFSET
1,1
COMMENTS
If a(n) < 4*5^(n-1) then the non-identical condition does not change terms. - David A. Corneth, May 29 2026
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..1000 (terms 501..800 from David A. Corneth)
David A. Corneth, PARI program
EXAMPLE
For a(1), k = 5, j = 1 since the last digit of 2^5 = 32 and 2^1 = 2 are the same.
For a(2), k = 14, j = 11 since the last two digits of 2^14 = 16384 and 2^11 = 2048 are distinct anagrams.
a(3) = 21 as 21 is the smallest k whose last 3 digits (152) are an anagram of the last 3 digits of 2^j (j = 9 with anagram 512) and both anagrams have no leading zeros. - David A. Corneth, May 28 2026
For a(5), k = 85, j = 56 since the last five digits of 2^85 = 3...97632 and 2^56 = 7...27936 are anagrams. (If leading zeros were allowed, we would have k = 71 and j = 26 from 2^71 = 2...06848 and 2^26 = 6...08864.)
PROG
(Python)
def a(n):
if n == 1: return 5
seen, modder = dict(), 10**n
pow2mod = pow(2, 3*n, modder)
for k in range(3*n, modder+1):
s = str(pow2mod)
if len(s) == n:
key = "".join(sorted(s))
if key in seen and seen[key][0] != s:
return k
else:
seen[key] = (s, k)
pow2mod = 2*pow2mod%modder
return -1
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, May 28 2026
(PARI) \\ See Corneth link
CROSSREFS
Cf. A005054, A179239, A394228 (exponent j).
Sequence in context: A167201 A336145 A269871 * A323732 A048769 A190514
KEYWORD
nonn,base
AUTHOR
Rhys Feltman, Apr 10 2026
EXTENSIONS
a(7) onward from Michael S. Branicky, May 27 2026
STATUS
approved