

A113572


Least ndigit multiple of n such that the rth digit is prime if r is a prime else it is composite. The location and value of the most significant digit is 1. 0 if no such number exists.


2



1, 12, 123, 1224, 12245, 122424, 1224265, 12242424, 122424246, 0, 12242424447, 122424244428, 1224242444243, 12242424442458, 0, 1224242444242448, 12242424442424692, 122424244424244828, 1224242444242444367, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(5*t)=0, for all t>1. This is because the last digit of 5*t is always 0 or 5 yet we require this digit to be composite for t>1. There are no other zero terms below a(10000). Conjecture: No other term is zero.
Because 0 is neither prime nor composite, it does not appear in any nonzero term. The digit 1 may appear only as the first digit of a term.


LINKS

Sean A. Irvine, Table of n, a(n) for n = 1..1000


EXAMPLE

a(6) = 122424, the first digit is 1, the 2nd, 3rd and the 5th digits are primes and the 4th and 6th digit are composite.


MATHEMATICA

okQ[n_]:=Module[{d=IntegerDigits[n], ok, i=1}, ok=(d[[1]]==1); While[i<Length[d]&&ok, i++; ok=If[PrimeQ[i], MemberQ[{2, 3, 5, 7}, d[[i]]], MemberQ[{4, 6, 8, 9}, d[[i]]]]]; ok]; Table[mn=Ceiling[10^(n1)/n]; mx=Floor[(10^n1)/n]; i=mn; While[i<mx&&!okQ[i*n], i++]; If[i<=mx, i*n, 0], {n, 8}] (* slow *)


CROSSREFS

Cf. A113573.
Sequence in context: A278983 A079847 A144165 * A037701 A037610 A035239
Adjacent sequences: A113569 A113570 A113571 * A113573 A113574 A113575


KEYWORD

base,easy,nonn


AUTHOR

Amarnath Murthy, Nov 06 2005


EXTENSIONS

Corrected and extended by R. J. Mathar, Aug 29 2007
More terms from Sean A. Irvine, Jan 17 2011


STATUS

approved



