The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A279907 Triangle read by rows: T(n,k) is the smallest power of n that is divisible by k, or -1 if no such power exists. 4
0, 0, 1, 0, -1, 1, 0, 1, -1, 1, 0, -1, -1, -1, 1, 0, 1, 1, 2, -1, 1, 0, -1, -1, -1, -1, -1, 1, 0, 1, -1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, -1, -1, -1, 1, 0, 1, -1, 2, 1, -1, -1, 3, -1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0, 1, 1, 1, -1, 1, -1, 2, 2, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,19
COMMENTS
T(n,1) = 0 since 1 | n^0.
T(n,p) = 1 for prime divisors p of n since p | n^1.
T(n,d) = 1 for divisors d > 1 of n since d | n^1.
Row n for prime p have maximum value 1, since all k < p are coprime to p, and k | p^1 only when k = p.
Values greater than 1 pertain only to composite k of composite n > 4, but not in all cases. T(n,k) = 1 for squarefree kernels k of composite n.
T(n,k) = -1 for numbers k > 1 coprime to n and for numbers that are products of at least one prime q coprime to n and one prime p | n.
T(n,k) is nonnegative for all numbers k for which n^k (mod k) = 0, i.e., all the prime divisors p of k also divide n.
The largest possible value s in row n of T = floor(log_2(n)), since the largest possible multiplicity of any number m <= n pertains to perfect powers of 2, as 2 is the smallest prime. This number s first appears at T(2^s + 2, 2^s) for s > 1.
If T(n,k) is positive, 1/k terminates T(n,k) digits after the radix point in base n. If T(n,k) is negative, 1/k is recurrent in base n.
From Robert Israel, Dec 28 2016: (Start)
T(a*b,c*d) = max(T(a,c),T(b,d)) if GCD(a,b)=1, GCD(b,d)=1,T(a,c)>=0 and T(b,d)>=0.
T(n,a*b) = max(T(n,a),T(n,b)) if GCD(a,b)=1 and T(n,a)>=0 and T(n,b)>=0. (End)
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..11325 (rows 1 <= n <= 150)
EXAMPLE
The triangle T(n,k) begins (with -1 shown as "." for clarity):
n\k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
1: 0
2: 0 1
3: 0 . 1
4: 0 1 . 1
5: 0 . . . 1
6: 0 1 1 2 . 1
7: 0 . . . . . 1
8: 0 1 . 1 . . . 1
9: 0 . 1 . . . . . 1
10: 0 1 . 2 1 . . 3 . 1
11: 0 . . . . . . . . . 1
12: 0 1 1 1 . 1 . 2 2 . . 1
13: 0 . . . . . . . . . . . 1
14: 0 1 . 2 . . 1 3 . . . . . 1
15: 0 . 1 . 1 . . . 2 . . . . . 1
...
MAPLE
f:= proc(n, k) local Fk, Fn, i;
if k = 1 then return 0 fi;
Fk:= ifactors(k)[2];
Fn:= map(t -> padic:-ordp(n, t[1]), Fk);
if min(Fn) = 0 then -1 else max(seq(ceil(Fk[i, 2]/Fn[i]), i=1..nops(Fk))) fi
end proc:
seq(seq(f(n, k), k=1..n), n=1..20); # Robert Israel, Dec 28 2016
MATHEMATICA
Table[Boole[k == 1] + (Boole[#[[-1, 1]] == 1] (-1 + Length@ #) /. 0 -> -1) &@ NestWhileList[Function[s, {#1/s, s}]@ GCD[#1, #2] & @@ # &, {k, n}, And[First@ # != 1, ! CoprimeQ @@ #] &], {n, 16}, {k, n}] // Flatten (* or *)
Table[SelectFirst[Range[0, Floor@ Log2@ n], PowerMod[n, #, k] == 0 &] /. k_ /; MissingQ@ k -> -1, {n, 12}, {k, n}] // TableForm (* Version 10.2 *)
CROSSREFS
Cf.: A010846 (number of nonnegative k in row n), A162306 (k with nonnegative values in a(n)), A051731 (k with values 0 or 1), A000005 (number of k in row n with values 0 or 1), A272618 (k with values > 1), A243822 (number of k in row n with values > 1), A007947.
Sequence in context: A324966 A005090 A073490 * A225654 A236747 A194285
KEYWORD
tabl,sign,easy
AUTHOR
Michael De Vlieger, Dec 26 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 8 08:55 EDT 2024. Contains 373207 sequences. (Running on oeis4.)