A074837 Numbers k such that the penultimate 3 divisors of k sum to k.
6, 18, 42, 54, 66, 78, 102, 114, 126, 138, 162, 174, 186, 198, 222, 234, 246, 258, 282, 294, 306, 318, 342, 354, 366, 378, 402, 414, 426, 438, 462, 474, 486, 498, 522, 534, 546, 558, 582, 594, 606, 618, 642, 654, 666, 678, 702, 714, 726, 738, 762, 774, 786
Offset: 1
Examples
18 has the divisors 1,2,3,6,9,18. The penultimate 3 are 3,6,9, which sum to 18.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
Programs
-
Mathematica
Select[Range[1000],Length[Divisors[ # ]]>3 && Sum[Divisors[ # ][[ -i]],{i,2,4}]==# &] (* Stefan Steinerberger, Aug 01 2007 *) p3dQ[n_]:=Module[{d=Divisors[n]},Length[d]>3&&Total[Take[Most[d],-3]] == n]; Select[Range[800],p3dQ] (* Harvey P. Dale, Dec 06 2012 *)
-
PARI
for (n=1,800,dn=divisors(n); dnl=length(dn); if (dnl>3,if (n==dn[dnl-1]+dn[dnl-2]+dn[dnl-3],print1(n, ", "))))
-
PARI
is(n) = n%12 == 6 && n % 5 != 0 \\ David A. Corneth, Jun 18 2021
-
Python
from sympy import divisors def ok(n): d = divisors(n); return False if len(d)<4 else n==sum(d[-4:-1]) print(list(filter(ok, range(800)))) # Michael S. Branicky, Jun 18 2021
Formula
a(n) = a(n-4) + 60. - David A. Corneth, Jun 18 2021
From Chai Wah Wu, Apr 16 2024: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 5.
G.f.: x*(6*x^4 + 12*x^3 + 24*x^2 + 12*x + 6)/(x^5 - x^4 - x + 1). (End)
Extensions
More terms from Stefan Steinerberger, Aug 01 2007
Comments