login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269299 Maximum number of times a nine-digit number with non-repeating, nonzero digits can be divided by the n-th prime until a non-integer result is returned. 0
16, 13, 7, 7, 5, 5, 5, 4, 4, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Sequence was constructed with a simple game in mind, one done by hand or by calculator, where one takes a nine-digit number with non-repeating nonzero digits and divides it by three until a non-integer result is returned. The potential best play is then of interest for this game, or the maximum number of times three divides such a number. The sequence extends this idea to all primes under the same rules and outputs the maximum number of times the n-th prime divides a number in this form.

The largest such prime that would give a nonzero solution is the 6289143rd prime, namely 109739359.

LINKS

Table of n, a(n) for n=1..96.

EXAMPLE

For n=2, 3 divides 618597324 13 times, and this is the highest achievable valuation. In comparison, if the rules regarding nonzero and non-repeating were lifted, the number 3^18 = 387420489 would be allowed, and a(2) would be 18.

MAPLE

with(LinearAlgebra)*with(combinat)*with(numtheory):

A := permute(9):

B := 0:

for d to 6289143 do

a[d] := 0:

end do:

for i to factorial(9) do

B := ifactors(Determinant(Multiply(`<|>`(`<, >`(100000000), `<, >`(10000000), `<, >`(1000000), `<, >`(100000), `<, >`(10000), `<, >`(1000), `<, >`(100), `<, >`(10), `<, >`(1)), Transpose(convert(A[i], Matrix))))):

C := nops([op(B[2])]):

for j to C do

if a[pi(B[2, j, 1])] < B[2, j, 2] then

a[pi(B[2, j, 1])] := B[2, j, 2]:

end if:

end do:

end do:

seq(a[i], i = 1 .. 500);

MATHEMATICA

s = FromDigits /@ Permutations@ Range@ 9; Table[Max@ Map[Length@ NestWhileList[#/Prime@ n &, #, IntegerQ] &, s], {n, 40}] - 2 (* Michael De Vlieger, Feb 23 2016 *)

PROG

(PARI) a(n) = {my(p=prime(n)); my(mv = 0); for (i=0, 9!, mv = max(valuation(subst(Pol(numtoperm(9, i)), x, 10), p), mv); ); mv; } \\ Michel Marcus, Feb 26 2016

CROSSREFS

Sequence in context: A291426 A299524 A070534 * A070577 A184752 A291468

Adjacent sequences:  A269296 A269297 A269298 * A269300 A269301 A269302

KEYWORD

nonn,base

AUTHOR

Aaron Benham, Feb 21 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 02:16 EDT 2019. Contains 327088 sequences. (Running on oeis4.)