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

A055874 a(n) = largest m such that 1, 2, ..., m divide n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jul 16 2000

Keywords

Comments

From Antti Karttunen, Nov 20 2013 & Jan 26 2014: (Start)
Differs from A232098 for the first time at n=840, where a(840)=8, while A232098(840)=7. A232099 gives all the differing positions. See also the comments at A055926 and A232099.
The positions where a(n) is an odd prime is given by A017593 up to A017593(34)=414 (so far all 3's), after which comes the first 7 at a(420). (A017593 gives the positions of 3's.)
(Continued on Jan 26 2014):
Only terms of A181062 occur as values.
A235921 gives such n where a(n^2) (= A235918(n)) differs from A071222(n-1) (= A053669(n)-1). (End)
a(n) is the largest m such that A003418(m) divides n. - David W. Wilson, Nov 20 2014
a(n) is the largest number of consecutive integers dividing n. - David W. Wilson, Nov 20 2014
A051451 gives indices where record values occur. - Gionata Neri, Oct 17 2015
Yuri Matiyasevich calls this the maximum inheritable divisor of n. - N. J. A. Sloane, Dec 14 2023

Examples

			a(12) = 4 because 1, 2, 3, 4 divide 12, but 5 does not.
		

Crossrefs

Programs

  • Haskell
    a055874 n = length $ takeWhile ((== 0) . (mod n)) [1..]
    -- Reinhard Zumkeller, Feb 21 2012, Dec 09 2010
    
  • Maple
    N:= 1000: # to get a(1) to a(N)
    A:= Vector(N,1);
    for m from 2 do
      Lm:= ilcm($1..m);
      if Lm > N then break fi;
      if Lm mod (m+1) = 0 then next fi;
      for k from 1 to floor(N/Lm) do
        A[k*Lm]:=m
      od
    od:
    convert(A,list); # Robert Israel, Nov 28 2014
  • Mathematica
    a[n_] := Module[{m = 1}, While[Divisible[n, m++]]; m - 2]; Array[a, 100] (* Jean-François Alcover, Mar 07 2016 *)
  • PARI
    a(n) = my(m = 1); while ((n % m) == 0, m++); m - 1; \\ Michel Marcus, Jan 17 2014
    
  • Python
    from itertools import count
    def A055874(n):
        for m in count(1):
            if n % m:
                return m-1 # Chai Wah Wu, Jan 02 2022
  • Scheme
    (define (A055874 n) (let loop ((m 1)) (if (not (zero? (modulo n m))) (- m 1) (loop (+ 1 m))))) ;; Antti Karttunen, Nov 18 2013
    

Formula

a(n) = A007978(n) - 1. - Antti Karttunen, Jan 26 2014
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A064859 (Farhi, 2009). - Amiram Eldar, Jul 25 2022

A055881 a(n) = largest m such that m! divides n.

Original entry on oeis.org

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

Views

Author

Leroy Quet and Labos Elemer, Jul 16 2000

Keywords

Comments

Number of factorial divisors of n. - Amarnath Murthy, Oct 19 2002
The sequence may be constructed as follows. Step 1: start with 1, concatenate and add +1 to last term gives: 1,2. Step 2: 2 is the last term so concatenate twice those terms and add +1 to last term gives: 1, 2, 1, 2, 1, 3 we get 6 terms. Step 3: 3 is the last term, concatenate 3 times those 6 terms and add +1 to last term gives: 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, iterates. At k-th step we obtain (k+1)! terms. - Benoit Cloitre, Mar 11 2003
From Benoit Cloitre, Aug 17 2007, edited by M. F. Hasler, Jun 28 2016: (Start)
Another way to construct the sequence: start from an infinite series of 1's:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... Replace every second 1 by a 2 giving:
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, ... Replace every third 2 by a 3 giving:
1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, ... Replace every fourth 3 by a 4 etc. (End)
This sequence is the fixed point, starting with 1, of the morphism m, where m(1) = 1, 2, and for k > 1, m(k) is the concatenation of m(k - 1), the sequence up to the first k, and k + 1. Thus m(2) = 1, 2, 1, 3; m(3) = 1, 2, 1, 3, 1, 2, 1, 2, 1, 4; m(4) = 1, 2, 1, 3, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 5, etc. - Franklin T. Adams-Watters, Jun 10 2009
All permutations of n elements can be listed as follows: Start with the (arbitrary) permutation P(0), and to obtain P(n + 1), reverse the first a(n) + 1 elements in P(n). The last permutation is the reversal of the first, so the path is a cycle in the underlying graph. See example and fxtbook link. - Joerg Arndt, Jul 16 2011
Positions of rightmost change with incrementing rising factorial numbers, see example. - Joerg Arndt, Dec 15 2012
Records appear at factorials. - Robert G. Wilson v, Dec 21 2012
One more than the number of trailing zeros (A230403(n)) in the factorial base representation of n (A007623(n)). - Antti Karttunen, Nov 18 2013
A062356(n) and a(n) coincide quite often. - R. J. Cano, Aug 04 2014
For n>0 and 1<=j<=(n+1)!-1, (n+1)^2-1=A005563(n) is the number of times that a(j)=n-1. - R. J. Cano, Dec 23 2016

Examples

			a(12) = 3 because 3! is highest factorial to divide 12.
From _Joerg Arndt_, Jul 16 2011: (Start)
All permutations of 4 elements via prefix reversals:
   n:   permutation  a(n)+1
   0:   [ 0 1 2 3 ]  -
   1:   [ 1 0 2 3 ]  2
   2:   [ 2 0 1 3 ]  3
   3:   [ 0 2 1 3 ]  2
   4:   [ 1 2 0 3 ]  3
   5:   [ 2 1 0 3 ]  2
   6:   [ 3 0 1 2 ]  4
   7:   [ 0 3 1 2 ]  2
   8:   [ 1 3 0 2 ]  3
   9:   [ 3 1 0 2 ]  2
  10:   [ 0 1 3 2 ]  3
  11:   [ 1 0 3 2 ]  2
  12:   [ 2 3 0 1 ]  4
  13:   [ 3 2 0 1 ]  2
  14:   [ 0 2 3 1 ]  3
  15:   [ 2 0 3 1 ]  2
  16:   [ 3 0 2 1 ]  3
  17:   [ 0 3 2 1 ]  2
  18:   [ 1 2 3 0 ]  4
  19:   [ 2 1 3 0 ]  2
  20:   [ 3 1 2 0 ]  3
  21:   [ 1 3 2 0 ]  2
  22:   [ 2 3 1 0 ]  3
  23:   [ 3 2 1 0 ]  2
(End)
From _Joerg Arndt_, Dec 15 2012: (Start)
The first few rising factorial numbers (dots for zeros) with 4 digits and the positions of the rightmost change with incrementing are:
  [ 0]    [ . . . . ]   -
  [ 1]    [ 1 . . . ]   1
  [ 2]    [ . 1 . . ]   2
  [ 3]    [ 1 1 . . ]   1
  [ 4]    [ . 2 . . ]   2
  [ 5]    [ 1 2 . . ]   1
  [ 6]    [ . . 1 . ]   3
  [ 7]    [ 1 . 1 . ]   1
  [ 8]    [ . 1 1 . ]   2
  [ 9]    [ 1 1 1 . ]   1
  [10]    [ . 2 1 . ]   2
  [11]    [ 1 2 1 . ]   1
  [12]    [ . . 2 . ]   3
  [13]    [ 1 . 2 . ]   1
  [14]    [ . 1 2 . ]   2
  [15]    [ 1 1 2 . ]   1
  [16]    [ . 2 2 . ]   2
  [17]    [ 1 2 2 . ]   1
  [18]    [ . . 3 . ]   3
  [19]    [ 1 . 3 . ]   1
  [20]    [ . 1 3 . ]   2
  [21]    [ 1 1 3 . ]   1
  [22]    [ . 2 3 . ]   2
  [23]    [ 1 2 3 . ]   1
  [24]    [ . . . 1 ]   4
  [25]    [ 1 . . 1 ]   1
  [26]    [ . 1 . 1 ]   2
(End)
		

Crossrefs

This sequence occurs also in the next to middle diagonals of A230415 and as the second rightmost column of triangle A230417.
Other sequences related to factorial base representation (A007623): A034968, A084558, A099563, A060130, A227130, A227132, A227148, A227149, A153880.
Analogous sequence for binary (base-2) representation: A001511.

Programs

  • Mathematica
    Table[Length[Intersection[Divisors[n], Range[5]!]], {n, 125}] (* Alonso del Arte, Dec 10 2012 *)
    f[n_] := Block[{m = 1}, While[Mod[n, m!] == 0, m++]; m - 1]; Array[f, 105] (* Robert G. Wilson v, Dec 21 2012 *)
  • PARI
    See Cano link.
    
  • PARI
    n=5; f=n!; x='x+O('x^f); Vec(sum(k=1,n,x^(k!)/(1-x^(k!)))) \\ Joerg Arndt, Jan 28 2014
    
  • PARI
    a(n)=for(k=2,n+1,if(n%k, return(k-1),n/=k)) \\ Charles R Greathouse IV, May 28 2015
  • Scheme
    (define (A055881 n) (let loop ((n n) (i 2)) (cond ((not (zero? (modulo n i))) (- i 1)) (else (loop (/ n i) (+ 1 i))))))
    

Formula

G.f.: Sum_{k > 0} x^(k!)/(1 - x^(k!)). - Vladeta Jovovic, Dec 13 2002
a(n) = A230403(n)+1. - Antti Karttunen, Nov 18 2013
a(n) = A230415(n-1,n) = A230415(n,n-1) = A230417(n,n-1). - Antti Karttunen, Nov 19 2013
a(m!+n) = a(n) if 1 <= n <= m*m! - 1 = A001563(m) - 1. - R. J. Cano, Jun 27 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = e - 1 (A091131). - Amiram Eldar, Jul 23 2022

A055926 Numbers k such that {largest m such that 1, 2, ..., m divide k} is different from {largest m such that m! divides k}; numbers k which are either odd multiples of 12 or the largest m such that (m-1)! divides k is a composite number > 5.

Original entry on oeis.org

12, 36, 60, 84, 108, 120, 132, 156, 180, 204, 228, 240, 252, 276, 300, 324, 348, 360, 372, 396, 420, 444, 468, 480, 492, 516, 540, 564, 588, 600, 612, 636, 660, 684, 708, 732, 756, 780, 804, 828, 840, 852, 876, 900, 924, 948, 960, 972, 996, 1020, 1044, 1068
Offset: 1

Views

Author

Leroy Quet, Jul 16 2000

Keywords

Comments

From Antti Karttunen, Nov 20 - Dec 06 2013: (Start)
This sequence has several interpretations:
Numbers k such that A055874(k) differs from A055881(k). [Leroy Quet's original definition of the sequence. Note that A055874(k) >= A055881(k) for all k.]
Numbers k such that {largest m such that m! divides k^2} is different from {largest m such that m! divides k}, i.e., numbers k for which A232098(k) > A055881(k).
Numbers k which are either 12 times an odd number (A073762) or the largest m such that (m-1)! divides k is a composite number > 5 (A232743).
Please see my attached notes for the proof of the equivalence of these interpretations.
Additional implications based on that proof:
A232099 is a subset of this sequence.
A055881(a(n))+1 is always composite. In the range n = 1..17712, only values 4, 6, 8, 9 and 10 occur.
The new definition can be also rephrased by saying that the sequence contains all the positive integers k whose factorial base representation of (A007623(k)) either ends as '...200' (in which case k is an odd multiple of 12, 12 = '200', 36 = '1200', 60 = '2200', ...) or the number of trailing zeros + 2 in that representation is a composite number greater than or equal to 6, e.g. 120 = '10000' (in other words, A055881(k) is one of the terms of A072668 after the initial 3). Together these conditions also imply that all the terms are divisible by 12.
(End)

Examples

			12 is included because 3! is the largest factorial to divide 12, but 1, 2, 3 and 4 all divide 12. Equally, 12 is included because it is one of the terms of A073762, or equally, because its factorial base representation ends with digits '...200': A007623(12) = 200.
840 (= 3*5*7*8) is included because the largest factorial which divides 840 is 5! (840 = 7*120), but all positive integers up to 8 divide 840. Equally, 840 is included because it is one of the terms of A232743 as 5+1 = 6 is a composite number larger than 5. Note that A007623(840) = 110000.
		

Crossrefs

Union of A073762 and A232743. Equivalently, setwise difference of A232742 and A017593. Subset: A232099.

Extensions

More terms from Antti Karttunen, Dec 01 2013

A232096 a(n) = largest m such that m! divides 1+2+...+n; a(n) = A055881(A000217(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Crossrefs

A042963 gives the positions of ones and A014601 the positions of larger terms.

Programs

Formula

a(n) = A055881(A000217(n)).
a(n) = A231719(A226061(n+1)). [Not a practical way to compute this sequence, but follows from the definitions]

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.]

A233267 a(n) = A055881(A001110(n)); the largest m such that m! divides the n-th positive number which is both triangular and square.

Original entry on oeis.org

1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 11, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 7, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2013

Keywords

Comments

The sequence seems to have a nice symmetric fractal structure. The new distinct values (records) occur at positions k = 1, 2, 4, 12, 48, 288, 2016, 4032, ... those values being 1, 3, 4, 7, 11, 12, 13, 14, ...
Furthermore, each prefix from 1 to 2*k-1 (centered on a new record) seems to be palindromic. 2*k-1 runs as: 1, 3, 7, 23, 95, 575, 4031, 8063, ...
On the other hand, if we list ALL the positions p where prefix 1..p is palindromic, we obtain a sequence: 1, 3, 7, 11, 23, 35, 47, 95, 143, 191, 239, 287, 575, 863, 1151, 1439, 1727, 2015, 4031, ...
Its first differences is again familiar: 2, 4, 4, 12, 12, 12, 48, 48, 48, 48, 48, 288, 288, 288, 288, 288, 288, 2016, ... which appear to consist of 1, 2, 3, 5, 6, ... copies of the first mentioned sequence from its term 2 onward.
None of these sequences (except maybe the last) are in the OEIS as of Dec 06 2013.
Note: A233269(n) = A055881(A001109(n)) seems to have the same overall structure, but some of the records are missing/different.

Crossrefs

Programs

Formula

a(n) = A055881(A001110(n)).

A235918 Largest m such that 1, 2, ..., m divide n^2.

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1
Offset: 1

Views

Author

Michel Marcus, Jan 17 2014

Keywords

Comments

Note that a(n) is equal to A071222(n-1) = A053669(n)-1 for the first 209 values of n. The first difference occurs at n=210, where a(210)=7, while A071222(209)=10. A235921 lists all n where a(n) differs from A071222(n-1). (Note also that a(n) is equal to A071222(n+29) for n=1..179.) - [Comment revised by Antti Karttunen, Jan 26 2014 because of the changed definition of A235921 and newly inserted a(0)=1 term of A071222.]
See A055874 for a similar comment concerning the difference between A055874 and A232098.
Average value is 1.9124064... = sum_{n>=1} 1/A019554(A003418(n)). - Charles R Greathouse IV, Jan 24 2014

Crossrefs

One less than A236454.

Programs

  • Mathematica
    a[n_] := Module[{m = 1}, While[Divisible[n^2, m++]]; m - 2]; Array[a, 100] (* Jean-François Alcover, Mar 07 2016 *)
  • PARI
    a(n) = my(m = 1); while ((n^2 % m) == 0, m++); m - 1; \\ Michel Marcus, Jan 17 2014

Formula

a(n) = A055874(n^2).
a(n) = A236454(n)-1.

A233269 a(n) = A055881(A001109(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 06 2013

Keywords

Comments

Compared to A233267, here the records occur in slightly different positions: 1, 2, 8, 24, 48, 384, 3456, ..., the record values being 1, 3, 4, 5, 7, 8, 9, ...
Lengths of palindromic prefixes begin: 1, 3, 5, 7, 15, 23, 47, 95, 143, 191, 239, 287, 335, 383, 767, 1151, 1535, 1919, 2303, 2687, 3071, 3455, ...
Their first differences: 2, 2, 2, 8, 8, 24, 48, 48, 48, 48, 48, 48, 48, 384, 384, 384, 384, 384, 384, 384, 384, ...
The positions of palindrome-centers: 1, 2, 3, 7, 11, 23, 47, 71, 95, 119, 143, 167, 191, 383, 575, 767, 959, 1151, 1343, 1535, 1727, ...
and their first differences: 1, 1, 1, 4, 4, 12, 24, 24, 24, 24, 24, 24, 24, 192, 192, 192, 192, 192, 192, 192, 192, ...
None of these are currently in the OEIS (except maybe record values).

Crossrefs

Programs

Showing 1-8 of 8 results.