The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A088621 a(n) = smallest prime which is a concatenation of 1, n, n^2, n^3, ... n^k for some k, or 0 if no such prime exists. 0

%I #12 Mar 21 2015 10:41:01

%S 11,0,13,0,0,0,17,0,19,0,111121,0,113,0,0,0

%N a(n) = smallest prime which is a concatenation of 1, n, n^2, n^3, ... n^k for some k, or 0 if no such prime exists.

%C a(2n)=a(5n)=0. Next term a(17) has 176 digits (k=16) and is too large to include in sequence. a(19), if it exists, has k>100. - _Ray Chandler_, Oct 18 2003

%e a(11) = 111121 which is a concatenation of 1, 11 and 121. value of k = 2.

%t f[n_] := Block[{k = FromDigits[Join[{1}, IntegerDigits[n]]], e = 1}, While[ !PrimeQ[k], e++; k = FromDigits[Join[IntegerDigits[k], IntegerDigits[n^e]]]]; k]; g[n_] := If[ Mod[n, 10] == 1 || Mod[n, 10] == 3 || Mod[n, 10] == 7 || Mod[n, 10] == 9, f[n], 0]; Table[ g[n], {n, 1, 17}] (* _Robert G. Wilson v_ *)

%Y Cf. A088619, A068702.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Oct 17 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 23 04:24 EDT 2024. Contains 374544 sequences. (Running on oeis4.)