OFFSET
1,2
COMMENTS
k may be present only if k^k == +-1 (mod 11).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..400 (first 164 terms from Anthony Sand and Robert G. Wilson v)
EXAMPLE
5 is a member since 5^5 = 3125 -> 3 - 1 + 2 - 5 = -1.
MATHEMATICA
fQ[n_] := Block[{id = IntegerDigits[n^n]}, Abs[ Sum[id[[i]]*(-1)^i, {i, Length@ id}]] == 1]; k = 1; lst = {}; While[k < 10001, If[ fQ@ k, AppendTo[lst, k]]; k++]; lst
PROG
(PARI) is(n)=n=digits((n/10^valuation(n, 10))^n); abs(sum(i=1, #n, (-1)^i*n[i]))==1
forstep(n=1, 1e6, [4, 5, 2, 3, 5, 1, 2, 2, 5, 2, 2, 1, 5, 3, 2, 5, 4, 2, 4, 5, 2, 3, 5, 1, 2, 2, 5, 2, 2, 1, 5, 3, 2, 5, 4, 2], if(is(n), print1(n", "))) \\ Charles R Greathouse IV, Jul 22 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Anthony Sand and Robert G. Wilson v, Jul 20 2014
STATUS
approved