|
|
A068839
|
|
Smallest prime that ends with the right concatenation of first n odd numbers.
|
|
1
|
|
|
11, 31, 1531, 67531, 1397531, 311197531, 16131197531, 2515131197531, 71715131197531, 33191715131197531, 7621191715131197531, 232321191715131197531, 7252321191715131197531, 1327252321191715131197531, 322927252321191715131197531, 19312927252321191715131197531
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = 1397531 which contains as trailing digits the right concatenation of first 5 odd numbers 97531.
|
|
MATHEMATICA
|
a068839[n_] := Module[{}, a1=Flatten[Table[IntegerDigits[i], {i, n, 1, -2}]]; FromDigits[pref=1; a2=a1; While[ !PrimeQ[FromDigits[a2]], a2=Join[IntegerDigits[pref], a1]; pref+=1]; a2]]; Table[a068839[i], {i, 1, 33, 2}]
sp[n_]:=Module[{k=0, r=FromDigits[Flatten[IntegerDigits/@Reverse[Range[1, n, 2]]]]}, While[ !PrimeQ[ k*10^IntegerLength[r]+r], k++]; k*10^IntegerLength[r]+r]; Table[ sp[i], {i, 1, 33, 2}] (* Harvey P. Dale, May 25 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Vit Planocka (planocka(AT)mistral.cz), Oct 18 2002
|
|
STATUS
|
approved
|
|
|
|