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.

Previous Showing 11-17 of 17 results.

A326180 Number of maximal subsets of {1..n} containing n whose product is divisible by their sum.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 3, 1, 1, 1, 11, 1, 16, 1, 1, 1, 27, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 13 2019

Keywords

Examples

			The a(6) = 3, a(10) = 11, and a(12) = 16 subsets:
  {1,3,5,6}    {1,2,4,5,6,7,10}      {1,2,3,4,5,6,7,8,12}
  {1,2,3,4,6}  {1,2,3,4,5,7,8,10}    {1,3,4,5,6,7,8,10,12}
  {2,3,4,5,6}  {1,2,3,4,6,7,9,10}    {1,3,4,6,7,8,9,10,12}
               {1,2,3,5,6,7,8,10}    {1,3,4,5,6,8,10,11,12}
               {1,2,3,5,7,8,9,10}    {1,2,3,4,5,6,8,9,10,12}
               {1,2,5,6,7,8,9,10}    {1,2,3,4,6,7,8,9,11,12}
               {1,3,4,5,6,7,9,10}    {1,2,3,5,6,7,8,9,10,12}
               {1,3,4,6,7,8,9,10}    {1,2,3,5,6,7,8,9,11,12}
               {1,4,5,6,7,8,9,10}    {1,3,4,5,6,7,8,9,11,12}
               {1,2,3,4,5,6,8,9,10}  {1,2,3,4,6,7,8,10,11,12}
               {2,3,4,5,6,7,8,9,10}  {1,2,3,4,6,8,9,10,11,12}
                                     {1,3,5,6,7,8,9,10,11,12}
                                     {1,2,3,4,5,6,7,9,10,11,12}
                                     {1,2,3,4,5,7,8,9,10,11,12}
                                     {1,2,4,5,6,7,8,9,10,11,12}
                                     {2,3,4,5,6,7,8,9,10,11,12}
		

Crossrefs

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n],{1,n}],MemberQ[#,n]&&Divisible[Times@@#,Plus@@#]&]]],{n,0,10}]

Formula

a(A060462(n)) = 1.

A118742 Numbers n for which the expression n!/(n+1) is an integer.

Original entry on oeis.org

0, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 97
Offset: 0

Views

Author

Keywords

Comments

Also set of all n>=0, excluding 3, for which n+1 is composite. [Proof: (i) If n+1 is prime, there cannot be any factor in n! to cancel the n+1 in the denominator of the expression. (ii) If n+1=composite=a*b, a2, (n+1)!/(n+1)^2 = 1*2*..*a*...*(2a)*..*a^2/a^4 in which factors also cancel.] - R. J. Mathar, Nov 22 2006

Examples

			n=5 5!/(5+1)= 5*4*3*2*1/6 = 20.
		

Crossrefs

Essentially the same as A072668.

Programs

  • Maple
    P:=proc(n) local i,j; for i from 0 by 1 to n do j:=i!/(i+1); if trunc(j)=j then print(i); fi; od; end: P(200);
  • Mathematica
    Select[Range[0,100],IntegerQ[#!/(#+1)]&] (* Harvey P. Dale, Aug 24 2014 *)

Formula

a(n) = A002808(n+1)-1 for n>=1. - R. J. Mathar, Nov 22 2006

Extensions

Corrected (39 inserted) by Harvey P. Dale, Aug 24 2014

A166460 Numbers k such that k + (-1)^k is not prime.

Original entry on oeis.org

0, 1, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 14 2009

Keywords

Comments

This is the complement of A068499 (except that both include 1 as a term).
From Don Reble, Aug 31 2021: (Start)
Proof for all k except 0, 1, 3 with cases
(i) If k is odd and >=5, then k+1 = 2*x, 2 < x < k, k! = k*...*x*...*2*1
A068499: k+1 divides k! : absent
A166460: k-1 is even and composite : present
(ii) If k is even and k+1 is prime,
A068499: k+1 does not divide k! : present
A166460: k+1 is prime : absent
(iii) If k is even and k+1 = p^2 is the square of a (odd) prime, then k+1 >= 3p, k > 2p.
A068499: k! = k*...*2p*...*p*...*1;
k+1 divides k! : absent
A166460: k+1 is composite : present
(iv) If k is even and k+1 is composite but not the square of a prime, then there are two distinct factors x*y = k+1:
3 <= x < y = (k+1)/x < k.
A068499: k! = k*...*y*...*x*...*1:
k+1 divides k! : absent
A166460: k+1 is composite : present
(End)

Examples

			0 + (-1)^0 = 1 is not prime, which adds 0 to the sequence.
5 + (-1)^5 = 4 is not prime, which adds 5 to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 94], ! PrimeQ[# + (-1)^#] &] (* Michael De Vlieger, Sep 08 2021 *)
  • Python
    from sympy import composite
    def A166460(n): return composite(n-1)-1 if n>2 else n-1 # Chai Wah Wu, Aug 27 2024

Formula

a(n) = A002808(n-1)-1 for n>2. - Chai Wah Wu, Aug 27 2024

Extensions

0 added by R. J. Mathar, Oct 21 2009

A126328 Rounded value of n!/(n(n+1)/2); A000142(n)/A000217(n).

Original entry on oeis.org

1, 1, 1, 2, 8, 34, 180, 1120, 8064, 65978, 604800, 6141046, 68428800, 830269440, 10897286400, 153844043294, 2324754432000, 37440781904842, 640237370572800, 11585247657984000, 221172909834240000, 4442690623626907826
Offset: 1

Views

Author

Jonathan R. Love (japanada11(AT)yahoo.ca), Mar 09 2007

Keywords

Comments

This is the value that comes up when (all positive integers n and below multiplied together) is divided by (all positive integers n and below added together). Some terms need to be rounded, but for some terms, n! is divisible by n(n+1)/2. See A060462 for these numbers.

Examples

			a(6) = 34 because 6! = 720 and 6(6+1)/2 = 21. 720/21 = 34.2857... rounded to 34.
		

Crossrefs

Cf. A061370. [From R. J. Mathar, Dec 13 2008]

Programs

  • Mathematica
    Table[Round[n!/(n(n+1)/2)],{n,22}] (* James C. McMahon, Dec 25 2024 *)

A291551 Number of permutations s_1,s_2,...,s_n of 1,2,...,n such that for all j=1,2,...,n, Sum_{i=1..j} s_i divides Product_{i=1..j} s_i.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 262, 0, 10226, 43964, 139484, 0, 13936472, 59652396, 301235944, 1915640632, 7969506364, 0
Offset: 0

Views

Author

Seiichi Manyama, Aug 26 2017

Keywords

Comments

a(n) = 0 if n+1 does not divide 2*(n-1)!. This implies that a(p-1) = 0 for p > 2 prime. - Chai Wah Wu, Aug 26 2017

Examples

			a(15) = 26: [[10, 15, 5, 6, 4, 8, 2, 14, 11, 13, 3, 7, 1, 9, 12], [10, 15, 5, 6, 12, 2, 14, 11, 13, 3, 7, 1, 9, 4, 8], [10, 15, 5, 6, 12, 2, 14, 11, 13, 3, 9, 4, 1, 7, 8], [10, 15, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 12, 3, 2, 11, 7, 1, 9, 4, 8], [10, 15, 5, 6, 14, 13, 12, 3, 2, 11, 9, 4, 1, 7, 8], [15, 10, 5, 6, 4, 8, 2, 14, 11, 13, 3, 7, 1, 9, 12], [15, 10, 5, 6, 12, 2, 14, 11, 13, 3, 7, 1, 9, 4, 8], [15, 10, 5, 6, 12, 2, 14, 11, 13, 3, 9, 4, 1, 7, 8], [15, 10, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 12, 3, 2, 11, 7, 1, 9, 4, 8], [15, 10, 5, 6, 14, 13, 12, 3, 2, 11, 9, 4, 1, 7, 8]].
		

Crossrefs

Programs

  • Ruby
    def search(a, prod, sum, size, num)
      if num == size + 1
        @cnt += 1
      else
        (1..size).each{|i|
          p, s = prod * i, sum + i
          if a[i - 1] == 0 && p % s == 0
            a[i - 1] = 1
            search(a, p, s, size, num + 1)
            a[i - 1] = 0
          end
        }
      end
    end
    def A(n)
      a = [0] * n
      @cnt = 0
      search(a, 1, 0, n, 1)
      @cnt
    end
    def A291551(n)
      (0..n).map{|i| A(i)}
    end
    p A291551(20)

Extensions

a(26)-a(28) from Alois P. Heinz, Aug 26 2017

A309355 Even numbers k such that k! is divisible by k*(k+1)/2.

Original entry on oeis.org

8, 14, 20, 24, 26, 32, 34, 38, 44, 48, 50, 54, 56, 62, 64, 68, 74, 76, 80, 84, 86, 90, 92, 94, 98, 104, 110, 114, 116, 118, 120, 122, 124, 128, 132, 134, 140, 142, 144, 146, 152, 154, 158, 160, 164, 168, 170, 174, 176, 182, 184, 186, 188, 194, 200, 202, 204, 206
Offset: 1

Views

Author

Gerhard Palme, Jul 25 2019

Keywords

Comments

Even terms in A060462.
And A071904 are the successors of a(n).
Even numbers that are not a prime - 1. That is, even numbers not in A006093. - Terry D. Grant, Oct 31 2020

Examples

			8! = 40320 is divisible by 8*9/2 = 36.
14! is divisible by 14*15/2.
		

References

  • J. D. E. Konhauser et al., Which Way Did The Bicycle Go?, Problem 98, pp. 29; 145-146, MAA Washington DC, 1996.
  • Die WURZEL - Zeitschrift für Mathematik, 53. Jahrgang, Juli 2019, S. 171, WURZEL-Aufgabe 2019-36 von Gerhard Dietel, Regensburg.

Crossrefs

Essentially the same as A186193.
Cf. A006093.

Programs

  • Magma
    [k: k in [2..250]|IsEven(k) and Factorial(k) mod Binomial(k+1,2) eq 0]; // Marius A. Burtea, Jul 28 2019
    
  • Mathematica
    Complement[Table[2 n, {n, 1, 103}], Table[EulerPhi[Prime[n]], {n, 1, 103}]] (* Terry D. Grant, Oct 31 2020 *)
  • PARI
    forcomposite(c=4,10^3,if(c%2==1,print1(c-1,", "))); \\ Joerg Arndt, Jul 25 2019
    
  • Python
    from sympy import primepi
    def A309355(n):
        if n == 1: return 8
        m, k = n, primepi(n) + n + (n>>1)
        while m != k:
            m, k = k, primepi(k) + n + (k>>1)
        return m-1 # Chai Wah Wu, Aug 02 2024

Formula

a(n) = A071904(n) - 1.

A343506 Numbers k such that the largest digit in the factorial base expansion of 1/k is 1.

Original entry on oeis.org

1, 2, 6, 20, 24, 120, 630, 720, 4480, 5040, 36288, 40320, 362880, 3326400, 3628800, 39916800
Offset: 1

Views

Author

Rémy Sigrist, Apr 17 2021

Keywords

Comments

Equivalently these are the numbers k such that A299020(k) = 1 or A343505(k) = 1.
This sequence is infinite as it contains:
- the factorial numbers (A000142),
- 1/(1/A060462(k)! + 1/(A060462(k)-1)!) for k > 2,
- 1/(1/A120416(k)! + 1/(A120416(k)-1)! + 1/(A120416(k)-2)!) for k > 0.

Examples

			The first terms, alongside the factorial base expansion of their inverse, are:
  n   a(n)     1/a(n) in factorial base
  --  -------  ------------------------
   1        1  1
   2        2  0.1
   3        6  0.0 1
   4       20  0.0 0 1 1
   5       24  0.0 0 1
   6      120  0.0 0 0 1
   7      630  0.0 0 0 0 1 1
   8      720  0.0 0 0 0 1
   9     4480  0.0 0 0 0 0 1 1
  10     5040  0.0 0 0 0 0 1
  11    36288  0.0 0 0 0 0 0 1 1
  12    40320  0.0 0 0 0 0 0 1
  13   362880  0.0 0 0 0 0 0 0 1
  14  3326400  0.0 0 0 0 0 0 0 0 1 1
  15  3628800  0.0 0 0 0 0 0 0 0 1
		

Crossrefs

Programs

  • PARI
    is(n) = my (f=1/n); for (r=2, oo, if (f==0, return (1), floor(f)>1, return (0), f=frac(f)*r))
Previous Showing 11-17 of 17 results.