cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A280274 a(n) is the maximum value in row n of A279907.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 3, 2, 1, 1, 4, 1, 2, 2, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 1, 3, 5, 2, 3, 1, 5, 3, 2, 1, 5, 1, 3, 2, 5, 1, 3, 1, 5, 3, 3, 1, 5, 2, 2, 3, 5, 1, 3, 1, 5, 2, 1, 2, 6, 1, 3, 3, 6, 1, 2, 1, 6, 3, 3, 2, 6, 1, 2, 1, 6, 1, 4, 2, 6, 4, 2, 1, 6, 2, 3, 4, 6, 2, 4, 1, 6, 2, 3
Offset: 1

Views

Author

Michael De Vlieger, Dec 30 2016

Keywords

Comments

Consider integers 1 <= r <= n where all the prime divisors p of r also divide n. Call such r of n "regulars" of n, or "r regular to n".
Consider rho = smallest power e of n such that r | n^e. a(n) is the largest value of rho found among regular 1 <= r <= n of n.
For n=1, r=1 | n^0; since it is the only integer in the range 1 <= k <= n and since 1 is the empty product, a(1) = 0.
a(p) = 1 for prime p, since all 1 <= k <= n must either divide or be coprime to p; if k is coprime to p it is nonregular and does not qualify. Thus only k=1 and k=p divide some power of n; 1 | p^0 and p | p^1 by definition. Thus the largest value of rho among r={1,p} is 1.
a(p^x) = 1 for prime powers p^x with x >= 1, since the only regular 1 <= r <= p^x are divisors that are powers {1, p^1, p^2, ... p^(x-1), p^x}; since these r are all divisors d, d | n^1 by definition, thus the largest rho among these r is 1. Thus, a(n) = 1 for n with omega(n) = 1.
a(4) = 1 since all regular 1 <= r <= 4 divide 4; all divisors d divide n^1 by definition, thus the largest rho among these r is 1.
a(n) > 1 for composite n > 4, since there is at least one nondivisor regular ("semidivisor") 1 <= r <= n. (See A243822.) If r does not divide n, then it divides some power n^e with e > 1, since all the prime divisors p of r divide n. Another way to look at this is that the set of prime divisors p of semidivisor r is a subset of the set of prime divisors p of n, yet r does not itself divide n. The multiplicity of at least one prime divisor p of r exceeds that of the corresponding prime divisor p of n. The maximum possible multiplicity of any number m < n pertains to the largest power of 2 < n, thus the greatest possible value of rho = floor(log_2(n)).
a(n) for n = 2 (mod 4) = floor(log_2(n)), since such n is an odd multiple of 2. Thus the largest power of 2^x less than n has multiplicity x for 2 while that in n is 1. Any other prime divisor q of n has multiplicity less than that of 2. Thus 2^x | n^x, and the largest rho among 1 <= r <= n = x = floor(log_2(n)).
a(n) for squarefree n = floor(log_p(n)) = A280363(n), where p is the smallest distinct prime divisor of n.
Consider the standard form prime decomposition of n = p_1^e_1 * p_2^3_2 * ... p_i^e_i. a(n) for all other n is the maximum value of ceiling(floor(log_p_i(n))/e_i), i.e., ceiling(A280363(n)/e_i).
a(n) < n.
a(n) is the longest terminating base-n expansion of 1/r for 1 <= r <= n. Example: in base 10, the longest terminating expansion of 1/r is 3 for r = 8. 1/8 = .125. a(10) = 3.
Also maximum value in row n of A280269.

Examples

			Row n of A280269               a(n)
1:  0                          0
2:  0  1                       1
3:  0  1                       1
4:  0  1  1                    1
5:  0  1                       1
6:  0  1  1  2  1              2
7:  0  1                       1
8:  0  1  1  1                 1
9:  0  1  1                    1
10: 0  1  2  1  3  1           3
11: 0  1                       1
12: 0  1  1  1  1  2  2  1     2
13: 0  1                       1
14: 0  1  2  1  3  1           3
15: 0  1  1  2  1              2
16: 0  1  1  1  1              1
...
		

Crossrefs

Cf.: A162306, A279907 (T(n,k) with values for all 1 <= k <= n), A280269, A007947, A280363.

Programs

  • Mathematica
    Table[Function[f, Which[n == 1, 0, Length@ f == 1, 1, Max[f[[All, -1]]] == 1, Floor[Log[f[[1, 1]], n]], True, Max@ Map[With[{p = #1, e = #2}, Ceiling[Floor[Log[p, n]]/e]] & @@ # &, f]]][FactorInteger[n]], {n, 120}] (* most efficient, or *)
    Table[If[PrimeNu@ n == 1, 1, Max@Map[Function[k, SelectFirst[Range[0, #], PowerMod[n, #, k] == 0 &] /. m_ /; MissingQ@ m -> Nothing], Range@ n] &@ Floor@ Log2@ n], {n, 120}] (* Version 10.2, or *)
    Max@ DeleteCases[#, -1] & /@ Table[If[# == {}, -1, First@ #] &@ Select[Range[0, #], PowerMod[n, #, k] == 0 &] &@ Floor@ Log2@ n, {n, 120}, {k, n}] (* or *)
    Max@ DeleteCases[#, -1] & /@ 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, 120}, {k, n}]

A286563 Triangular table T(n,k) read by rows: T(n,1) = 1, and for 1 < k <= n, T(n,k) = the highest exponent e such that k^e divides n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 3, 0, 1, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, May 20 2017

Keywords

Comments

T(n,k) > 0 for k in row n of A027750. - Michael De Vlieger, May 20 2017
Compare rows to those of triangle A279907, smallest exponent e of n divisible by k. The values of k > -1 in row n of A279907 pertain to k in row n of A162306 rather than k in row n of A027750. - Michael De Vlieger, May 21 2017

Examples

			The first fifteen rows of this triangular table:
  1,
  1, 1,
  1, 0, 1,
  1, 2, 0, 1,
  1, 0, 0, 0, 1,
  1, 1, 1, 0, 0, 1,
  1, 0, 0, 0, 0, 0, 1,
  1, 3, 0, 1, 0, 0, 0, 1,
  1, 0, 2, 0, 0, 0, 0, 0, 1,
  1, 1, 0, 0, 1, 0, 0, 0, 0, 1,
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  1, 2, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1,
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
  1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1,
  1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
		

Crossrefs

Lower triangular region of A286561.
Cf. A286564 (same triangle reversed).
Cf. A169594 (row sums).
Cf. also arrays A051731, A286158, A027750, A279907, A280269.

Programs

  • Maple
    T := (n, k) -> ifelse(k = 1, 1, padic:-ordp(n, k)):
    for n from 1 to 12 do seq(T(n, k), k = 1..n) od;  # Peter Luschny, Apr 07 2025
  • Mathematica
    Table[If[k == 1, 1, IntegerExponent[n, k]], {n, 15}, {k, n}] // Flatten (* Michael De Vlieger, May 20 2017 *)
  • Python
    def T(n, k):
        i=1
        if k==1: return 1
        while n%(k**i)==0:
            i+=1
        return i-1
    for n in range(1, 21): print([T(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 20 2017
  • Scheme
    (define (A286563 n) (A286561bi (A002024 n) (A002260 n))) ;; For A286561bi see A286561.
    

Formula

T(n,k) = A286561(n,k) listed row by row for n >= 1, k = 1 .. n.

A280269 Irregular triangle T(n,m) read by rows: smallest power e of n that is divisible by m = term k in row n of A162306.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 2, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 2, 1, 3, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, 1, 0, 1, 0, 1, 2, 1, 3, 1, 0, 1, 1, 2, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 1, 2, 4, 1, 0, 1, 0, 1, 1, 1, 2, 1, 2, 1, 0, 1, 1, 2, 1, 0, 1, 2, 3, 1, 4, 1, 0, 1, 0, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Michael De Vlieger, Dec 30 2016

Keywords

Comments

This table eliminates the negative values in row n of A279907.
Let k = A162306(n,m), i.e., the value in column m of row n.
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 two terms, {0,1}, the maximum value 1, since all k < p are coprime to p, and k | p^1 only when k = p.
Row n for prime power p^i have (i+1) terms, one zero and i ones, since all k that appear in corresponding row n of A162306 are divisors d of p^i.
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.
Numbers k > 1 coprime to n and numbers that are products of at least one prime q coprime to n and one prime p | n do not appear in A162306; these do not divide n^e evenly.
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.
1/k terminates T(n,k) digits after the radix point in base n for values of k that appear in row n of A162306.
Originally from Robert Israel at A279907: (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)

Examples

			Triangle T(n,m) begins:  Triangle A162306(n,k):
1:  0                    1
2:  0  1                 1  2
3:  0  1                 1  3
4:  0  1  1              1  2  4
5:  0  1                 1  5
6:  0  1  1  2  1        1  2  3  4  6
7:  0  1                 1  7
8:  0  1  1  1           1  2  4  8
9:  0  1  1              1  3  9
10: 0  1  2  1  3  1     1  2  4  5  8  10
...
		

Crossrefs

Cf. A162306, A279907 (T(n,k) with values for all 1 <= k <= n), A280274 (maximum values in row n), A010846 (number of nonnegative k in row n), A051731 (k with e <= 1), A000005 (number of k in row n with e <= 1), A272618 (k with e > 1), A243822 (number of k in row n with e > 1), A007947.

Programs

  • Mathematica
    Table[SelectFirst[Range[0, #], PowerMod[n, #, k] == 0 &] /. m_ /; MissingQ@ m -> Nothing &@ Floor@ Log2@ n, {n, 24}, {k, n}] // Flatten (* Version 10.2, or *)
    DeleteCases[#, -1] & /@ Table[If[# == {}, -1, First@ #] &@ Select[Range[0, #], PowerMod[n, #, k] == 0 &] &@ Floor@ Log2@ n, {n, 24}, {k, n}] // Flatten (* or *)
    DeleteCases[#, -1] & /@ 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, 24}, {k, n}] // Flatten
Showing 1-3 of 3 results.