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”).

A179620
a(n) = largest k such that A002808(n+1) = A002808(n) + (A002808(n) mod k), or 0 if no such k exists.
2
0, 4, 7, 8, 8, 10, 13, 14, 14, 16, 19, 20, 20, 23, 24, 25, 26, 26, 28, 31, 32, 33, 34, 34, 37, 38, 38, 40, 43, 44, 44, 47, 48, 49, 50, 50, 53, 54, 55, 56, 56, 58, 61, 62, 63, 64, 64, 67, 68, 68, 70, 73, 74, 75, 76, 76, 79, 80, 80, 83, 84, 85, 86, 86, 89
OFFSET
1,2
COMMENTS
a(n) = A002808(n) - A073783(n) if A002808(n) - A073783(n) > A073783(n), 0 otherwise.
A002808(n): composite numbers; A073783(n): first difference of composite numbers.
LINKS
EXAMPLE
For n = 1 we have A002808(n) = 4, A002808(n+1) = 6; there is no k such that 6 - 4 = 2 = (4 mod k), hence a(1) = 0.
For n = 3 we have A002808(n) = 8, A002808(n+1) = 9; 7 is the largest k such that 9 - 8 = 1 = (8 mod k), hence a(3) = 7; a(3) = A002808(3) - A073783(3) = 8 - 1 = 7.
For n = 24 we have A002808(n) = 36, A002808(n+1) = 38; 34 is the largest k such that 38 - 36 = 2 = (36 mod k), hence a(24) = 34; a(24) = A002808(24) - A073783(24) = 34.
KEYWORD
nonn,easy
AUTHOR
Rémi Eismann, Jan 09 2011
STATUS
approved