OFFSET
1,1
COMMENTS
Since for k >= 2 all numbers of the form 6*k are abundant, the gap between consecutive abundant numbers is at most 6. Between them lie at most three odd numbers, of which at most two can be primes, because (3, 5, 7) is the only prime triplet and the smallest abundant number is 12.
If a(n) = 2 then A005101(n + 1) - A005101(n) = 6 (see proof below) and A005101(n) is divisible by 6. Since A005101(n) + 3 is divisible by 3, the two primes between them are A005101(n) + 1 and A005101(n) + 5, and their sum equals A005101(n) + A005101(n + 1).
Suppose two odd primes lie strictly between consecutive terms A005101(n) and A005101(n + 1). Let the gap be g = A005101(n + 1) - A005101(n).
If g < 4, there are fewer than two odd integers between the endpoints, so two distinct odd primes cannot occur.
If g = 4, the only possible odd integers in the open interval are A005101(n) + 1 and A005101(n) + 3. Then A005101(n) and A005101(n + 1) must both be even and one of them is divisible by 6. Consequently, among A005101(n) + 1 and A005101(n) + 3, one is divisible by 3, so at least one is composite -- a contradiction.
If g = 5, exactly two odd integers lie between the endpoints. Since one endpoint is divisible by 6, one of the odd numbers in between is divisible by 3 and hence not prime -- a contradiction.
Since g <= 6, the claim follows. (End)
LINKS
Felix Huber, Table of n, a(n) for n = 1..10000
FORMULA
0 <= a(n) <= 2.
EXAMPLE
MAPLE
with(NumberTheory):
A393350 := proc(N) # First N terms
local a, c, k, l, p, q;
a := Vector(N, 'datatype = integer[1]');
c := 0; k := 11; l := 0; q := 0;
do
k := k + 1;
if sigma(k) > 2*k then
p := pi(k);
if l <> 0 then
c := c + 1;
a[c] := p - q;
if c = N then
return convert(a, list);
end if;
end if;
l := k; q := p;
end if;
od;
end proc:
A393350(88);
MATHEMATICA
s={}; j=12; i=13; Do[Until[DivisorSigma[1, i]>2i, i++]; AppendTo[s, PrimePi[i]-PrimePi[j]]; j=i; i++, {n, 88}]; s (* James C. McMahon, Feb 17 2026 *)
PROG
(PARI) lista(nn) = my(v = select(x->(sigma(x) > 2*x), [1..nn])); vector(#v-1, k, primepi(v[k+1])-primepi(v[k])); \\ Michel Marcus, Feb 13 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Feb 13 2026
STATUS
approved
