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.

User: Dario T. de Castro

Dario T. de Castro's wiki page.

Dario T. de Castro has authored 7 sequences.

A356718 T(n,k) is the total number of prime factors, counted with multiplicity, of k!*(n-k)!, for 0 <= k <= n. Triangle read by rows.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 5, 4, 3, 3, 4, 5, 7, 5, 5, 4, 5, 5, 7, 8, 7, 6, 6, 6, 6, 7, 8, 11, 8, 8, 7, 8, 7, 8, 8, 11, 13, 11, 9, 9, 9, 9, 9, 9, 11, 13, 15, 13, 12, 10, 11, 10, 11, 10, 12, 13, 15, 16, 15, 14, 13, 12, 12, 12
Offset: 0

Author

Dario T. de Castro, Aug 24 2022

Keywords

Comments

k!*(n-k)! is the denominator in binomial(n,k) = n!/(k!*(n-k)!) and all prime factors in the denominator cancel to leave an integer, so that T(n,k) = A022559(n) - A132896(n,k).

Examples

			Triangle begins:
  n\k| 0  1  2  3  4  5  6  7
  ---+--------------------------------------
   0 | 0
   1 | 0, 0;
   2 | 1, 0, 1;
   3 | 2, 1, 1, 2;
   4 | 4, 2, 2, 2, 4;
   5 | 5, 4, 3, 3, 4, 5;
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=PrimeOmega[Factorial[k]*Factorial[n-k]];
    tab=Flatten[Table[T[n,k],{n,0,10},{k,0,n}]]

Formula

T(n,k) = bigomega(k!*(n-k)!), where 0 <= k <= n.
T(n,0) = T(n,n) = A022559(n).

A345531 Smallest prime power greater than the n-th prime.

Original entry on oeis.org

3, 4, 7, 8, 13, 16, 19, 23, 25, 31, 32, 41, 43, 47, 49, 59, 61, 64, 71, 73, 79, 81, 89, 97, 101, 103, 107, 109, 113, 121, 128, 137, 139, 149, 151, 157, 163, 167, 169, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 256, 263, 269, 271, 277
Offset: 1

Author

Dario T. de Castro, Jun 20 2021

Keywords

Comments

Take the family of correlated prime-indexed conjectures appearing in A343249 - A343253, in which an alternative formula for the p-adic order of positive integers is proposed. There, the general p-indexed conjecture says that v_p(n), the p-adic order of n, is given by the formula: v_p(n) = log_p(n / L_p(k0, n)), where L_p(k0, n) is the lowest common denominator of the elements of the set S_p(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by p}. Evidence suggests that the primality of p is a necessary condition in this general conjecture. So, if a composite number q is used instead of a prime p in the proposed formula for the p-adic (now, q-adic) order of n, the first counterexample (failure) is expected to occur for n = q * a(i), where i is the index of the smallest prime that divides q.
The prime-power a(n) is at most the next prime, so this sequence is strictly increasing. See also A366833. - Gus Wiseman, Nov 06 2024

Examples

			a(4) = 8 because the fourth prime number is 7, and the least power of a prime which is greater than 7 is 2^3 = 8.
		

Crossrefs

Starting with n instead of prime(n): A000015, A031218, A377468, A377780, A377782.
Opposite (greatest prime-power less than): A065514, A377289, A377781.
For squarefree instead of prime-power: A112926, opposite A112925.
The difference from prime(n) is A377281.
The prime terms have indices A377286(n) - 1.
First differences are A377703.
A version for perfect-powers is A378249.
A000961 and A246655 list the prime-powers, differences A057820.
A024619 and A361102 list the non-prime-powers, differences A375735.

Programs

  • Maple
    f:= proc(n) local p,x;
      p:= ithprime(n);
      for x from p+1 do
        if nops(numtheory:-factorset(x)) = 1 then return x fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 25 2024
  • Mathematica
    a[i_]:= Module[{j, k, N = 0, tab={}}, tab = Sort[Drop[DeleteDuplicates[Flatten[Table[ If[Prime[j]^k > Prime[i], Prime[j]^k], {j, 1, i+1}, {k, 1, Floor[Log[Prime[j], Prime[i+1]]]}]]], 1]]; N = Take[tab, 1][[1]]; N];
    tabseq = Table[a[i],{i, 1, 100}];
    (* second program *)
    Table[NestWhile[#+1&,Prime[n]+1, Not@*PrimePowerQ],{n,100}] (* Gus Wiseman, Nov 06 2024 *)
  • PARI
    A000015(n) = for(k=n,oo,if((1==k)||isprimepower(k),return(k)));
    A345531(n) = A000015(1+prime(n)); \\ Antti Karttunen, Jul 19 2021
    
  • Python
    from itertools import count
    from sympy import prime, factorint
    def A345531(n): return next(filter(lambda m:len(factorint(m))<=1, count(prime(n)+1))) # Chai Wah Wu, Oct 25 2024

Formula

a(n) = A000015(1+A000040(n)). - Antti Karttunen, Jul 19 2021
a(n) = A000015(A008864(n)). - Omar E. Pol, Oct 27 2021

A343253 a(n) is the least k0 <= n such that v_11(n), the 11-adic order of n, can be obtained by the formula: v_11(n) = log_11(n / L_11(k0, n)), where L_11(k0, n) is the lowest common denominator of the elements of the set S_11(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 11} or 0 if no such k0 exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 1, 4, 13, 7, 5, 16, 17, 9, 19, 5, 7, 2, 23, 8, 25, 13, 27, 7, 29, 5, 31, 32, 3, 17, 7, 9, 37, 19, 13, 8, 41, 7, 43, 4, 9, 23, 47, 16, 49, 25, 17, 13, 53, 27, 5, 8, 19, 29, 59, 5, 61, 31, 9, 64, 13, 3, 67, 17, 23, 7, 71, 9, 73, 37, 25, 19, 7, 13, 79, 16
Offset: 1

Author

Dario T. de Castro, May 31 2021

Keywords

Comments

Conjecture: a(n) is the greatest power of a prime different from 11 that divides n.

Examples

			For n = 12, a(12) = 4. To understand this result, consider the largest set S_11, which is the S_11(k0=12, 12). According to the definition, S_11(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 11. The elements of S_11(12, 12) are {1, 11/2, 55/3, 165/4, 66, 77, 66, 165/4, 55/3, 11/2, 0, 1/12}, where the zero was inserted pedagogically to identify the skipped term, i.e., when k is divisible by 11. At this point we verify which of the nested subsets {1}, {1, 11/2}, {1, 11/2, 55/3}, {1, 11/2, 55/3, 165/4}, ... will match for the first time the p-adic order's formula. If k varies from 1 to 4 (instead of 12) we see that the lowest common denominator of the set S_11(4, 12) will be 12. So, L_11(4, 12) = 12 and the equation v_11(12) = log_11(12/12) yields a True result. Then we may say that a(12) = 4 specifically because 4 was the least k0.
		

Crossrefs

Programs

  • Mathematica
    j = 5;
    Nmax = 250;
    Array[val, Nmax];
    Do[val[i] = 0, {i, 1, Nmax}];
    Do[flag = 0;
      Do[If[(flag == 0 &&
          Prime[j]^IntegerExponent[n, Prime[j]] ==
           n/LCM[Table[
               If[Divisible[k, Prime[j]], 1,
                Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
              List -> Sequence]), val[n] = k; flag = 1; , Continue], {k, 1,
         n, 1}], {n, 1, Nmax}];
    tabseq = Table[val[i], {i, 1, Nmax}];
    (* alternate code *)
    a[n_] := Module[{k = 1, v = IntegerExponent[n, 11]}, While[Log[11, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 11] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
  • PARI
    Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n, i)/n)); ); lcm(apply(denominator, Vec(list))); }
    isok(k, n, v, p) = p^v == n/Lp(k, n, p);
    a(n, p=11) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)); ); n; } \\ Michel Marcus, Apr 22 2021

A343252 a(n) is the least k0 <= n such that v_7(n), the 7-adic order of n, can be obtained by the formula: v_7(n) = log_7(n / L_7(k0, n)), where L_7(k0, n) is the lowest common denominator of the elements of the set S_7(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 7} or 0 if no such k0 exists.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 1, 8, 9, 5, 11, 4, 13, 2, 5, 16, 17, 9, 19, 5, 3, 11, 23, 8, 25, 13, 27, 4, 29, 5, 31, 32, 11, 17, 5, 9, 37, 19, 13, 8, 41, 3, 43, 11, 9, 23, 47, 16, 1, 25, 17, 13, 53, 27, 11, 8, 19, 29, 59, 5, 61, 31, 9, 64, 13, 11, 67, 17, 23, 5, 71, 9, 73, 37, 25, 19, 11, 13, 79, 16
Offset: 1

Author

Dario T. de Castro, May 31 2021

Keywords

Comments

Conjecture: a(n) is the greatest power of a prime different from 7 that divides n.

Examples

			For n = 10, a(10) = 5. To understand this result, consider the largest set S_7, which is the S_7(k0=10, 10). According to the definition, S_7(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 7. The elements of S_7(10, 10) are {1, 9/2, 12, 21, 126/5, 21, 0, 9/2, 1, 1/10}, where the zero was inserted pedagogically to identify the skipped term, i.e., when k is divisible by 7. At this point we verify which of the nested subsets {1}, {1, 9/2}, {1, 9/2, 12}, {1, 9/2, 12, 21}, ... will match for the first time the p-adic order's formula. If k varies from 1 to 5 (instead of 10) we see that the lowest common denominator of the set S_7(5, 10) will be 10. So, L_7(5, 10) = 10 and the equation v_7(10) = log_7(10/10) yields a True result. Then we may say that a(10) = 5 specifically because 5 was the least k0.
		

Crossrefs

Programs

  • Mathematica
    j = 4;
    Nmax = 250;
    Array[val, Nmax];
    Do[val[i] = 0, {i, 1, Nmax}];
    Do[flag = 0;
      Do[If[(flag == 0 &&
          Prime[j]^IntegerExponent[n, Prime[j]] ==
           n/LCM[Table[
               If[Divisible[k, Prime[j]], 1,
                Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
              List -> Sequence]), val[n] = k; flag = 1; , Continue], {k, 1,
         n, 1}], {n, 1, Nmax}];
    tabseq = Table[val[i], {i, 1, Nmax}];
    (* alternate code *)
    a[n_] := Module[{k = 1, v = IntegerExponent[n, 7]}, While[Log[7, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 7] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
  • PARI
    Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n, i)/n)); ); lcm(apply(denominator, Vec(list))); }
    isok(k, n, v, p) = p^v == n/Lp(k, n, p);
    a(n, p=7) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)); ); n; } \\ Michel Marcus, Apr 22 2021

A343251 a(n) is the least k0 <= n such that v_5(n), the 5-adic order of n, can be obtained by the formula: v_5(n) = log_5(n / L_5(k0, n)), where L_5(k0, n) is the lowest common denominator of the elements of the set S_5(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 5} or 0 if no such k0 exists.

Original entry on oeis.org

1, 2, 3, 4, 1, 3, 7, 8, 9, 2, 11, 4, 13, 7, 3, 16, 17, 9, 19, 4, 7, 11, 23, 8, 1, 13, 27, 7, 29, 3, 31, 32, 11, 17, 7, 9, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 16, 49, 2, 17, 13, 53, 27, 11, 8, 19, 29, 59, 4, 61, 31, 9, 64, 13, 11, 67, 17, 23, 7, 71, 9, 73, 37, 3, 19, 11, 13, 79, 16
Offset: 1

Author

Dario T. de Castro, Apr 09 2021

Keywords

Comments

Conjecture: a(n) is the greatest power of a prime different from 5 that divides n.

Examples

			For n = 12, a(12) = 4. To understand this result, consider the largest set S_5, which is the S_5(k0=12, 12). According to the definition, S_5(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 5. The elements of S_5(12, 12) are {1, 11/2, 55/3, 165/4, 0, 77, 66, 165/4, 55/3, 0, 1, 1/12}, where the zeros were inserted pedagogically to identify the skipped terms, i.e., when k is divisible by 5. At this point we verify which of the nested subsets {1}, {1, 11/2}, {1, 11/2, 55/3}, {1, 11/2, 55/3, 165/4}, ... will match for the first time the p-adic order's formula. If k varies from 1 to 4 (instead of 12) we see that the lowest common denominator of the set S_5(4, 12) will be 12. So, L_5(4, 12) = 12 and the equation v_5(12) = log_5(12/12) yields a True result. Then we may say that a(12) = 4 specifically because 4 was the least k0.
		

Programs

  • Mathematica
    j = 3;
    Nmax = 250;
    Array[val, Nmax];
    Do[val[i] = 0, {i, 1, Nmax}];
    Do[flag = 0;
      Do[If[(flag == 0 &&
          Prime[j]^IntegerExponent[n, Prime[j]] ==
           n/LCM[Table[
               If[Divisible[k, Prime[j]], 1,
                Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
              List -> Sequence]), val[n] = k; flag = 1;, Continue], {k, 1,
         n, 1}], {n, 1, Nmax}];
    tabseq = Table[val[i], {i, 1, Nmax}];
    (* alternate code *)
    a[n_] := Module[{k = 1, v = IntegerExponent[n, 5]}, While[Log[5, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 5] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
  • PARI
    Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n,i)/n));); lcm(apply(denominator, Vec(list)));}
    isok(k, n, v, p) = p^v == n/Lp(k, n, p);
    a(n, p=5) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)););} \\ Michel Marcus, Apr 23 2021

A343250 a(n) is the least k0 <= n such that v_3(n), the 3-adic order of n, can be obtained by the formula: v_3(n) = log_3(n / L_3(k0, n)), where L_3(k0, n) is the lowest common denominator of the elements of the set S_3(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 3} or 0 if no such k0 exists.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 7, 8, 1, 5, 11, 4, 13, 7, 5, 16, 17, 2, 19, 5, 7, 11, 23, 8, 25, 13, 1, 7, 29, 5, 31, 32, 11, 17, 7, 4, 37, 19, 13, 8, 41, 7, 43, 11, 5, 23, 47, 16, 49, 25, 17, 13, 53, 2, 11, 8, 19, 29, 59, 5, 61, 31, 7, 64, 13, 11, 67, 17, 23, 7, 71, 8, 73, 37, 25, 19, 11, 13, 79, 16
Offset: 1

Author

Dario T. de Castro, Apr 09 2021

Keywords

Comments

Conjecture: a(n) is the greatest power of a prime different from 3 that divides n.

Examples

			For n = 10, a(10) = 5. To understand this result, consider the largest set S_3, which is the S_3(k0=10, 10). According to the definition, S_3(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 3. The elements of S_3(10, 10) are: {1, 9/2, 0, 21, 126/5, 0, 12, 9/2, 0, 1/10}, where the zeros were put pedagogically to identify the skipped terms, i.e., when k is divisible by 3. At this point we verify which of the nested subsets {1}, {1, 9/2}, {1, 9/2, 0}, {1, 9/2, 0, 21}, {1, 9/2, 0, 21, 126/5},... will match for the first time the p-adic order’s formula. If k vary from 1 to 5 (instead of 10) we see that the lowest common denominator of the set S_3(5, 10) will be 10. So, L_3(5, 10) = 10 and the equation v_3(10) = log_3(10/10) yields a True result. Then we may say that a(10) = 5 specifically because 5 was the least k0.
		

Programs

  • Mathematica
    j = 2;
    Nmax = 250;
    Array[val, Nmax];
    Do[val[i] = 0, {i, 1, Nmax}];
    Do[flag = 0;
      Do[If[(flag == 0 &&
          Prime[j]^IntegerExponent[n, Prime[j]] ==
           n/LCM[Table[
               If[Divisible[k, Prime[j]], 1,
                Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
              List -> Sequence]), val[n] = k; flag = 1;, Continue], {k, 1,
         n, 1}], {n, 1, Nmax}];
    tabseq = Table[val[i], {i, 1, Nmax}];
    (* alternate code *)
    a[n_] := Module[{k = 1, v = IntegerExponent[n, 3]}, While[Log[3, n/LCM @@ Denominator[Binomial[n, Select[Range[k], ! Divisible[#, 3] &]]/n]] != v, k++]; k]; Array[a, 100] (* Amiram Eldar, Apr 23 2021 *)
  • PARI
    Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n,i)/n));); lcm(apply(denominator, Vec(list)));}
    isok(k, n, v, p) = p^v == n/Lp(k, n, p);
    a(n, p=3) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k)););} \\ Michel Marcus, Apr 22 2021

A343249 a(n) is the least k0 <= n such that v_2(n), the 2-adic order of n, can be obtained by the formula: v_2(n) = log_2(n / L_2(k0, n)), where L_2(k0, n) is the lowest common denominator of the elements of the set S_2(k0, n) = {(1/n)*binomial(n, k), with 0 < k <= k0 such that k is not divisible by 2} or 0 if no such k0 exists.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 5, 1, 17, 9, 19, 5, 7, 11, 23, 3, 25, 13, 27, 7, 29, 5, 31, 1, 11, 17, 7, 9, 37, 19, 13, 5, 41, 7, 43, 11, 9, 23, 47, 3, 49, 25, 17, 13, 53, 27, 11, 7, 19, 29, 59, 5, 61, 31, 9, 1, 13, 11, 67, 17, 23, 7, 71, 9, 73, 37, 25, 19, 11, 13, 79, 5
Offset: 1

Author

Dario T. de Castro, Apr 09 2021

Keywords

Comments

Conjecture: a(n) is the greatest power of a prime different from 2 that divides n.

Examples

			For n = 15, a(15) = 5. To understand this result, consider the largest set S_2, which is the S_2(k0=15, 15). According to the definition, S_2(n, n) is the set of elements of the form (1/n)*binomial(n, k), where k goes from 1 to n, skipping the multiples of 2. The elements of S_2(15, 15) are: {1, 0, 91/3, 0, 1001/5, 0, 429, 0, 1001/3, 0, 91, 0, 7, 0, 1/15}, where the zeros were put pedagogically to identify the skipped terms, i.e., when k is divisible by 2. At this point we verify which of the nested subsets {1}, {1, 0}, {1, 0, 91/3}, {1, 0, 91/3, 0}, {1, 0, 91/3, 0, 1001/5},... will match for the first time the p-adic order’s formula. If k vary from 1 to 5 (instead of 15) we see that the lowest common denominator of the set S_2(5, 15) will be 15. So, L_2(5, 15) = 15 and the equation v_2(15) = log_2(15/15) yields a True result. Then we may say that a(15) = 5 specifically because 5 was the least k0.
		

Programs

  • Mathematica
    j = 1;
    Nmax = 250;
    Array[val, Nmax];
    Do[val[i] = 0, {i, 1, Nmax}];
    Do[flag = 0;
      Do[If[(flag == 0 &&
          Prime[j]^IntegerExponent[n, Prime[j]] ==
           n/LCM[Table[
               If[Divisible[k, Prime[j]], 1,
                Denominator[(1/n) Binomial[n, k]]], {k, 1, k}] /.
              List -> Sequence]), val[n] = k; flag = 1;, Continue], {k, 1,
         n, 1}], {n, 1, Nmax}];
    tabseq = Table[val[i], {i, 1, Nmax}];
  • PARI
    Lp(k, n, p) = {my(list = List()); for (i=1, k, if (i%p, listput(list, binomial(n,i)/n));); lcm(apply(denominator, Vec(list)));}
    isok(k, n, v, p) = p^v == n/Lp(k, n, p);
    a(n, p=2) = {my(k=1, v=valuation(n, p)); for (k=1, n, if (isok(k, n, v, p), return(k));); n;} \\ Michel Marcus, Apr 22 2021