A111026 Perfect powers (A001597) of the form 3p + q + 3, p & q are primes.
16, 25, 27, 32, 49, 121, 125, 128, 169, 225, 243, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1000, 1225, 1331, 1369, 1681, 1849, 2025, 2048, 2187, 2197, 2209, 2401, 2809, 3025, 3125, 3375, 3481, 3721, 3969, 4225, 4489, 4913, 5041, 5329, 5625, 5929, 6241
Offset: 1
Keywords
Examples
a(5)=49 since 3*3+37+3=49 = 5*3+31+3 = 3*11+13+3 = 3*13+7+7 = 7^2. 6859 = 19^3 is in the sequence because there are 116 different ways to combine primes of the form 3p + q + 3, beginning with p=5 & q=6841 and ending with p=2281 & q=13.
Programs
-
Maple
with(numtheory); egcd := proc(n) local L; L:=map(proc(z) z[2] end, ifactors(n)[2]); igcd(op(L)) end: PW:=[]: for z to 1 do for j from 1 to 100 do for k from 1 to 100 do p:=ithprime(j); q:=ithprime(k); x:=3*p+q+3; if egcd(x)>1 and andmap(proc(w) not(w[3]=x) end, PW) then PW:=[op(PW), [p,q,x]] fi od od od; PW; map(proc(z) z[3] end, PW);
-
Mathematica
fQ[n_] := GCD @@ Last /@ FactorInteger@n > 1; lst = {}; Do[p = Prime@j; q = Prime@k; x = 3p + q + 3; If[fQ@x, AppendTo[lst, x]], {j, 340}, {k, PrimePi[6856 - 3Prime@j]}]; Union@lst (* Robert G. Wilson v *)
Formula
a(n)=3p+q+3 where p and q are primes and a(n) is a perfect power.
Extensions
Edited, corrected and extended by Robert G. Wilson v, Jun 21 2006
Comments