cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A245387 #20 Mar 03 2019 01:54:14
%S A245387 1,5,10,20,21,43,56,78,80,100,131,160,170,215,230,300,355,485,505,540,
%T A245387 692,824,1000,1055,1165,1335,1340,1429,1453,1505,1739,2102,2309,2740,
%U A245387 2936,3772,3972,4055,4489,4676,5080,5512,5600,5660,5700,5770,5796,6350,7173,7512,7790,8372,9380,9767,10000
%N A245387 Numbers k for which the alternating sum of the digits of k^k is +-1.
%C A245387 k may be present only if k^k == +-1 (mod 11).
%H A245387 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 A245387 5 is a member since 5^5 = 3125 -> 3 - 1 + 2 - 5 = -1.
%t A245387 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 A245387 (PARI) is(n)=n=digits((n/10^valuation(n,10))^n); abs(sum(i=1,#n,(-1)^i*n[i]))==1
%o A245387 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 A245387 Cf. A244212, A244144.
%K A245387 nonn,base
%O A245387 1,2
%A A245387 _Anthony Sand_ and _Robert G. Wilson v_, Jul 20 2014