login
a(n) is the smallest number greater than a(n-1) such that sigma(a(1)) + sigma(a(2)) + ... + sigma(a(n)) is prime.
1

%I #26 Sep 12 2019 15:04:23

%S 2,3,5,10,11,12,17,19,20,24,27,28,29,30,33,40,42,44,59,62,65,68,70,75,

%T 82,83,93,96,101,102,107,108,109,122,123,126,132,133,134,135,136,138,

%U 142,148,149,154,155,160,165,166,167,174,178,191,195,203,205,206

%N a(n) is the smallest number greater than a(n-1) such that sigma(a(1)) + sigma(a(2)) + ... + sigma(a(n)) is prime.

%C The corresponding primes are 3, 7, 13, 31, 43, 71, 89, 109, 151,...

%C A property of this sequence : there are groups of consecutive numbers {2,3}, {10,11,12}, {19,20}, {27,28,29,30}, ... , {2707,2708,2709},..., most of which have length 2.

%C The lengths of these groups are 2, 3, 2, 4, 2, 2, 3, 2, 5, 2, 2, 3, 3, 5, 2, ... The first group of size 2, 3, 4, ... starts at n = 1, 4, 11, 37, 15034, 102941...

%H Amiram Eldar, <a href="/A219860/b219860.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 10 because sigma(a(1)) + sigma(a(2)) + sigma(a(3)) = sigma(2) + sigma(3) + sigma(5) = 3 + 4 + 6 = 13, and:

%e 13 + sigma(6) = 13 + 12 = 25 is not prime,

%e 13 + sigma(7) = 13 + 8 = 21 is not prime,

%e 13 + sigma(8) = 13 + 15 = 28 is not prime, and

%e 13 + sigma(9) = 13 + 13 = 26 is not prime, but

%e 13 + sigma(10) = 13 + 18 = 31 is prime.

%p with(numtheory) :

%p A219860 := proc(n)

%p option remember;

%p local a,p ;

%p if n = 1 then

%p 2;

%p else

%p for a from procname(n-1)+1 do

%p p := add(sigma(procname(j)),j=1..n-1) + sigma(a) ;

%p if isprime(p) then

%p return a;

%p end if;

%p end do:

%p end if;

%p end proc: # _R. J. Mathar_, Dec 19 2012

%t seq = {}; s = 0; n = 0; Do[n++; While[!PrimeQ[(sd = s + DivisorSigma[1, n])], n++]; s = sd; AppendTo[seq, n], {100}]; seq (* _Amiram Eldar_, Sep 12 2019 *)

%Y Cf. A000203 (sigma(n) = sum of divisors of n).

%K nonn,less

%O 1,1

%A _Michel Lagneau_, Nov 29 2012