OFFSET
1,1
COMMENTS
The terms of the sequence could be called "Shy n n-digit numbers" as suggested by Geoffrey Campbell, Long Term Visitor (Visiting Fellow), Mathematical Sciences Institute, Australian National University, cf Links.
In base 10, x is a "Shy k n-digit number" if it is an n-digit (d_i) number such that x = Sum_{i=1..n}{(10-d_i)^k}. For instance, 2240 is a "Shy 3 4-digit number": (10 - 2)^3 + (10 - 2)^3 + (10 - 4)^3 + (10 - 0)^3 = 512 + 512 + 216 + 1000 = 2240. Again, 2149042 is a "Shy 6 7-digit number": (10 - 2)^6 + (10 - 1)^6 + (10 - 4)^6 + (10 - 9)^6 + (10 - 0)^6 + (10 - 4)^6 + (10 - 2)^6 = 262144 + 531441 + 46656 + 1 + 1000000 + 46656 + 262144 = 2149042.
It is not known if the sequence is finite. At least there are no other terms up to 18-digit numbers (as tested by Marco Cecchi at LinkedIn link).
If there are further terms, they are greater than 10^33. - Giovanni Resta, Aug 20 2015
Subsequence of A052382. Sequence is finite and complete as verified by exhaustive search since all terms have 60 or fewer digits. Since all terms are zeroless, they are less than k*9^k which would be less than 10^(k-1) (i.e., have fewer than k digits) if k > 60. - Chai Wah Wu, Apr 07 2018
LINKS
Geoffrey Campbell, Related to Narcissistic numbers: the Shy numbers, Number Theory group on LinkedIn.com
Marco Cecchi, Python program based on partitions.
EXAMPLE
(10 - 5)^1 = 5,
(10 - 3)^3 + (10 - 7)^3 + (10 - 8)^3 = 343 + 27 + 8 = 378,
(10 - 9)^5 + (10 - 1)^5 + (10 - 8)^5 + (10 - 8)^5 + (10 - 2)^5 = 1 + 59049 + 32 + 32 + 32768 = 91882, etc.
MAPLE
with(numtheory): P:=proc(q) local a, b, c, k, n;
for n from 1 to q do a:=ilog10(n)+1; b:=0; c:=n;
for k from 1 to a do b:=b+(10-(c mod 10))^a; c:=trunc(c/10); od;
if b=n then print(n); fi; od; end: P(10^9);
MATHEMATICA
Select[Range[10^5], # == Total[(10 - IntegerDigits@ #)^ IntegerLength[#]] &] (* Giovanni Resta, Aug 20 2015 *)
PROG
(PARI) isok(n) = (d = digits(n)) && (sum(k=1, #d, (10-d[k])^#d) == n); \\ Michel Marcus, Aug 24 2015
(Python)
from itertools import combinations_with_replacement
A261433_list = []
for k in range(1, 10):
a, k10 = tuple([i**k for i in range(10, 0, -1)]), 10**k
for b in combinations_with_replacement(range(1, 10), k):
x = sum(list(map(lambda y:a[y], b)))
if x < k10 and tuple(int(d) for d in sorted(str(x))) == b:
A261433_list.append(x)
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Paolo P. Lava, Aug 20 2015
EXTENSIONS
a(4)-a(6) found by Aleksander Zujev
STATUS
approved