OFFSET
1,1
COMMENTS
From David A. Corneth, Sep 02 2018: (Start)
Theorem: a(1) = 2, a(2) = 4; a(n) = n*(n-1) for n > 2.
Proof:
If a(n) is a square m^2 then the upper central divisor is m and by definition of the sequence the lower one is m-1. But m-1 and m are coprime, and (m-1)|m^2 implies m-1 = 1, i.e. a(n) = 4.
if a(n) is not a square then it has an even number of divisors with m and m-1 the central divisors, so it has the form m*(m-1), i.e. is oblong (see A002378). QED (End)
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..2000 [First 1000 terms from Harry J. Smith]
Index entries for linear recurrences with constant coefficients, signature (3, -3, 1).
FORMULA
Solutions to A033677(k) - A060775(k) = 1, where k = j*(j+1) and at least one of j and j+1 is composite.
Except at n < 5, this sequence satisfies a(n+1) = 3*a(n) - 3*a(n-1) + a(n-2). - Georgi Guninski, Jun 07 2010 [This follows from Corneth's theorem above. - N. J. A. Sloane, Sep 02 2018]
G.f.: (2*x^2-2*x+1)*(x^3-x^2-x-1) / (x-1)^3. - Colin Barker, Apr 16 2014 [This follows from Corneth's theorem above. - N. J. A. Sloane, Sep 02 2018]
EXAMPLE
The divisors of 2 are 1 and 2, so the upper central divisor is 2 and the lower central divisor is 1, so a(1)=2 is a member.
k = 4032 = 2*2*2*2*2*2*3*3*7 is here because its central divisors (the 21st and 22nd divisors) are {63,64} which differ by 1.
MATHEMATICA
dulcdQ[n_]:=Module[{d=Divisors[n], len}, len=Floor[Length[d]/2]; d[[len+1]] - d[[len]]==1]; Select[Range[2500], dulcdQ] (* or *) Join[{2, 4}, Table[ n(n-1), {n, 3, 60}]] (* after David A. Corneth's comment and formula *) (* Harvey P. Dale, Aug 28 2018 *)
PROG
(PARI) { n=-1; for (m=1, 999000, d=divisors(m); if (m==1 || (d[1 + length(d)\2] - d[length(d)\2]) == 1, write("b060798.txt", n++, " ", m)); ) } \\ Harry J. Smith, Jul 13 2009
(PARI) first(n) = res = List([2, 4]); for(i = 3, n, listput(res, i*(i-1))); res \\ David A. Corneth, Sep 02 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Apr 27 2001
EXTENSIONS
Start and offset changed by N. J. A. Sloane, Sep 02 2018 at the suggestion of Harvey P. Dale. Further edited by N. J. A. Sloane, Sep 02 2018
STATUS
approved