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.

A294306 Irregular triangle read by rows: T(n, m) = total number of times the different values appear in row n of A280269, where 0 <= m <= A280274(n).

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Oct 30 2017

Keywords

Comments

The numbers i in A162306(n) divide n^k with k >= 0; these k are listed in row n of A280269.
Row 1 = 1 and T(n, 0) = 1 for all n, since 1 is the empty product and divides n^0.
Row p = 1, 1, (row length = 2) since the only divisors of p are 1 and p; 1 | p^0, and p | p^1.
Row p^e = 1, e, since the only numbers in A162306(p^e) are 1 and p^k for 1 <= k <= e.
Row length of a(n) > 2 for n with omega(n) > 1.
Total of row n = A010846(n).
Sum of terms of T(n, m) with m <= 1 in row n = A000005(n).
Sum of terms of T(n, m) with m > 1 = A243822(n).
Terms in row n of A294306 start at 1, generally quickly rise to a maximum, then gradually decline at m = A280274(n).

Examples

			Row n of A280269(10) = 0, 1, 2, 1, 3, 1, corresponding to A162306(10) = 1, 2, 4, 5, 8, 10, since 1 | 10^0, 2 | 10^1, 4 | 10^2, 5 | 10^1, 8 | 10^3, and 10 | 10^1. There is 1 zero, 3 ones, 1 two, and 1 three, thus a(10) = 1, 3, 1, 1. sum(a(10)) = A010846(10) = 6. Length of a(10) = A280274(10) + 1 = 4.
Triangle begins:
   1:  1
   2:  1  1
   3:  1  1
   4:  1  2
   5:  1  1
   6:  1  3  1
   7:  1  1
   8:  1  3
   9:  1  2
  10:  1  3  1  1
  11:  1  1
  12:  1  5  2
  13:  1  1
  14:  1  3  1  1
  15:  1  3  1
  16:  1  4
  17:  1  1
  18:  1  5  2  1  1
  19:  1  1
  20:  1  5  2
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Tally[#][[All, -1]] &@ Map[SelectFirst[Range[0, Floor@ Log2@ n], Function[k, Divisible[n^k, #]]] &, Select[Range@ n, PowerMod[n, Floor@ Log2@ n, #] == 0 &]], {n, 32}] // Flatten (* Michael De Vlieger, Oct 30 2017 *)

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.

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}]
Showing 1-3 of 3 results.