This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A245387 Numbers k for which the alternating sum of the digits of k^k is +-1. 1

%I

%S 1,5,10,20,21,43,56,78,80,100,131,160,170,215,230,300,355,485,505,540,

%T 692,824,1000,1055,1165,1335,1340,1429,1453,1505,1739,2102,2309,2740,

%U 2936,3772,3972,4055,4489,4676,5080,5512,5600,5660,5700,5770,5796,6350,7173,7512,7790,8372,9380,9767,10000

%N Numbers k for which the alternating sum of the digits of k^k is +-1.

%C k may be present only if k^k == +-1 (mod 11).

%H Charles R Greathouse IV, <a href="/A245387/b245387.txt">Table of n, a(n) for n = 1..400</a> (first 164 terms from Anthony Sand and Robert G. Wilson v)

%e 5 is a member since 5^5 = 3125 -> 3 - 1 + 2 - 5 = -1.

%t 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

%o (PARI) is(n)=n=digits((n/10^valuation(n,10))^n); abs(sum(i=1,#n,(-1)^i*n[i]))==1

%o 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

%Y Cf. A244212, A244144.

%K nonn,base

%O 1,2

%A _Anthony Sand_ and _Robert G. Wilson v_, Jul 20 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 21 03:24 EDT 2019. Contains 328291 sequences. (Running on oeis4.)