A273527 a(n) is the smallest exponent > 1 such that p^a(n) begins with p, where p is the n-th prime.
8, 18, 24, 20, 26, 10, 166, 19, 48, 14, 58, 45, 205, 31, 248, 30, 49, 178, 3054, 122, 140, 294, 174, 80, 152, 233, 79, 920, 295, 359, 107, 308, 257, 8, 180, 96, 98, 34, 230, 921, 527, 164, 428, 901, 344, 88, 627, 1003, 192, 240, 50, 38, 1747, 609, 1028, 432, 122
Offset: 1
Examples
2^2 = 4, 2^3 = 8, 2^4 = 16, 2^5 = 32, 2^6 = 64, 2^7 = 128, 2^8 = 256; 3^2 = 9, 3^3 = 27, 3^4 = 81, 3^5 = 243, ..., 3^18 = 387420489.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..200
Programs
-
Maple
P:=proc(q) local b,d,k,n; for n from 1 to q do if isprime(n) then d:=ilog10(n); for k from 2 to q do b:=ilog10(n^k); if n=trunc(n^k/10^(b-d)) then print(k); break; fi; od; fi; od; end: P(10^6);
-
Mathematica
sep[n_]:=Module[{len=IntegerLength[n],idn=IntegerDigits[n],exp=2}, While[ Take[ IntegerDigits[ n^exp],len] != idn,exp++];exp]; sep/@Prime[ Range[ 60]] (* Harvey P. Dale, Jun 15 2016 *)
Comments