login
A333845
a(1) = a(3) = 0, and otherwise a(n) is the least multiple of prime(n) whose decimal representation ends with that of prime(n+1).
1
0, 15, 0, 511, 913, 117, 119, 323, 529, 1131, 837, 3441, 943, 1247, 4653, 159, 4661, 2867, 871, 4473, 1679, 6083, 6889, 6497, 71101, 81103, 7107, 52109, 17113, 54127, 32131, 82137, 20139, 82149, 104151, 16157, 119163, 148167, 3173, 73179, 150181, 38191, 157193, 44197, 13199
OFFSET
1,2
COMMENTS
This is a variant of A333577 where prime(n) and prime(n+1) are switched.
Some particular results:
a(n) = prime(n) * prime(n+1) for a(2) = 3*5,
a(n) = prime(n) * prime(n-1) for a(8) = 19*17,
a(n) = prime(n)^2 for a(9) = 23^2 or a(23) = 83^2,
a(n) = concatenation of prime(n-1) and prime(n+1) for a(4) = 511.
EXAMPLE
For prime(3) = 5 and prime(4) = 7, there does not exist any integer that ends with 7 and is divisible by 5, hence a(3)=0.
For prime(6) = 13 and prime(7) = 17, 117 ends with 17 and 117 = 9*13 is divisible by 13, and no integer < 117 satisfies these two conditions, so a(6) = 117.
MATHEMATICA
a[1] = a[3] = 0; a[n_] := Module[{p = Prime[n], q, r}, q = NextPrime[p]; r = 10^Ceiling[Log10[q]]; While[!Divisible[q, p], q += r]; q]; Array[a, 45] (* Amiram Eldar, Apr 08 2020 *)
PROG
(PARI) a(n) = {if ((n==1) || (n==3), return(0)); my(q = prime(n+1), p = prime(n), x = q, k = 0); until ((x % p) == 0, k++; x = eval(concat(Str(k), Str(q))); ); x; } \\ Michel Marcus, Apr 08 2020
(PARI) a(n) = { if (n==1 || n==3, 0, my (p=prime(n), q=nextprime(p+1)); lift(chinese(Mod(0, p), Mod(q, 10^#digits(q))))) } \\ Rémy Sigrist, Apr 09 2020
CROSSREFS
Cf. A333577.
Sequence in context: A225346 A225312 A370335 * A015908 A361355 A366146
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Apr 08 2020
EXTENSIONS
More terms from Michel Marcus, Apr 08 2020
STATUS
approved