login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest cube containing n-th prime as substring.
3

%I #17 Nov 19 2024 16:07:11

%S 27,343,125,27,91125,1331,1728,2197,103823,729,1331,3375,531441,343,

%T 250047,50653,6859,9261,12167,571787,97336,29791,5832,24389,2197,

%U 1191016,103823,10793861,1092727,11390625,13481272,13144256

%N Smallest cube containing n-th prime as substring.

%H John Cerkan, <a href="/A029947/b029947.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A029946(n)^3. - _Michel Marcus_, May 04 2017

%t Table[Function[p, k = 1; While[Length@ SequencePosition[ IntegerDigits[Set[c, k^3]], p] == 0, k++]; c]@ IntegerDigits@ Prime@ n, {n, 32}] (* _Michael De Vlieger_, May 04 2017, Version 10.1 *)

%t Module[{nn=300,cbs},cbs=Range[nn]^3;Table[SelectFirst[cbs,SequenceCount[IntegerDigits[#],IntegerDigits[p]]>0&],{p,Prime[Range[40]]}]] (* _Harvey P. Dale_, Nov 19 2024 *)

%Y Cf. A029945, A029946.

%K nonn,base

%O 1,1

%A _Patrick De Geest_