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.

Showing 1-3 of 3 results.

A152864 Deficiency of n, plus the number of proper divisors of n: a(n) = 2n - sigma(n) + d(n) - 1.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 7, 4, 7, 5, 11, 1, 13, 7, 9, 5, 17, 2, 19, 3, 13, 11, 23, -5, 21, 13, 17, 5, 29, -5, 31, 6, 21, 17, 25, -11, 37, 19, 25, -3, 41, -5, 43, 9, 17, 23, 47, -19, 43, 12, 33, 11, 53, -5, 41, -1, 37, 29, 59, -37, 61, 31
Offset: 1

Views

Author

Omar E. Pol, Dec 14 2008

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 2*n - Differences[DivisorSigma[{0, 1}, n]][[1]] - 1; Array[a, 100] (* Amiram Eldar, Apr 07 2024 *)
  • PARI
    a(n) = 2*n - sigma(n) + numdiv(n) - 1; \\ Amiram Eldar, Apr 07 2024

Formula

a(n) = A005843(n)-A000203(n)+A000005(n)-1 = A033879(n)+A032741(n).

A366969 a(n) = Sum_{k=3..n} (k-2) * floor(n/k).

Original entry on oeis.org

0, 0, 1, 3, 6, 11, 16, 24, 32, 43, 52, 69, 80, 97, 114, 136, 151, 179, 196, 227, 252, 281, 302, 347, 373, 408, 441, 486, 513, 570, 599, 651, 692, 739, 780, 854, 889, 942, 991, 1066, 1105, 1186, 1227, 1300, 1367, 1432, 1477, 1582, 1634, 1716, 1781, 1868, 1919, 2024
Offset: 1

Views

Author

Seiichi Manyama, Oct 30 2023

Keywords

Crossrefs

Partial sums of A152771.

Programs

  • PARI
    a(n) = sum(k=3, n, (k-2)*(n\k));
    
  • Python
    from math import isqrt
    def A366969(n): return n+(-(s:=isqrt(n))*(s*(s-2)-7)+sum(((q:=n//w)+1)*(q+(w<<1)-8) for w in range(1,s+1))>>1) # Chai Wah Wu, Oct 30 2023

Formula

G.f.: 1/(1-x) * Sum_{k>=1} x^(3*k)/(1-x^k)^2 = 1/(1-x) * Sum_{k>=3} (k-2) * x^k/(1-x^k).
a(n) = n + A024916(n) - 2*A006218(n). - Chai Wah Wu, Oct 30 2023

A152772 a(n) = sigma(n) - 3*d(n) + 3.

Original entry on oeis.org

1, 0, 1, 1, 3, 3, 5, 6, 7, 9, 9, 13, 11, 15, 15, 19, 15, 24, 17, 27, 23, 27, 21, 39, 25, 33, 31, 41, 27, 51, 29, 48, 39, 45, 39, 67, 35, 51, 47, 69, 39, 75, 41, 69, 63, 63, 45, 97, 51, 78, 63, 83, 51, 99, 63, 99, 71, 81, 57, 135
Offset: 1

Views

Author

Omar E. Pol, Dec 14 2008

Keywords

Crossrefs

Cf. A000005 (d), A000203 (sigma), A152770, A152771.

Programs

  • Mathematica
    a[n_] := DivisorSigma[1, n] - 3 * DivisorSigma[0, n] + 3; Array[a, 100] (* Amiram Eldar, Apr 07 2024 *)
  • PARI
    a(n) = sigma(n) - 3 * numdiv(n) + 3; \\ Amiram Eldar, Apr 07 2024
Showing 1-3 of 3 results.