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.

A295043 a(n) is the largest number k such that sigma(k) = 2^n or 0 if no such k exists.

This page as a plain text file.
%I A295043 #22 Dec 20 2024 02:41:44
%S A295043 1,0,3,7,0,31,0,127,217,381,889,0,3937,8191,11811,27559,57337,131071,
%T A295043 253921,524287,1040257,1777447,4063201,7281799,16646017,32247967,
%U A295043 66584449,116522119,225735769,516026527,1073602561,2147483647,4294434817,7515217927,15032385529
%N A295043 a(n) is the largest number k such that sigma(k) = 2^n or 0 if no such k exists.
%C A295043 If a(n) > 0, then it is a term of A046528 (numbers that are a product of distinct Mersenne primes).
%H A295043 Amiram Eldar, <a href="/A295043/b295043.txt">Table of n, a(n) for n = 0..250</a>
%H A295043 Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp).
%F A295043 a(A078426(n)) = 0.
%F A295043 a(A180221(n)) > 0.
%F A295043 a(n) <= 2^n - 1 with equality when n is a Mersenne exponent (A000043). - _Michael B. Porter_, Nov 14 2017
%e A295043 a(0) = 1 because 1 is the largest number k with sigma(k) = 1 = 2^0.
%e A295043 a(5) = 31 because 31 is the largest number k with sigma(k) = 32 = 2^5.
%e A295043 a(6) = 0 because there is no number k with sigma(k) = 64 = 2^6.
%o A295043 (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
%o A295043 (PARI) a(n) = forstep(k=2^n, 1, -1, if (sigma(k)==2^n, return (k))); return (0) \\ _Rémy Sigrist_, Jan 08 2018
%o A295043 (PARI) a(n) = invsigmaMax(1<<n); \\ _Amiram Eldar_, Dec 20 2024, using _Max Alekseyev_'s invphi.gp
%Y A295043 Cf. A000043, A000203, A046528, A048947, A057637, A180221.
%Y A295043 Cf. A247956 (the smallest number k instead of the largest).
%Y A295043 Cf. A078426 (no solution to the equation sigma(x)=2^n).
%Y A295043 A000668 (Mersenne primes) is a subsequence.
%K A295043 nonn
%O A295043 0,3
%A A295043 _Jaroslav Krizek_, Nov 13 2017