%I #20 Mar 02 2023 14:14:27
%S 20,36,56,66,80,84,96,104,108,140,156,176,192,200,204,216,224,260,272,
%T 276,300,308,320,336,360,368,380,392,396,416,440,444,456,464,476,486,
%U 500,516,528,540,546,560,572,576,608,612,620,636,644,650,680,696,704
%N Abundant numbers that differ from the next abundant number by 4.
%H Muniru A Asiru, <a href="/A316098/b316098.txt">Table of n, a(n) for n = 1..10000</a>
%e 20 is abundant, 21, 22 and 23 are deficient, 24 is abundant.
%e 36 is abundant, 37, 38 and 39 are deficient, 40 is abundant.
%p with(numtheory): A:=select(n->sigma(n)>2*n,[$1..800]): a:=seq(A[i],i in select(n->A[n+1]-A[n]=4,[$1..nops(A)-1]));
%t q[n_] := DivisorSigma[1,n] > 2 n; Select[Range[704], q[#] && q[# + 4] && ! q[# + 1] && ! q[# + 2] && ! q[# + 3] &] (* _Giovanni Resta_, Jul 01 2018 *)
%t SequencePosition[Table[If[DivisorSigma[1,n]>2n,1,0],{n,750}],{1,0,0,0,1}][[;;,1]] (* _Harvey P. Dale_, Mar 02 2023 *)
%o (GAP) A:=Filtered([1..800],n->Sigma(n)>2*n);; a:=List(Filtered([1..Length(A)-1],i->A[i+1]-A[i]=4),j->A[j]);
%Y Subsequence of A005101.
%Y Abundant numbers that differ from the next abundant number by k: A096399 (k=1), A228382 (k=3), this sequence (k=4), A306497 (k=5), A316099 (k=6).
%K nonn
%O 1,1
%A _Muniru A Asiru_, Jun 25 2018
|