A057897 Numbers which can be written as m^k-k, with m, k > 1.
2, 5, 7, 12, 14, 23, 24, 27, 34, 47, 58, 61, 62, 77, 79, 98, 119, 121, 122, 142, 167, 194, 213, 223, 238, 248, 252, 254, 287, 322, 340, 359, 398, 439, 482, 503, 509, 527, 574, 621, 623, 674, 723, 726, 727, 782, 839, 898, 959, 997, 1014, 1019, 1022, 1087, 1154
Offset: 1
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
nLim=1000; lst={}; Do[k=2; While[n=m^k-k; n<=nLim, AppendTo[lst, n]; k++ ], {m, 2, Sqrt[nLim]}]; Union[lst] (* T. D. Noe, Oct 06 2004 *)
-
PARI
ok(n)={my(e=2); while(2^e <= n+e, if(ispower(n+e, e), return(1)); e++); 0} \\ Andrew Howroyd, Oct 20 2020
-
PARI
upto(lim)={my(p=logint(lim,2)); while(logint(lim+p+1,2)>p, p++); Vec(Set(concat(vector(p-1, e, e++; vector(sqrtnint(lim+e,e)-1, m, (m+1)^e-e)))))} \\ Andrew Howroyd, Oct 20 2020
Comments