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.

A294393 a(n) is the smallest number whose deficiency or abundance is equal to 2*n (or 0 if such a number does not exist), minus the n-th odd number.

Original entry on oeis.org

5, 0, 0, 0, 13, 0, 0, 12, 0, 0, 25, 0, 87, 31, 0, 0, 217, 22, 0, 16, 0, 0, 49, 0, 11, 55, 0, 32, 27, 0, 0, 22, 43, 0, 73, 0, 0, 637, 81, 0, 75, 0, 320, 28, 0, 50, 313, 24, 0, 103, 0, 0, 109, 0, 0, 34, 0, 62, 301, 24, -1, 120, 67, 0, 133, 0, 128, 139, 0, 0, 433, 42, 23, 151, 0, 0, 219, 82, 0, 28, 119
Offset: 0

Views

Author

Omar E. Pol, Oct 30 2017

Keywords

Comments

Note that a(60) = -1.

Examples

			--------------------------------------
n    A294386(n) - A005408(n)  =  a(n)
--------------------------------------
0        6            1           5
1        3            3           0
2        5            5           0
3        7            7           0
4       22            9          13
...
		

Crossrefs

Programs

  • PARI
    f(n) = abs(2*n-sigma(n));
    a(n) = my(k=1); while(f(k) != 2*n, k++); k - (2*n+1); \\ Michel Marcus, Oct 31 2017

Formula

a(n) = A294386(n) - A005408(n).