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: Ryan Jean

Ryan Jean's wiki page.

Ryan Jean has authored 4 sequences.

A383612 Numbers k such that 2 + val(k!, 2) < p + val(k!, p), where p is the largest prime <= k and val(r, m) is the valuation of r at m.

Original entry on oeis.org

3, 5, 7, 11, 13, 14, 15, 17, 19, 23, 29, 30, 31, 37, 38, 39, 41, 42, 43, 44, 45, 47, 53, 54, 55, 59, 60, 61, 62, 63, 67, 71, 73, 74, 75, 79, 83, 84, 85, 89, 90, 91, 97, 98, 99, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113, 114, 115, 127, 131, 137, 138, 139, 140, 141, 149, 150
Offset: 1

Author

Ryan Jean, May 02 2025

Keywords

Comments

All odd primes are contained within this sequence.

Examples

			For 3, p = 3 since 3 is the largest prime <= 3, and since val(3!, 2) = 1 and val(3!, 3) = 1, 2 + 1 = 3 < 4 = 3 + 1. So, 3 is in the sequence.
For 5, p = 5 since 5 is the largest prime <= 5, and since val(5!, 2) = 3 and val(5!, 5) = 1, 2 + 3 = 5 < 6 = 5 + 1. So, 5 is in the sequence.
For 14, p = 13 since 13 is the largest prime <= 14, and since val(14!, 2) = 11 and val(14!, 13) = 1, 2 + 11 = 13 < 14 = 13 + 1. So, 14 is in the sequence.
		

Crossrefs

Programs

  • PARI
    isok(k) = if (k>1, my(p=precprime(k), fk=k!); 2 + valuation(fk, 2) < p + valuation(fk, p)); \\ Michel Marcus, May 02 2025
    
  • Python
    from sympy import primerange, prevprime
    def valuation(n, p):
      count = 0
      i = p
      while n // i >= 1:
        count += n // i
        i *= p
      return count
    def create_list():
      result_list = []
      for n in range(2, 151):
        for p in primerange(3, n + 1):
          if 2 + valuation(n, 2) < p + valuation(n, p):
            result_list.append(n)
            break
      return result_list
    result = create_list()
    print(result)

A377825 Number of distinct permutations of the terms of the n-th row of Pascal's triangle with alternating signs.

Original entry on oeis.org

1, 2, 3, 24, 30, 720, 630, 40320, 22680, 3628800, 1247400, 479001600, 97297200, 87178291200, 10216206000, 20922789888000, 1389404016000, 6402373705728000, 237588086736000, 2432902008176640000, 49893498214560000, 1124000727777607680000, 12623055048283680000
Offset: 0

Author

Ryan Jean, Nov 08 2024

Keywords

Comments

Note that for any given n, there are n+1 terms in that row.

Examples

			For n = 0, a(0) = 1 since there is just one term.
For n = 1, the signed row terms are {1, -1} so a(1) = 2 permutations.
For n = 2, the signed row terms are {1, -2, 1} which have only a(2) = 3 distinct permutations.
For n = 3, the signed row terms are {1, -3, 3, -1} which have a(3) = 24 permutations.
		

Crossrefs

Bisections are: A007019, A010050.

Programs

  • Maple
    seq((n+1)! / (2^((n*(1+(-1)^n)) / 4)), n=0..22); # Georg Fischer, Dec 19 2024
  • Mathematica
    A377825[n_] := (n+1)!/2^((n*(1 + (-1)^n))/4); Array[A377825, 25, 0] (* Paolo Xausa, Dec 20 2024 *)

Formula

a(n) = (n+1)! / (2^((n*(1+(-1)^n)) / 4)).
E.g.f.: 2*(x^6+x^5-4*x^3-3*x^2+4*x+2)/((x-1)^2*(x+1)^2*(x^2-2)^2). - Alois P. Heinz, Nov 09 2024
a(n) = (n+1)!/A072345(n-1) for n > 0. - Stefano Spezia, Nov 09 2024
Sum_{n>=0} 1/a(n) = cosh(1) + sinh(sqrt(2))/sqrt(2) - 1. - Amiram Eldar, Dec 25 2024

Extensions

a(22) corrected by Georg Fischer, Dec 19 2024

A352080 a(n) is the number of times that the square root operation must be applied to n in order to reach an irrational number.

Original entry on oeis.org

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

Author

Ryan Jean, Mar 02 2022

Keywords

Comments

a(1) is undefined because 1^(1/2^k) = 1 for all k.
Column a(n)-1 has the first nonunit term in row n of A352780. - Peter Munn, Nov 15 2022

Examples

			a(2) = 1 because sqrt(2) is irrational.
a(16) = 3 because sqrt(16) = 16^(1/2) = 4, sqrt(sqrt(16)) = 16^(1/4) = 2, but sqrt(sqrt(sqrt(16))) = 16^(1/8) = sqrt(2), which is irrational.
		

Crossrefs

Cf. A000290 (squares), A010052.
See the formula section for the relationships with A001511, A007814, A052409, A267116.
Cf. also A000037 (indices of 1's), A030140 (indices of 2's).
Cf. A352780.

Programs

  • Mathematica
    a[n_] := IntegerExponent[GCD @@ FactorInteger[n][[;; , 2]], 2] + 1; Array[a, 100, 2] (* Amiram Eldar, Mar 03 2022 *)
  • PARI
    a(n) = if (!issquare(n, &n), 1, a(n)+1); \\ Michel Marcus, Mar 03 2022

Formula

a(n) is the minimum k such that n^(1/2^k) is irrational.
a(n) = A007814(A052409(n)) + 1. - Amiram Eldar, Mar 03 2022
a(n) = A001511(A267116(n)). - Peter Munn, Nov 15 2022

A348596 a(n) = A068527(2*n+1).

Original entry on oeis.org

0, 1, 4, 2, 0, 5, 3, 1, 8, 6, 4, 2, 0, 9, 7, 5, 3, 1, 12, 10, 8, 6, 4, 2, 0, 13, 11, 9, 7, 5, 3, 1, 16, 14, 12, 10, 8, 6, 4, 2, 0, 17, 15, 13, 11, 9, 7, 5, 3, 1, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 24, 22, 20, 18, 16
Offset: 0

Author

Ryan Jean, Feb 22 2022

Keywords

Crossrefs

Cf. A068527, A046092 (position of 0's), A056220 (position of 1's), A350962.

Programs

  • Python
    from math import isqrt
    def A348596(n): return (isqrt(2*n)+1)**2-2*n-1 # Chai Wah Wu, Feb 22 2022

Formula

a(n) = (ceiling(sqrt(2*n + 1)))^2 - (2*n + 1).

Extensions

Edited by N. J. A. Sloane, Feb 22 2022