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.

A078730 Sum of products of two successive divisors of n.

Original entry on oeis.org

0, 2, 3, 10, 5, 26, 7, 42, 30, 62, 11, 116, 13, 114, 93, 170, 17, 242, 19, 280, 171, 266, 23, 476, 130, 366, 273, 528, 29, 713, 31, 682, 399, 614, 285, 1070, 37, 762, 549, 1150, 41, 1342, 43, 1264, 873, 1106, 47, 1916, 350, 1562, 921, 1752, 53, 2186, 665, 2166, 1143
Offset: 1

Views

Author

Vladeta Jovovic, Dec 20 2002

Keywords

Comments

a(n) = dot_product (d_1,d_2,...,d_(tau(n)-1))*(d_2,d_3,...d_tau(n)), where d_1
a(n) = n if and only if n is prime. - Robert Israel, May 05 2014
The 4th problem of the 43rd International Mathematical Olympiad asked to prove that a(n) < n^2 and determine when a(n) is a divisor of n^2? (answer is: iff n is prime). - Bernard Schott, Nov 28 2022

Crossrefs

Cf. A078713(n) = 2*A001157(n)-2*a(n)-n^2-1.
Cf. A027750.

Programs

  • Haskell
    a078730 n = sum $ zipWith (*) ps $ tail ps where ps = a027750_row n
    -- Reinhard Zumkeller, Dec 20 2014
    
  • Maple
    A078730:= proc(n)
    local d,i;
    d:= numtheory[divisors](n);
    add(d[i]*d[i+1], i=1..nops(d)-1)
    end proc;
    seq(A078730(n),n=1..100); # Robert Israel, May 05 2014
  • Mathematica
    f[n_] := Module[{d, l, s, i}, d = Divisors[n]; l = Length[d]; s = 0; For[i = 1, i < l, i++, s = s + d[[i + 1]]*d[[i]]]; s]; Table[ f[n], {n, 1, 100}]
    f[n_] := Plus @@ Times @@@ Partition[ Divisors@ n, 2, 1]; Array[f, 57] (* Robert G. Wilson v, Dec 18 2014 *)
  • PARI
    a(n) = my(d = divisors(n)); sum(k=1, #d-1, d[k]*d[k+1]); \\ Michel Marcus, Feb 15 2015

Formula

a(p^e) = p * (p^(2e) - 1) / (p^2 -1). - Bernard Schott, Nov 28 2022
n <= a(n) < n^2 for n > 1. a(n)/n^2 can be arbitrarily close to n (proof: let n be divisible by the numbers up to k, for large enough k). a(n) > n^(3/2) for n composite. - Charles R Greathouse IV, Nov 29 2022