%I #136 Jan 02 2023 12:30:46
%S 35,55,77,95,115,119,143,155,161,187,203,209,215,221,235,247,253,275,
%T 287,295,299,319,323,329,335,355,371,377,391,395,403,407,413,415,437,
%U 455,473,475,493,497,515,517,527,533,535,539,551,559,575,581,583,589,611
%N Numbers n > 1 such that n^3 divides Sum_{k=1..n-1} k^n = A121706(n).
%C All terms belong to A038509 (Composite numbers with smallest prime factor >= 5). Many but not all terms belong to A060976 (Odd nonprimes, c, which divide Bernoulli(2*c)).
%C Many terms are semiprimes:
%C - the non-semiprimes are {275, 455, 475, 539, 575, 715, 775, 875, 935, ...}: see A321487;
%C - semiprime terms that are multiples of 5 have indices {7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, ...} = A002145 (Primes of form 4*k + 3, except 3, or k > 0; or Primes which are also Gaussian primes);
%C - semiprime terms that are multiples of 7 have indices {5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, ...} = A003627 (Primes of form 3*k - 1, except 2, or k > 1);
%C - semiprime terms that are multiples of 11 have indices {5, 7, 13, 17, 19, 23, 37, 43, 47, 53, 59, 67, 73, 79, 83, ...} = Primes of the form 4*k + 1 and 4*k - 1. [Edited by _Michel Marcus_, Jul 21 2018, _M. F. Hasler_, Nov 09 2018]
%C Conjecture: odd numbers n > 1 such that n divides Sum_{k=1..n-1} k^(n-1). - _Thomas Ordowski_ and _Robert Israel_, Oct 09 2015. Professor Andrzej Schinzel (in a letter to me, dated Dec 29 2015) proved this conjecture. - _Thomas Ordowski_, Jul 20 2018
%C Note that n^2 divides Sum_{k=1..n-1} k^n for every odd number n > 1. - _Thomas Ordowski_, Oct 30 2015
%C Conjecture: these are "anti-Carmichael numbers" defined; n > 1 such that p - 1 does not divide n - 1 for every prime p dividing n. Equivalently, odd numbers n > 1 such that n is coprime to A027642(n-1). A number n > 1 is an "anti-Carmichael" if and only if gcd(n, b^n - b) = 1 for some integer b. - _Thomas Ordowski_, Jul 20 2018
%C It seems that these numbers are all composite terms of A317358. - _Thomas Ordowski_, Jul 30 2018
%C a(62) = 697 is the first term not in A267999: see A306097 for all these terms. - _M. F. Hasler_, Nov 09 2018
%C If the conjecture from _Thomas Ordowski_ is true, then no term is a multiple of 2 or 3. - _Jianing Song_, Jan 27 2019
%C Conjecture: an odd number n > 1 is a term iff gcd(n, A027642(n-1)) = 1. - _Thomas Ordowski_, Jul 19 2019
%C Conjecture: Sequence consists of numbers n > 1 such that r = b^n + n - b will produce a prime for one or more integers b > 1. Only when n is in this sequence do one or more prime factors of n fail to divide r for all b. Also, n and b must be coprime for r to be prime. The above also applies to r = b^n - n - b, ignoring n=3, b=2. - _Richard R. Forberg_, Jul 18 2020
%C Odd numbers n > 1 such that Sum_{k(even)=2..n-1}2*k^(n-1) == 0 (mod n). - _Davide Rotondo_, Oct 28 2020
%C What is the asymptotic density of these numbers? The numbers A267999 have a slightly lower density. The difference between the densities is equal to the density of the numbers A306097. - _Thomas Ordowski_, Feb 15 2021
%C The asymptotic density of this sequence is in the interval (0.253, 0.265) (Ordowski, 2021). - _Amiram Eldar_, Feb 26 2021
%H Giovanni Resta, <a href="/A121707/b121707.txt">Table of n, a(n) for n = 1..10000</a> (first 1371 terms from Robert Israel)
%H T. Ordowski, <a href="http://list.seqfan.eu/oldermail/seqfan/2021-February/021342.html">Density of anti-Carmichael numbers</a>, SeqFan Mailing List, Feb 17 2021.
%H Don Reble, <a href="/A121707/a121707_1.pdf">Comments on A121707</a>
%p filter:= n -> add(k &^ n mod n^3, k=1..n-1) mod n^3 = 0:
%p select(filter, [$2..1000]); # _Robert Israel_, Oct 08 2015
%t fQ[n_] := Mod[Sum[PowerMod[k, n, n^3], {k, n - 1}], n^3] == 0; Select[
%t Range[2, 611], fQ] (* _Robert G. Wilson v_, Apr 04 2011 and slightly modified Aug 02 2018 *)
%o (PARI) is(n)=my(n3=n^3);sum(k=1,n-1,Mod(k,n3)^n)==0 \\ _Charles R Greathouse IV_, May 09 2013
%o (PARI) for(n=2, 1000, if(sum(k=1, n-1, k^n) % n^3 == 0, print1(n", "))) \\ _Altug Alkan_, Oct 15 2015
%o (Sage) # after Andrzej Schinzel
%o def isA121707(n):
%o if n == 1 or is_even(n): return False
%o return n.divides(sum(k^(n-1) for k in (1..n-1)))
%o [n for n in (1..611) if isA121707(n)] # _Peter Luschny_, Jul 18 2019
%Y Cf. A000312, A002145, A002997, A027642, A031971, A038509, A060976, A121706, A267999 (probably a subsequence).
%Y Cf. A306097 for terms of this sequence A121707 not in sequence A267999, A321487 for terms which are not semiprimes.
%Y Cf. A191677 (n divides Sum_{k<n} k^(n-1)).
%Y Cf. A326478 for a conjectured connection with the Bernoulli numbers.
%K nonn
%O 1,1
%A _Alexander Adamchuk_, Aug 16 2006
%E Sequence corrected by _Robert G. Wilson v_, Apr 04 2011