proposed
approved
proposed
approved
editing
proposed
(Python)
from itertools import count, islice
from sympy import isprime
def A265181_gen(): # generator of terms
return filter(isprime, (int(str(k**3)*2)*10+1 for k in count(1)))
A265181_list = list(islice(A265181_gen(), 20)) # Chai Wah Wu, Feb 20 2023
approved
editing
editing
approved
Prime numbers resulting from the concatenation of at least two copies of a cubic number repeated at least twice and followed by a trailing "1."
proposed
editing
editing
proposed
Robert Israel, <a href="/A265181/b265181.txt">Table of n, a(n) for n = 1..10000</a>
N:= 20: # to get all terms with at most N digits
M:= floor((N-1)/2):
res:= {}:
for s from 1 to floor(10^(M/3)) do
x:= s^3;
m:= 1+ilog10(x);
for k from 2 to floor((N-1)/m) do
p:= x*add(10^(1+m*i), i=0..k-1)+1;
if isprime(p) then res:= res union {p} fi;
od
od:
sort(convert(res, list)); # Robert Israel, Jan 13 2016
proposed
editing
editing
proposed
Take[Sort@ Flatten[Select[#, PrimeQ] & /@ Table[FromDigits@ Append[Flatten@ IntegerDigits@ Table[n^3, {#}], 1] & /@ Range[2, 20], {n, 1, 300}] /. {} -> Nothing], 27] (* Michael De Vlieger, Jan 05 2016 *)
proposed
editing
editing
proposed