OFFSET
0,3
COMMENTS
If a(n) > 0, then it is a term of A046528 (numbers that are a product of distinct Mersenne primes).
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..250
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems (invphi.gp).
FORMULA
a(A078426(n)) = 0.
a(A180221(n)) > 0.
a(n) <= 2^n - 1 with equality when n is a Mersenne exponent (A000043). - Michael B. Porter, Nov 14 2017
EXAMPLE
a(0) = 1 because 1 is the largest number k with sigma(k) = 1 = 2^0.
a(5) = 31 because 31 is the largest number k with sigma(k) = 32 = 2^5.
a(6) = 0 because there is no number k with sigma(k) = 64 = 2^6.
PROG
(PARI) a(n) = {local(r, k); r=0; for(k=1, 2^n, if(sigma(k) == 2^n, r=k)); return(r)}; \\ Michael B. Porter, Nov 14 2017
(PARI) a(n) = forstep(k=2^n, 1, -1, if (sigma(k)==2^n, return (k))); return (0) \\ Rémy Sigrist, Jan 08 2018
(PARI) a(n) = invsigmaMax(1<<n); \\ Amiram Eldar, Dec 20 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Nov 13 2017
STATUS
approved