A217297 Triprimes (numbers that are a product of exactly three primes: A014612) that become cubes when their central digit or central pair of digits is deleted.
207, 604, 654, 2007, 2037, 2057, 2067, 2097, 2107, 2197, 2247, 2337, 2367, 2387, 2397, 2527, 2547, 2597, 2607, 2637, 2667, 2697, 2717, 2737, 2817, 2847, 2877, 2937, 2967, 6014, 6034, 6044, 6054, 6094, 6114, 6124, 6154, 6194, 6214, 6234, 6254, 6284, 6294, 6394
Offset: 1
Examples
207 = 3*3*23 is a term: it becomes the cube 27 when the central digit is deleted. 2007 = 3*3*223 is a term: it becomes the cube 27 when the two central digits are deleted. Here is a larger example taken at random from the b-file: 4178131923 = (3) (7) (198958663) Delete the central pair of digits and we get a cube: 41781923 = 347^3. - _N. J. A. Sloane_, Dec 19 2020
Links
- Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
cdn[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];If[OddQ[ len],FromDigits[ Drop[idn,{(len+1)/2}]],FromDigits[Drop[idn,{len/2,len/2+1}]]]]; Select[Range[100,100000],PrimeOmega[#]==3 && IntegerQ[ Surd[ cdn[#],3]]&] (* Harvey P. Dale, Dec 19 2020 *)
-
R
library(gmp); removecentraldigit<-function(x) { s=as.character(x); n=nchar(s); as.bigz(paste(substr(s,1,ifelse(n%%2==0,n/2-1,(n-1)/2)), substr(s,ifelse(n%%2==0,n/2+2,(n+3)/2),n),sep=""))}; istriprime=function(x) ifelse(as.bigz(x)<8,F,length(factorize(x))==3); iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0)); which(sapply(201:6400, function(x) istriprime(x) & iscube(removecentraldigit(x))))+200
Extensions
Edited by N. J. A. Sloane, Dec 19 2020
Comments