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.

Showing 1-1 of 1 results.

A294386 a(n) is the smallest number whose deficiency or abundance is equal to 2*n, or a(n) = 0 if such a number does not exist.

Original entry on oeis.org

6, 3, 5, 7, 22, 11, 13, 27, 17, 19, 46, 23, 112, 58, 29, 31, 250, 57, 37, 55, 41, 43, 94, 47, 60, 106, 53, 87, 84, 59, 61, 85, 108, 67, 142, 71, 73, 712, 158, 79, 156, 83, 405, 115, 89, 141, 406, 119, 97, 202, 101, 103, 214, 107, 109, 145, 113, 177, 418, 143, 120, 243, 192, 127, 262, 131, 261, 274, 137, 139, 574, 185
Offset: 0

Views

Author

Michel Marcus and Omar E. Pol, Oct 29 2017

Keywords

Comments

If A096502(n) <> 0, i.e., there is a prime p of the form 2^k - 2*n - 1, then 0 < a(n) <= 2^(k-1)*p since 2^(k-1)*p has deficiency 2*n. - Robert Israel, Oct 29 2017

Crossrefs

Bisection of A294347.
First differs from A217769 at a(12).

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    count:= 0:
    for n from 1 while count < N+1 do
      d:= abs(2*n - numtheory:-sigma(n));
      if d::even and d <= 2*N and not assigned(A[d/2]) then
        count:= count+1; A[d/2]:= n;
      fi
    od:
    seq(A[i],i=0..N); # Robert Israel, Oct 29 2017
  • PARI
    a033879(n) = 2*n-sigma(n)
    a(n) = my(k=1); while(1, if(abs(a033879(k))==2*n, return(k)); k++) \\ Felix Fröhlich, Oct 29 2017
Showing 1-1 of 1 results.