OFFSET
0,1
COMMENTS
Let S_3(x) be the absolute value of the alternating sum of base-1000 digits of x.
Define a(n) as the smallest b >= 2 with S_3(n^b) = n; if no such b exists, set a(n) = 0.
Conjectured to exist for all n that are not powers of 1000, for which S_3(1000^b) = 1 for all b.
LINKS
Pieter Post, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = min_{b >= 2 | S_3(n^b) = n} or 0 if no such b exists, where S_3(x) = abs(Sum_{k>=0} (-1)^k * d_k), where x = Sum_{k>=0} d_k * 1000^k, 0 <= d_k < 1000.
a(1000^k) = 0 for k > 0.
EXAMPLE
a(10) = 4 since 10^4 = 10000 => |10 - 000| = 10.
a(14) = 6 since 14^6 = 7529536 => |7 - 529 + 536| = 14.
a(22) = 4 since 22^4 = 234256 => |234 - 256| = 22.
PROG
(Python)
from itertools import count
from sympy.ntheory import digits
def a(n):
if n > 1 and (s:=str(n)) == '1'+'0'*(len(s)//3*3): return 0
return next(b for b in count(2) if n==abs(sum(-d if i&1 else d for i, d in enumerate(map(int, digits(n**b, 1000)[1:])))))
print([a(n) for n in range(63)]) # Michael S. Branicky, Oct 25 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pieter Post, Oct 25 2025
STATUS
approved
