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-2 of 2 results.

A167185 Largest prime power <= n that is not prime.

Original entry on oeis.org

1, 1, 1, 4, 4, 4, 4, 8, 9, 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 25, 25, 27, 27, 27, 27, 27, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
Offset: 1

Views

Author

Michael B. Porter, Oct 29 2009

Keywords

Examples

			For a(14), 10, 12, and 14 are not prime powers, and 11 and 13 are prime powers but they are prime. Since 9 = 3^3 is a prime power, a(14) = 9.
		

Crossrefs

List of nonprime prime powers: A025475.
Next nonprime prime power: A167184.
Previous prime power including primes: A031218.

Programs

  • Mathematica
    Array[SelectFirst[Range[#, 1, -1], Or[And[! PrimeQ@ #, PrimePowerQ@ #], # == 1] &] &, 74] (* Michael De Vlieger, Jun 14 2017 *)
  • PARI
    isA025475(n) = (omega(n) == 1 & !isprime(n)) || (n == 1)
    A167185(n) = {local(m);m=n;while(!isA025475(m),m--);m}
    
  • Python
    from sympy import factorint
    def A167185(n): return next(filter(lambda m:len(f:=factorint(m))<=1 and max(f.values(),default=2)>1, range(n,0,-1))) # Chai Wah Wu, Oct 25 2024
  • Sage
    p = [n for n in (1..81) if (is_prime_power(n) or n == 1) and not is_prime(n)]
    r = [[p[i]]*(p[i+1] - p[i]) for i in (0..9)]
    print([y for x in r for y in x]) # Peter Luschny, Jun 14 2017
    

A211391 The number of divisors d of n! such that d < A000793(n) (Landau's function g(n)) and the symmetric group S_n contains no elements of order d.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 2, 2, 6, 4, 15, 15, 24, 29, 33, 63, 55, 126, 117, 110, 103, 225, 212, 288, 282, 319, 428, 504, 774, 859, 943, 924, 1336, 1307, 1681, 1869, 2097, 2067, 2866, 3342, 3487, 5612, 5567, 5513, 5549, 9287, 9220, 11594, 11524, 11481, 11403, 18690
Offset: 1

Views

Author

Alexander Gruber, Feb 07 2013

Keywords

Comments

This sequence gives the number of divisors d of |S_n| such that d < Lambda(n) (where Lambda(n) = the largest order of an element in S_n) for which S_n contains no element of order d. These divisors constitute a set of 'missing' element orders of S_n.
For computational purposes, the smallest divisor d0(n) of n! = |S_n| for which S_n has no element of order d0(n) is the smallest divisor of n! which is not the least common multiple of an integer partition of n. Thus d0(n) is given by the smallest prime power >= n+1 that is not prime (with the exception of n = 3 and 4, for which d0(n) = 6).

Examples

			For n = 7, we refer to the following table:
Symmetric Group on 7 letters.
  # of elements of order  1 ->    1
  # of elements of order  2 ->  231
  # of elements of order  3 ->  350
  # of elements of order  4 ->  840
  # of elements of order  5 ->  504
  # of elements of order  6 -> 1470
  # of elements of order  7 ->  720
  # of elements of order  8 ->    0
  # of elements of order  9 ->    0
  # of elements of order 10 ->  504
  # of elements of order 12 ->  420
  (All other divisors of 7! -> 0.)
So there are two missing element orders in S_7, whence a(7) = 2.
		

Crossrefs

d0(n) is equal to A167184(n) for n >= 5.
Cf. A000793 (Landau's function g(n)), A057731, A211392.

Programs

  • Magma
    for n in [1..25] do
    D := Set(Divisors(Factorial(n)));
    O := { LCM(s) : s in Partitions(n) };
    L := Max(O);
    N := D diff O;
    #{ n : n in N | n lt L };
    end for;

Extensions

More terms from Alois P. Heinz, Feb 11 2013
Showing 1-2 of 2 results.