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.

A348335 a(n) = smallest k such that the sum of the divisors of the n numbers from k to k+n-1 equals sigma(k+n), or -1 if no such k exists.

Original entry on oeis.org

14, 1, 591357
Offset: 1

Views

Author

Metin Sariyar, Oct 13 2021

Keywords

Comments

a(4) > 10^9, if it exists. - Amiram Eldar, Oct 13 2021

Examples

			a(1) = 14 because sigma(14) = sigma(15) = 24; a(1) = A002961(1).
a(2) = 1 because sigma(1) + sigma(2) = 1 + 3 = 4, the same as sigma(3) = 4; a(2) = A104149(1).
a(3) = 591357 because sigma(591357) + sigma(591358) + sigma(591359) = 866880 + 890352 + 599760 = 2356992, the same as sigma(591360) = 2356992.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{sig = DivisorSigma[1, Range[n]], k = n + 1}, While[(s = DivisorSigma[1, k]) != Plus @@ sig, sig = Join[Drop[sig, 1], {s}]; k++]; k - n]; Array[a, 3] (* Amiram Eldar, Oct 29 2021 *)
  • PARI
    isok(m, nb) = sum(i=1, nb, sigma(m+i-1)) == sigma(m+nb);
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Oct 28 2021