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-30 of 31 results. Next

A232099 Numbers n such that {largest m such that 1, 2, ..., m divide n} is different from {largest m such that m! divides n^2}.

Original entry on oeis.org

840, 2520, 4200, 5880, 7560, 9240, 10920, 12600, 14280, 15960, 17640, 19320, 21000, 22680, 24360, 26040, 27720, 29400, 31080, 32760, 34440, 36120, 37800, 39480, 41160, 42840, 44520, 46200, 47880, 49560, 51240, 52920, 54600, 55440, 56280, 57960, 59640, 61320, 63000
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

Numbers n such that A055874(n) differs from A232098(n). (By the definition of the sequence).
This sequence is a subset of A055926. Please see there for a proof. From that follows that A055881(a(n))+1 is always composite (in range n=1..100000, only values 6, 8, 9 and 10 occur).
Also, incidentally, for the first five terms, n=1..5, a(n) = 70*A055926(n), then a(6)=77*A055926(6), and the next time the ratio A232099(n)/A055926(n) is integral is at n=21, where a(n) = 82*A055926(21), at n=41 (a(41) = 79*A055926(41) = 79*840 = 66360), at n=136, a(136) = 80*A055926(136) = 80*2772 = 221760 and at n=1489, where a(1489) = 80*A055926(1489) = 80 * 30492 = 2439360. The ratio seems to converge towards some value a little less than 80. Please see the plot generated by Plot2 in the links section.

Examples

			840 (= 3*5*7*8) is in the sequence as all natural numbers up to 8 divide 840, but the largest factorial that divides its square, 705600, is 7! (840^2 = 140 * 5040), and 7 differs from 8.
		

Crossrefs

Formula

For all n, a(n) = A055926(A232100(n)). [Follows from the definition of A232100, but cannot as such be used to compute the sequence. Use the given Scheme-program instead.]

A060832 a(n) = Sum_{k>0} floor(n/k!).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 10, 11, 13, 14, 16, 17, 20, 21, 23, 24, 26, 27, 30, 31, 33, 34, 36, 37, 41, 42, 44, 45, 47, 48, 51, 52, 54, 55, 57, 58, 61, 62, 64, 65, 67, 68, 71, 72, 74, 75, 77, 78, 82, 83, 85, 86, 88, 89, 92, 93, 95, 96, 98, 99, 102, 103, 105, 106, 108, 109, 112, 113
Offset: 0

Views

Author

Henry Bottomley, May 01 2001

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [&+[Floor(m/Factorial(k)):k in [1..m]]:m in [1..70]]; // Marius A. Burtea, Jul 11 2019
  • PARI
    a(n)={my(s=0, d=1, f=1); while (n>=d, s+=n\d; f++; d*=f); s} \\ Harry J. Smith, Jul 12 2009
    
  • PARI
    a(n) = round(sumpos(k=1, n\k!)); \\ Michel Marcus, Jan 24 2025
    

Formula

a(n) = a(n-1) + A055881(n).
a(n) = (e-1)*n + f(n) where f(n) < 0. - Benoit Cloitre, Jun 19 2002
f is unbounded in the negative direction. The assertion that f(n) < 0 is correct, since (e-1)*n = Sum_{k>=1} n/k! is term for term >= this sequence. - Franklin T. Adams-Watters, Nov 03 2005
G.f.: (1/(1 - x)) * Sum_{k>=1} x^(k!)/(1 - x^(k!)). - Ilya Gutkovskiy, Jul 11 2019

A207324 List of permutations of 1,2,3,...,n for n=1,2,3,..., in the order they are output by Steinhaus-Johnson-Trotter algorithm.

Original entry on oeis.org

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

Views

Author

R. J. Cano, Sep 14 2012

Keywords

Comments

This table is otherwise similar to A030298, but lists permutations in the order given by the Steinhaus-Trotter-Johnson algorithm. - Antti Karttunen, Dec 28 2012

Examples

			For the set of the first two natural numbers {1,2} the unique permutations possible are 12 and 21, concatenated with 1 for {1} the resulting sequence would be 1, 1, 2, 2, 1.
If we consider up to 3 elements {1,2,3}, we have 123, 132, 312, 321, 231, 213 and the concatenation gives: 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 3, 1, 2, 1, 3.
Up to N concatenations, the sequence will have a total of Sum_{k=1..N} (k! * k) = (N+1)! - 1 = A033312(N+1) terms.
		

Crossrefs

Cf. A001563 (row lengths), A001286 (row sums).
Pair (A130664(n),A084555(n)) = (1,1),(2,3),(4,5),(6,8),(9,11),(12,14),... gives the starting and ending offsets of the n-th permutation in this list.

Extensions

A230417 Lower triangular region of A230415, a triangular table read by rows: T(n, k) tells in how many digit positions the factorial base representations (A007623) of n and k differ, where (n, k) = (0,0), (1,0), (1,1), (2,0), (2,1), (2,2), ..., n >= 0 and (0 <= k <= n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 10 2013

Keywords

Examples

			This triangular table begins:
  0;
  1, 0;
  1, 2, 0;
  2, 1, 1, 0;
  1, 2, 1, 2, 0;
  2, 1, 2, 1, 1, 0;
  1, 2, 2, 3, 2, 3, 0;
  ...
Please see A230415 for examples showing how the terms are computed.
		

Crossrefs

This is a lower, or equivalently, an upper triangular subregion of symmetric square array A230415.

Programs

  • Scheme
    (define (A230417 n) (A230415bi (A003056 n) (A002262 n)))
    (define (A230415bi x y) (let loop ((x x) (y y) (i 2) (d 0)) (cond ((and (zero? x) (zero? y)) d) (else (loop (floor->exact (/ x i)) (floor->exact (/ y i)) (+ i 1) (+ d (if (= (modulo x i) (modulo y i)) 0 1)))))))

Formula

a(n) = A230415bi(A003056(n),A002262(n)). [As a sequence, this is obtained by taking a subsection from array A230415.]
T(n,0) = A060130(n) [the leftmost column].
For n >= 1, T(n,n-1) = A055881(n) [the last nonzero column].
Each entry T(n,k) <= A231714(n,k).

A232742 Numbers n for which the largest m such that (m-1)! divides n is a composite.

Original entry on oeis.org

6, 12, 18, 30, 36, 42, 54, 60, 66, 78, 84, 90, 102, 108, 114, 120, 126, 132, 138, 150, 156, 162, 174, 180, 186, 198, 204, 210, 222, 228, 234, 240, 246, 252, 258, 270, 276, 282, 294, 300, 306, 318, 324, 330, 342, 348, 354, 360, 366, 372, 378, 390, 396, 402, 414
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2013

Keywords

Comments

Numbers n for which A055881(n) is one of the terms of A072668.
Equally: numbers n for which {the number of the trailing zeros in their factorial base representation A007623(n)} + 2 is a composite number.
All terms are divisible by 6.
The sequence can be described in the following manner: Sequence includes all multiples of 3!, except that it excludes from those the multiples of 4! (24), except that it includes the multiples of 5! (120), except that it excludes the multiples of 6! (720), except that it includes the multiples of 7! (5040) (and also those of 8! and 9!, because here 8+1 = 9 is the first odd composite), of which it however excludes the multiples of 10!, except that it includes the multiples of 11!, but excludes the multiples of 12!, but includes the multiples of 13! (and 14! and 15!, because 14-16 are all composites), but excludes the multiples of 16!, and so on, ad infinitum.

Examples

			6 is included because A055881(6)=3 and 3+1 is a composite number.
24 is the first excluded multiple of 6, as A055881(24)=4 and 5 is a prime, not composite, so 24 is not included in this sequence.
120 is the first included multiple of 24, as A055881(120)=5 and 6 is a composite.
		

Crossrefs

Complement: A232741. Subset: A232743.

A230404 a(n) = the largest k such that (k+1)! divides 2n; the number of trailing zeros in the factorial base representation of even numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 31 2013

Keywords

Crossrefs

Used to compute A230405 and A219650. See A007623 for factorial base representation.
Analogous sequence for binary system: A001511.
Cf. A019762.

Programs

Formula

a(n) = A230403(2n) = A055881(2n) - 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*e - 4 = A019762 - 4 = 1.436563... . - Amiram Eldar, Jan 05 2024

A055770 Largest factorial number which divides n.

Original entry on oeis.org

1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 24, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 24, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 24, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 24, 1, 2, 1, 2, 1, 6
Offset: 1

Views

Author

Labos Elemer, Jul 12 2000

Keywords

Comments

Largest m! which divides n.

Examples

			3! = 6 divides 12, so a(12) = 6.
		

Crossrefs

Cf. A000142, A055881 (values of the m's), A055926, A055874, A073575.
Cf. also A053589.

Programs

  • Mathematica
    With[{rf=Reverse[Range[7]!]},Table[SelectFirst[rf,Divisible[n,#]&],{n,120}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 05 2017 *)
  • PARI
    A055770(n) = { my(m=1, i=2); while(!(n%m), m *= i; i++); return(m/(i-1)); } \\ Antti Karttunen, Dec 19 2018

Formula

a(n) = A000142(A055881(n)). - Antti Karttunen, Dec 19 2018

Extensions

Name changed, old name moved to comments by Antti Karttunen, Dec 19 2018

A073575 Sum of factorial numbers dividing n.

Original entry on oeis.org

1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 33, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 33, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 33, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 9, 1, 3, 1, 3, 1, 33, 1, 3, 1, 3, 1, 9
Offset: 1

Views

Author

Vladeta Jovovic, Aug 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Total[Select[Table[i!, {i, n}], Divisible[n, #] &]], {n, 102}] (* Jayanta Basu, Jul 01 2013 *)
  • PARI
    A073575(n) = { my(m=1, i=2, s=0); while(!(n%m), s += m; m *= i; i++); return(s); } \\ Antti Karttunen, Dec 19 2018

Formula

G.f.: Sum_{k>0} k!*x^(k!)/(1-x^(k!)). - Vladeta Jovovic, Dec 13 2002
a(n) = A007489(A055881(n)). - Antti Karttunen, Dec 19 2018

A076733 Largest k such that k! divides C(2n,n).

Original entry on oeis.org

2, 3, 2, 2, 3, 3, 4, 3, 2, 2, 4, 2, 2, 5, 6, 3, 3, 3, 5, 3, 5, 5, 6, 3, 4, 4, 2, 2, 5, 2, 2, 3, 3, 3, 4, 2, 2, 5, 2, 2, 5, 5, 7, 5, 7, 7, 7, 3, 5, 4, 4, 4, 7, 5, 4, 4, 4, 5, 6, 4, 4, 4, 5, 3, 3, 3, 5, 3, 5, 5, 6, 3, 5, 5, 7, 5, 7, 7, 7, 3, 2, 2, 5, 2, 2, 7, 5, 5, 7, 2, 2, 5, 2, 2, 7, 3, 5, 5, 5, 5, 6, 5, 5, 5, 6
Offset: 1

Views

Author

Benoit Cloitre, Oct 28 2002

Keywords

Comments

All a(n) >= 2, with a(n) = 2 if and only if n is in A005836. - Robert Israel, Feb 01 2019

Crossrefs

Programs

  • Maple
    f:= proc(n) local x,k;
      x:= binomial(2*n,n);
      for k from 2 do if not (x/k!)::integer then return k-1 fi od
    end proc:
    map(f, [$1..105]); # Robert Israel, Feb 01 2019
  • Mathematica
    a[n_] := Module[{k = 2}, While[Divisible[Binomial[2n, n], k!], k++]; k-1];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Oct 01 2024 *)
  • PARI
    a(n)=if(n<0,0,k=1; while(binomial(2*n,n)%(k!) == 0,k++); k-1)

A331171 a(n) = min(n, A225901(n)), where A225901 is factorial base flip.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 15, 6, 7, 10, 11, 8, 9, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 48, 49, 52, 53, 50, 51, 66, 67, 70, 71, 68, 69, 60, 61, 64, 65, 62, 63, 54, 55, 58, 59
Offset: 0

Views

Author

Antti Karttunen, Jan 12 2020

Keywords

Comments

For all i, j:
a(i) = a(j) => A060130(i) = A060130(j).
For all i, j > 0:
a(i) = a(j) => A055881(i) = A055881(j).

Crossrefs

Programs

  • PARI
    A225901(n) = { my(s=0, d, k=2); while(n, d=n%k; n=n\k; if(d, s += (k-d)*(k-1)!); k=k+1); (s); };
    A331171(n) = min(n, A225901(n));

Formula

a(n) = min(n, A225901(n)).
Previous Showing 21-30 of 31 results. Next