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.

A056653 Composite numbers together with 1 but excluding 4.

Original entry on oeis.org

1, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Robert G. Wilson v, Aug 30 2000

Keywords

Comments

These are also the numbers k such that k divides (k-1)!.

Crossrefs

Cf. A018252, A002808, A226198, A014076 (odd terms).

Programs

  • Maple
    for n from 1 to 100 do
      if irem(factorial(n-1),n) = 0 then print(n) end if;
    end do: # Peter Bala, Jan 24 2017
  • Mathematica
    Select[ Range[ 1, 100 ], Mod[ (# - 1)!, # ] == 0 & ]
    Join[{1},Select[Range[5,100],CompositeQ]] (* Harvey P. Dale, Jun 14 2024 *)
  • Python
    from sympy import composite
    def A056653(n): return composite(n) if n>1 else 1 # Chai Wah Wu, Jul 31 2024

Extensions

Edited by Vladeta Jovovic, Apr 30 2003

A238002 Count with multiplicity of prime factors of n in (n - 1)!.

Original entry on oeis.org

0, 0, 1, 0, 4, 0, 4, 2, 8, 0, 12, 0, 11, 7, 11, 0, 21, 0, 19, 10, 19, 0, 28, 4, 23, 10, 26, 0, 44, 0, 26, 16, 32, 11, 47, 0, 35, 19, 43, 0, 61, 0, 42, 28, 42, 0, 63, 6, 56, 24, 50, 0, 72, 16, 58, 28, 54, 0, 94, 0, 57, 37, 57, 18, 98, 0, 67, 33, 91, 0, 99, 0, 71, 50, 74, 17, 113, 0, 92
Offset: 2

Views

Author

Alonso del Arte, Feb 16 2014

Keywords

Examples

			a(4) = 1 because 3! = 6 = 2 * 3, which has one prime factor (2) in common with 4.
a(5) = 0 because gcd(4!, 5) = 1.
a(6) = 4 because 5! = 120 = 2^3 * 3 * 5, which has four factors (2 thrice and 3 once) in common with 6.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(`if`(i[1] in factorset(n), i[2], 0),
            i=ifactors(j)[2]), j=1..n-1):
    seq(a(n), n=2..100);  # Alois P. Heinz, Mar 17 2014
  • Mathematica
    cmpf[n_]:=Count[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[ (n-1)!]], ?( MemberQ[Transpose[FactorInteger[n]][[1]],#]&)]; Array[cmpf,80] (* _Harvey P. Dale, Jan 23 2016 *)
  • PARI
    a(n) = {nm = (n-1)!; fn = factor(n); sum (i=1, #fn~, valuation(nm, fn[i,1]));} \\ Michel Marcus, Mar 15 2014
  • Sage
    m=100 # change n for more terms
    [sum(valuation(factorial(n-1),p) for p in prime_divisors(n) if p in prime_divisors(factorial(n-1))) for n in [2..m]] # Tom Edgar, Mar 14 2014
    

Formula

a(p) = 0 for p prime.
a(2n) > a(2n + 1) for all n > 2.

A242426 a(n) = floor(n! / n^3).

Original entry on oeis.org

1, 0, 0, 0, 0, 3, 14, 78, 497, 3628, 29990, 277200, 2834328, 31770514, 387459072, 5108103000, 72397196844, 1097800704000, 17735107218083, 304112751022080, 5516784599040000, 105559797875432727, 2124765080865042873, 44881973505008640000, 992717442773183102976
Offset: 1

Views

Author

Alex Ratushnyak, May 14 2014

Keywords

Crossrefs

Cf. A226198 (floor(n!/n^2)).

Programs

  • Python
    import math
    for i in range(1,32): print(math.factorial(i)//(i**3), end=', ')

Formula

a(n) = floor(A000142(n-1) / A000290(n)).

Extensions

Formula corrected by David Radcliffe, Aug 07 2025
Showing 1-3 of 3 results.