login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A188775 Numbers k such that Sum_{j=1..k} j^j == -1 (mod k). 4

%I #45 May 20 2021 18:29:47

%S 1,2,3,6,14,42,46,1806,2185,4758,5266,10895,24342,26495,44063,52793,

%T 381826,543026,547311,805002

%N Numbers k such that Sum_{j=1..k} j^j == -1 (mod k).

%C Numbers k such that A001923(k) == -1 (mod k).

%C a(21) > 10^7. - _Hiroaki Yamanouchi_, Aug 25 2015

%C Numbers k such that k divides A062970(k). - _Jianing Song_, Feb 03 2019

%e 6 is a term because 1^1 + 2^2 + 3^3 + 4^4 + 5^5 + 6^6 = 50069 and 50069 + 1 = 6 * 8345. - _Bernard Schott_, Feb 03 2019

%p isA188775 := proc(n) add( modp(k &^ k,n),k=1..n) ; if modp(%,n) = n-1 then true; else false; end if; end proc:

%p for n from 1 do if isA188775(n) then printf("%d\n",n) ; end if; end do: # _R. J. Mathar_, Apr 10 2011

%t Union@Table[If[Mod[Sum[PowerMod[i,i,n],{i,1,n}],n]==n-1,Print[n];n],{n,1,10000}]

%o (PARI)

%o f(n)=lift(sum(k=1,n,Mod(k,n)^k));

%o for(n=1,10^6,if(f(n)==n-1,print1(n,", "))) \\ _Joerg Arndt_, Apr 10 2011

%o (PARI) m=0;for(n=1,1000,m=m+n^n;if((m+1)%n==0,print1(n,", "))) \\ _Jinyuan Wang_, Feb 04 2019

%o (Python)

%o sum = 0

%o for n in range(10000):

%o sum += n**n

%o if sum % (n+1) == 0:

%o print(n+1, end=',')

%o # _Alex Ratushnyak_, May 13 2013

%Y Cf. A128981 (sum == 0 (mod n)), A188776 (sum == 1 (mod n)).

%Y Cf. A057245.

%Y Cf. A001923, A062970.

%K nonn,hard,more

%O 1,2

%A _José María Grau Ribas_, Apr 10 2011

%E a(12)-a(16) from _Joerg Arndt_, Apr 10 2011

%E a(17)-a(20) from _Lars Blomberg_, May 10 2011

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)