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.

A060685 Largest difference between consecutive divisors (ordered by size) of 2n+1.

Original entry on oeis.org

2, 4, 6, 6, 10, 12, 10, 16, 18, 14, 22, 20, 18, 28, 30, 22, 28, 36, 26, 40, 42, 30, 46, 42, 34, 52, 44, 38, 58, 60, 42, 52, 66, 46, 70, 72, 50, 66, 78, 54, 82, 68, 58, 88, 78, 62, 76, 96, 66, 100, 102, 70, 106, 108, 74, 112, 92, 78, 102, 110, 82, 100, 126, 86, 130, 114
Offset: 1

Views

Author

Labos Elemer, Apr 19 2001

Keywords

Comments

Equivalently, a(2n+1) = 2n+1 - (2n+1)/p, where p = A020639(2n+1) is the smallest prime divisor of 2n+1.
The even case is trivial: for 2k the largest difference is k.
Successively greater values of a(n) occur when 2n+1 is prime.

Examples

			For n=17, 2n+1=35; divisors={1,5,7,35}; differences={4,2,28}; a(17) = largest difference = 28 = 35 - 35/5.
		

Crossrefs

Cf. A060681.

Programs

  • Mathematica
    a[n_] := 2n+1-(2n+1)/FactorInteger[2n+1][[1, 1]]
    (* Second program: *)
    Table[Max@ Differences@ Divisors@ # &[2 n + 1], {n, 66}] (* Michael De Vlieger, Jul 15 2017 *)

Formula

a(n) = A060681(2n+1)

Extensions

Edited by Dean Hickerson, Jan 22 2002