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.
%I A299145 #46 Jun 22 2025 01:03:24 %S A299145 2,5,13,29,97,139,353,4889,72353,353815699,42065402653,84998999651, %T A299145 102769130749,15622297824266188673,28101527071305611527, %U A299145 20896779938941631284493075599148668795944697935466419104293,105312291668560568089831550410013687058921146068446092937783402353 %N A299145 Primes of the form j^k + (j-1)^k + ... + 2^k, for j > 1 and k > 0. %C A299145 Except for the terms 2, 5, 13, 29, 139, the exponent k satisfies k >= 4. More generally, if Q(j) = j^k + (j-1)^k + ... + 2^k is a term, then j-1 is a divisor of A064538(k). This is because (j-1) is a factor of Q(j) and thus Q(j) is prime only if j-1 is a divisor of the denominator of Q(j), i.e. A064538(k). Thus for each k there is only a finite number of values of j to check. This provides an efficient algorithm to find terms of this sequence by looking only for primes in the numbers H_{j,-k} - 1 = j^k + (j-1)^k + ... + 2^k for j-1 a divisor of A064538(k). - _Chai Wah Wu_, Mar 06 2018 %H A299145 Chai Wah Wu, <a href="/A299145/b299145.txt">Table of n, a(n) for n = 1..45</a> (all terms < 10^1000). %e A299145 2 = 2^1; %e A299145 5 = 3^1 + 2^1; %e A299145 13 = 3^2 + 2^2; %e A299145 29 = 4^2 + 3^2 + 2^2; %e A299145 97 = 3^4 + 2^4; %e A299145 139 = 7^2 + 6^2 + 5^2 + 4^2 + 3^2 + 2^2; %e A299145 353 = 4^4 + 3^4 + 2^4; %e A299145 4889 = 4^6 + 3^6 + 2^6; %e A299145 72353 = 4^8 + 3^8 + 2^8; %t A299145 With[{nn = 350}, Sort@ Flatten@ Map[Select[#, PrimeQ] &, Table[Total[Range[j, 1, -1]^k] - 1, {j, 2, nn}, {k, nn - j}]]] (* _Michael De Vlieger_, Feb 03 2018 *) %o A299145 (PARI) limit=100000; v=vector(limit); for(n=1, ceil((-1+(1+8*limit)^(1/2))/2), for(k=1, logint(limit, n+0^(n-1)), a=sum(i=1,n,i^k)-1;if(isprime(a)&&a<limit+1, v[a]=1, ))); for(a=1, limit, if(v[a], print1(a", "))) %Y A299145 Cf. A007689, A074526, A064538. %K A299145 nonn %O A299145 1,1 %A A299145 _Gionata Neri_, Feb 03 2018 %E A299145 a(10)-a(15) from _Michael De Vlieger_, Feb 03 2018 %E A299145 a(16)-a(17) from _Chai Wah Wu_, Mar 07 2018