A339578 Numbers k such that k^3 can be obtained by taking a number m that is the product of exactly three primes (cf. A014612) and deleting the central digit if m has an odd number of digits, or by deleting the central pair of digits if m has an even number of digits.
3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 47, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99, 217, 219, 221, 223, 227, 229, 231, 233, 237, 239, 241, 243, 247, 249, 251, 253, 257, 259, 261, 263, 267, 269, 271, 273, 277, 279, 281, 283, 287, 289
Offset: 1
Examples
3 is a term because 3^3 = 27 can be obtained by deleting the central digit of 3*3*23 = 207. 4 is a term because 4^3 = 64 can be obtained by deleting the central pair of digits of 2*31*97 = 6014. 20 is not a term because 20^3 = 8000, and any candidate for m will end in 00, and therefore will have at least four prime factors.
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
p3oQ[x_]:=AnyTrue[Table[With[{td=TakeDrop[IntegerDigits[x],IntegerLength[ x]/2]},FromDigits[ Flatten[ Join[ {td[[1]],{v},td[[2]]}]]]],{v,0,9}],PrimeOmega[#] == 3&]; p3eQ[x_]:= AnyTrue[ Table[With[ {td=TakeDrop[ IntegerDigits[x],IntegerLength[ x]/2]},FromDigits[Flatten[ Join[ {td[[1]],PadLeft[{w},2],td[[2]]}]]]],{w,0,99}],PrimeOmega[#]==3&]; p3Q[m_]:=p3oQ[m] || p3eQ[m]; Module[{rng={Ceiling[Reduce[k^3>#,k][[-1]]],Floor[Reduce[k^3<10#,k][[-1]]] }&/@ Table[10^(2n-1),{n,4}]},Surd[#,3]&/@Select[Flatten[Table[w^3,{w,#[[1]],#[[2]]}]&/@ rng],p3Q]] // Quiet (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 20 2020 *)
-
PARI
is(n) = { my(d = digits(n^3), half); if(#d % 2 == 1, return(0)); half = #d \ 2; left = vector(half, i, d[i]); right = vector(half, i, d[i + half]); for(j = 1, 2, c = fromdigits(left) * 10^(half + j) + fromdigits(right); for(i = 0, 10^j - 1, if(bigomega(c + i*10^half) == 3, print(c + i*10^half); return(1) ) ) ); 0 } \\ David A. Corneth, Dec 20 2020
Comments