cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A378414 Sum of the integers from 1 to n that are not antidivisors of n.

Original entry on oeis.org

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

Views

Author

Paolo P. Lava, Nov 25 2024

Keywords

Comments

First two equal consecutive values for a(51) = a(52) = 1284.

Examples

			a(30) = 429 because 30*31/2 = 465, the antidivisors of 30 are 4, 12, 20 and 465 - 4 - 12 - 20 = 429.
		

Crossrefs

Programs

  • 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);
  • 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()))<Chai Wah Wu, Dec 03 2024

Formula

a(n) = A000217(n) - A066417(n).