login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A015886
a(n) = smallest number k such that sigma(k + n) = sigma(k) + n, or -1 if no such number exists.
7
1, 2, 3, 2, 3, 2, 5, 74, 3, 2, 3, 2, 5, 4418, 3, 2, 3, 2, 5, 6, 3, 2, 7
OFFSET
0,2
COMMENTS
There are solutions to sigma(k)+n=sigma(k+n) whenever n is the difference between two primes (A030173), e.g. k and k+n are primes. There are other values of n that have solutions (see example).
a(23) > 4292000000, if it exists. - Jud McCranie, Jan 05 2000
The sequence begins: 1, 2, 3, 2, 3, 2, 5, 74, 3, 2, 3, 2, 5, 4418, 3, 2, 3, 2, 5, 6, 3, 2, 7, ?, 5, ?, 3, 2, 3, 2, 7, ?, 5, 18, 3, 2, 5, 44, 3, 2, 3, 2, 5, ?, 3, 2, 7, ?, 5, 3315, 3, 2, 7, ?, 5, ?, 3, 2, 3, 2, 7, ?, 5, ?, 3, 2, 5, ?, 3, 2, 3, 2, 7, 18, 5, ?, 3, 2, 5, ?, 3, 2, 7, ?, 5, ?, 3, 2, 13, ?, 7, ?, 5, 32, 3, 2, 5 where the other missing terms (designated by "?") are > 10^9, if they exist. - Jud McCranie, Jan 08 2000
The "other" values of n are the odd n such that n+2 is not prime. For these n, in order for sigma(k) or sigma(n+k) to be odd, either k or n+k must be a square or twice a square. Examples: for n=7, n+k=9^2; for n=13, k=2*47^2 and for n=19, n+k=5^2. Using this idea, it is easy to show that if a(23) exists it is greater than 10^12. - T. D. Noe, Sep 24 2007
FORMULA
a(2n) = A020483(n) = A054906(n) - T. D. Noe, Sep 24 2007
EXAMPLE
sigma(74+7) = 121 = sigma(74)+7, so a(7) = 74.
MATHEMATICA
Table[k=1; While[DivisorSigma[1, k+n] != DivisorSigma[1, k]+n, k++ ]; k, {n, 22}] - T. D. Noe, Sep 24 2007
PROG
(PARI) a(n) = {my(k=1); while(sigma(k+n) != sigma(k) + n, k++); k; } \\ Michel Marcus, May 23 2018
CROSSREFS
KEYWORD
nonn,hard,nice,more
STATUS
approved