login
Integers n such that the smallest x with sigma(x) == -1 mod n is n - 2.
1

%I #17 Jun 05 2015 07:05:03

%S 4,5,7,9,15,20,21,31,39,45,63,69,75,103,111,139,151,159,165,175,195,

%T 199,201,213,231,243,259,279,283,285,315,319,333,339,349,351,355,369,

%U 375,381,399,403,411,423,459,463,465,489,501,511,525,543,549,565,579

%N Integers n such that the smallest x with sigma(x) == -1 mod n is n - 2.

%C See examples section for an analysis of first few terms, using A233929(n), the smallest x satisfying sigma(x) == n - 1 modulo n.

%C Thus many terms will be a prime+2: 4, 5, 7, 9, 15, 21, 31, 39, 45, ... So far, 20 is the only term that is not a prime +2.

%C But not all primes are represented; the first instance is 13, a prime+2, that is not in the sequence. This is because, for n=13, A233929(13) would have been 11 if one did not have 6 before with sigma(6) = sigma(11) = 12 so also congruent to 13-1.

%H Donovan Johnson, <a href="/A234257/b234257.txt">Table of n, a(n) for n = 1..1000</a>

%e Take n=4, A233929(4) is 2, since sigma(2)=3 == 3 modulo 4, and we have 4 - 2 = 2.

%e Take n=5, A233929(5) is 3, since sigma(3)=4 == 4 modulo 5, and we have 5 - 3 = 2.

%e The same happens for n=7, 9, and 15, A233929(n) being the primes equal to n-2: 5, 7 and 13.

%e For n=20, A233929(20) is 18, since sigma(18) = 39 == 19 modulo 20, but 20 is not a prime+2.

%o (PARI) for(n=3, 579, for(x=1, n-2, if(sigma(x)%n==n-1, if(x==n-2, print1(n ", ")); next(2)))) \\ _Donovan Johnson_, Jan 06 2014

%Y Cf. A233929.

%K nonn

%O 1,1

%A _Michel Marcus_, suggested by _Benoit Cloitre_, Dec 22 2013