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

A378414
Sum of the integers from 1 to n that are not antidivisors of n.
2
1, 3, 4, 7, 10, 17, 18, 28, 37, 41, 54, 65, 72, 89, 102, 122, 125, 143, 172, 186, 209, 217, 242, 277, 286, 327, 336, 360, 411, 429, 454, 470, 513, 565, 578, 634, 653, 671, 728, 765, 820, 837, 890, 950, 949, 1023, 1068, 1120, 1153, 1195, 1284, 1284, 1343, 1433
OFFSET
1,2
COMMENTS
First two equal consecutive values for a(51) = a(52) = 1284.
FORMULA
a(n) = A000217(n) - A066417(n).
EXAMPLE
a(30) = 429 because 30*31/2 = 465, the antidivisors of 30 are 4, 12, 20 and 465 - 4 - 12 - 20 = 429.
MAPLE
with(numtheory): P:=proc(q) local j, k, n, v; v:=[1];
for n from 2 to q do k:=0; j:=n; while j mod 2<>1 do k:=k+1; j:=j/2; od;
v:=[op(v), n*(n+1)/2-(sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2)];
od; op(v); end: P(10^2);
PROG
(Python)
from sympy import divisor_sigma
def A378414(n): return 1 if n == 1 else (n*(n+13)>>1)+2-divisor_sigma((m:=n<<1)-1)-divisor_sigma(m+1)-(divisor_sigma(n>>(k:=(~n&n-1).bit_length()))<<k+1) # Chai Wah Wu, Dec 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Nov 25 2024
STATUS
approved