A239523 Prime powers (A025475) such that the distances to the two nearest prime powers are primes.
1, 25, 27, 32, 128, 512, 2048, 8192, 32768, 562949953421312
Offset: 1
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.
a(5) = 2 since the 5th powerful number, A001694(5) = 16, has 2 factorizations: 2^2 * 2^2 and 2^4. a(11) = 4 since the 11th powerful number, A001694(11) = 64, has 4 factorizations: 2^2 * 2^2 * 2^2, 2^2 * 2^4, 2^3 * 2^3, and 2^6.
f[p_, e_] := PartitionsP[e] - PartitionsP[e-1]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; seq[lim_] := Module[{pow = Union[Flatten[Table[i^2*j^3, {j, 1, Surd[lim, 3]}, {i, 1, Sqrt[lim/j^3]}]]]}, Select[s /@ pow, # > 0 &]]; seq[10^4]
s(n) = vecprod(apply(x -> numbpart(x)-numbpart(x-1), factor(n)[, 2])); pows(lim) = {my(p = List()); for(j = 1, sqrtnint(lim, 3), for(i = 1, sqrtint(lim \ j^3), listput(p, i^2 * j^3))); Set(p); } list(lim) = {my(p = pows(lim), v = List(), s1); for(k = 1, #p, s1 = s(p[k]); if(s1 > 0, listput(v, s1))); Vec(v);}
f[p_, e_] := PartitionsP[e] - PartitionsP[e-1]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; With[{lps = Cases[Import["https://oeis.org/A025487/b025487.txt", "Table"], {, }][[;; , 2]]}, sm = -1; seq = {}; Do[s1 = s[lps[[i]]]; If[s1 > sm, sm = s1; AppendTo[seq, lps[[i]]]], {i, 1, Length[lps]}]; seq]
For k = 32: k^2 = 1024, tau(1024) = 11, sigma(1024) = 2047 = 23*89. For k = 243, k^2 = 59049, tau(59049) = 11, sigma(59049) = 88573 = 23*3851. Up to 10000000, 453 terms were found.
Do[ s=DivisorSigma[ 0, n^2 ]; y=DivisorSigma[ 1, n^2 ]; If[ Equal[ Length[ FactorInteger[ n ] ], 1 ]&&!PrimeQ[ n ] &&PrimeQ[ s ]&&!PrimeQ[ y ], Print[ n ] ], {n, 1, 10000000} ]
23 is a prime and its reversal is 32 = 2^5.
a = {}; Do[ If[ PrimeQ[n], b = ToExpression[ StringReverse[ ToString[n]]]; If[ !PrimeQ[b] && Mod[b, b - EulerPhi[b]] == 0, a = Append[a, n]]], {n, 1, 10^6} ]; a Select[Prime[Range[80000]],PrimePowerQ[IntegerReverse[#]]&& CompositeQ[ IntegerReverse[ #]]&] (* Harvey P. Dale, Dec 25 2021 *)
lista(nn) = {forprime(p=2, nn, if (ispower(subst(Polrev(digits(p)), x, 10),,&pp) && isprime(pp), print1(p, ", ")););} \\ Michel Marcus, Jun 03 2016
33 = 546 - 513 = 2568 - 2535 = 6168 - 6135 = 458703 - 458670 = 885465 - 885432 = 1048608 - 1048575 = 6291480 - 6291447 = 37748688 - 37748655 = 125829345 - 125829312.
pp = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^16]]}, {i, 1, Log[ Prime[n], 10^16]}]]]; l = Length[pp]; d = Sort[Take[pp, -l + 1] - Take[pp, l - 1]]; Union[ Take[d, 10^5]]
n = prime(9750374) = 174689077, next prime = 174689101, mean = 174689089 = 13217^2, a prime power. The arithmetic mean of two consecutive primes is never prime, while between two consecutive primes, prime powers occur. These prime powers are in the middle of gap: p+d/2 = q^w. The prime power is most often square and very rarely occurs more than once (see A053706).
fi[x_] := FactorInteger[x] ff[x_] := Length[FactorInteger[x]] Do[s=(Prime[n]+Prime[n+1])/2; s1=ff[s]; If[Equal[s1,1],Print[{n,p=Prime[n],s,fi[s],s-p,s1}]], {n,1,10000000}] Select[Partition[Prime[Range[25*10^5]],2,1],PrimePowerQ[Mean[#]]&][[;;,1]] (* Harvey P. Dale, Oct 15 2023 *)
The first six terms of A053707 are 3,4,1,7,9,2, hence A053707(2) = 4 is the first and A053707(5) = 9 is the second local maximum of A053707.
{m=1; k=0; for(n=2,250000,if(matsize(factor(n))[1]==1&&factor(n)[1,2]>1,d=n-m; if((k<2||b
9 = 8 + 1. 25 = 16 + 9. 81 = 32 + 49. 125 = 121 + 4. 512 = 169 + 343. 5041 = 128 + 4913.
/* See Ratushnyak link. */
nn = 10000; p = Sort[Flatten[Table[Prime[n]^i, {n, PrimePi[Sqrt[nn]]}, {i, 2, Log[Prime[n], nn]}]]]; p = Join[{1}, p]; t = Union[Select[Flatten[Table[p[[i]] + p[[j]], {i, Length[p] - 1}, {j, i + 1, Length[p]}]], # <= nn &]]; Intersection[p, t] (* T. D. Noe, Apr 29 2013 *)
The sum of first 9 nontrivial prime powers is 4 + 8 + 9 + 16 + 25 + 27 + 32 + 49 + 64 = 234. Because 234 is divisible by 9, the latter is in the sequence.
Comments