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 21-25 of 25 results.

A103671 Smallest m such that the binary representation of n! does not contain m!.

Original entry on oeis.org

4, 5, 5, 5, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 5, 6, 5, 6, 5, 6, 5, 5, 5, 6, 6, 6, 5, 7, 6, 6, 6, 6, 6, 7, 6, 6, 5, 6, 6, 6, 6, 6, 6, 5, 6, 7, 6, 6, 5, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 7, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 7, 6, 6, 6, 6, 7, 6, 6, 7, 7, 6, 6, 6, 7, 6, 6, 7, 6, 6, 6, 7, 6, 7, 6, 6
Offset: 6

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Comments

Reinhard Zumkeller conjectures (at A102730) that this sequence is bounded. I conjecture the contrary, that for every k there is n with a(n) > k. - Charles R Greathouse IV, Apr 07 2013

Crossrefs

Programs

  • Mathematica
    q[n_, m_] := StringContainsQ[IntegerString[n!, 2], IntegerString[m!, 2]]; a[n_] := Module[{m = 2}, While[q[n, m], m++]; m]; Array[a, 105, 6] (* Amiram Eldar, Apr 03 2025 *)

A103672 Greatest m < n such that the binary representation of n! contains m!.

Original entry on oeis.org

0, 1, 2, 3, 4, 3, 4, 7, 4, 5, 4, 5, 4, 4, 4, 15, 4, 4, 4, 6, 4, 5, 6, 4, 5, 4, 5, 4, 5, 6, 6, 31, 5, 5, 5, 4, 6, 5, 5, 5, 5, 5, 6, 5, 5, 4, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 5, 6, 5, 5, 5, 5, 5, 63, 6, 5, 5, 5, 5, 5, 6, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 5, 6, 6, 5, 5, 5, 6, 7, 5, 6, 5, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2005

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_, m_] := StringContainsQ[IntegerString[n!, 2], IntegerString[m!, 2]]; a[n_] := Module[{m = n-1}, While[!q[n, m], m--]; m]; Array[a, 104] (* Amiram Eldar, Apr 03 2025 *)

Formula

a(2^k) = 2^k - 1, a(A000079(k)) = A000225(k).

A092762 Least number whose binary representation is not contained in that of n!.

Original entry on oeis.org

2, 3, 4, 5, 5, 7, 10, 10, 7, 9, 7, 5, 13, 15, 15, 15, 17, 17, 15, 17, 18, 17, 29, 21, 17, 28, 20, 31, 21, 36, 15, 15, 35, 42, 41, 35, 33, 22, 45, 22, 36, 46, 50, 41, 37, 33, 21, 40, 38, 31, 66, 33, 60, 45, 51, 42, 42, 60, 35, 38, 63, 65, 75, 75, 39, 71, 36, 75, 67, 74, 67, 68, 78
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2004

Keywords

Comments

a(A093710(n)) > n, a(A093711(n)) <= n.
Sum_{n=1..3000} a(n) = 4179226. The average value of a(n)/n -> 0.93+ and except for some initial terms, < 212, 0.90 < a(n)/n < 0.95. But there is graphical evidence that this value may increase. - Robert G. Wilson v, Apr 21 2004
a(n) = n only for 5, 13, 15, 17, 513, 517, 1041, 1538, 2138, n <= 2500. a(n) = n+1 for n=1, 2, 3, 4, 6, 14, 134, 137, 155, 169, 216, 313, 530, 1035 & 2402. - Robert G. Wilson v, Apr 21 2004
a(n) >= 3n/2 for n=1, 2, 334, 335, 2693 & 2739. - Robert G. Wilson v, Apr 21 2004
a(n) <= n/2 for n=12, 31, 32, 47, 122, 142, 152, 188, 303, 378, 443, 548, 598, 1319, 1354, 1420, 2127, 2137, 2223, 2230, 2368, 2433, 2571. - Robert G. Wilson v, Apr 21 2004

Examples

			a(7)=10 because 7! = 1001110110000_b and 1_b, 10_b, 11_b, 100_b, 101_b, 110_b, 111_b, 1000_b & 1001_b are substrings, but 10_d = 1010_b is not a substring. - _Robert G. Wilson v_, Apr 21 2004
		

Crossrefs

Programs

  • Mathematica
    f[n_] := ToString[ FromDigits[ IntegerDigits[n, 2]]]; g[n_] := g[n] = Block[{k = 1, s = f[n! ]}, While[ StringPosition[ s, f[k]] != {}, k++ ]; k]; Table[ g[n], {n, 75}] (* Robert G. Wilson v, Apr 21 2004 *)

Extensions

Edited by N. J. A. Sloane, Sep 15 2008 at the suggestion of R. J. Mathar

A092607 Length of longest contiguous block of ones in binary representation of n!.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Apr 11 2004

Keywords

Examples

			n = 10: 10! = 3628800 = '1101110101111100000000' = '.........11111........': a(10) = 5.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[Length /@ Split[IntegerDigits[n!, 2]][[1 ;; -1 ;; 2]]]; Array[a, 100, 0] (* Amiram Eldar, Jul 29 2025 *)

Formula

a(n) = A038374(A000142(n)).

A289282 The least significant four bytes of n! interpreted in two's complement.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 1932053504, 1278945280, 2004310016, 2004189184, -288522240, -898433024, 109641728, -2102132736, -1195114496, -522715136, 862453760, -775946240, 2076180480, -1853882368, 1484783616, -1375731712, -1241513984, 1409286144, 738197504, -2147483648, -2147483648, 0, 0, 0
Offset: 0

Views

Author

Alonso del Arte, Jul 01 2017

Keywords

Comments

a(n) = 0 for n >= 34. - Georg Fischer, Mar 12 2019

Examples

			The hexadecimal column in the following list shows how the bits in the least significant four bytes are shifted to the left by each factor containing some power of 2. With two's complement the terms are negative when the highest bit is one. - _Georg Fischer_, Mar 13 2019
  28 -1375731712 # ae000000
  29 -1241513984 # b6000000
  30  1409286144 # 54000000
  31   738197504 # 2c000000
  32 -2147483648 # 80000000
  33 -2147483648 # 80000000
  34           0 # 00000000
		

Crossrefs

Programs

  • Java
    import java.math.BigInteger;
    public class a289282 {
        public static void main(String[] args) {
            BigInteger pow32 = BigInteger.valueOf(2).pow(32);
            BigInteger bfact  = BigInteger.ONE;
            for (int i = 0; i < 48; i++) {
                bfact = bfact.multiply(BigInteger.valueOf(i == 0 ? 1 : i));
                System.out.println(String.valueOf(i) + " "
                    + String.valueOf(bfact.mod(pow32).intValue()));
            }
        } // main
    } // Georg Fischer, Mar 12 2019
    
  • Mathematica
    Table[Mod[n!, 2^32] - Boole[Mod[n!, 2^32] > 2^31 - 1] * 2^32, {n, 0, 49}]
  • PARI
    Bits = 32; N = Mod(1, 2^Bits); j = 0; until(N == 0, print1(-centerlift(-N), ", "); j += 1; N *= j); \\ Jack Brennen, Jun 30 2017
    
  • Python
    import math
    def A289282(n):
        f = math.factorial(n)
        least_four = f & 0xffffffff
        mask = 0x7fffffff
        return (least_four & mask) - (least_four & ~mask)
    print([A289282(n) for n in range(37)]) # Peter Luschny, Mar 13 2019
  • Scala
    (1 to 36).scanLeft(1)( * ) // Scala infers 1 and 36 are Int, which become int primitives in the Java Virtual Machine. - Alonso del Arte, Mar 02 2019
    
Previous Showing 21-25 of 25 results.