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.

A232097 a(n) = least k such that 1+2+3+...+k (k-th triangular number) is a multiple of n!; a(n) = least k such that A232096(k) >= n.

Original entry on oeis.org

1, 3, 3, 15, 15, 224, 224, 4095, 76544, 512000, 9511424, 20916224, 410572799, 672358400, 2985984000, 1004293914624, 1004293914624, 78942076928000, 610877575397375, 83179139563520000, 490473044848410624, 6878928869130239999, 185974097225789210624, 1708887984313466880000, 68817755280574852890624
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

a(n) = least k such that A232096(k) >= n.
Each A000217(a(n)) is divisible by A118381(n).
Each a(n) or a(n)+1 is divisible by 2*A060818(n) = A086117(n+1).
Each a(n) or a(n)+1 is divisible by A060828(n), and similarly for all the higher bases.
If we were instead searching for the first occurrence where A232096 gets a new distinct value, then we would have another sequence, b, which would start as: 1, 3, 4, 15, 32, 224, 575, 4095, ... as those distinct values do not appear in monotone order, being for n>=1, A232096(b(n)) = 1, 3, 2, 5, 4, 7, 6, 8, 9, 10, ...

Examples

			a(5) = 15 as binomial(15 + 1, 2) = 120 is the smallest binomial that is divisible by 5! = 120. - _David A. Corneth_, Mar 29 2021
		

Crossrefs

Cf. A000217, A232096. A232101 gives the ratio A000217(a(n)) / n!

Programs

  • PARI
    a(n) = { my(p = 2*n!, f = factor(p), res = oo); for(i = 2^(#f~-1), 2^#f~-1, b = binary(i); pr = prod(j = 1, #f~, f[j,1]^(b[j]*f[j, 2])); ipr = p/pr; for(j = -1, 0, c = lift(chinese(Mod(-1-j, ipr), Mod(j, pr))); if(c > 0, res = min(res, c)))); res } \\ David A. Corneth, Mar 29 2021
  • Scheme
    (define (A232097 n) (let ((increment (* 2 (A060818 n)))) (let loop ((k increment)) (cond ((>= (A232096 (- k 1)) n) (- k 1)) ((>= (A232096 k) n) k) (else (loop (+ k increment)))))))
    ;; Alternative, very naive and slow version:
    (define (A232097v2 n) (let loop ((k 1)) (if (>= (A232096 k) n) k (loop (+ 1 k)))))
    

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

A232098 a(n) is the largest m such that m! divides n^2; a(n) = A055881(n^2).

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
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

For all n, A055881(n) <= a(n), and probably also a(n) <= A055874(n).
Moreover, a(n) > A055881(n) if and only if A055874(n) > A055881(n), thus A055926 gives (also) all the positions where this sequence differs from A055881. Please see Comments section in A055926 for the proof.
Differs from A055874 for the first time at n=840, where a(840)=7, while A055874(840)=8. A232099 gives all the positions where such differences occur.

Crossrefs

Programs

  • Mathematica
    Module[{nn=10,fct},fct=Table[{f,f!},{f,nn}];Table[Select[fct,Mod[n^2,#[[2]]]==0&][[-1,1]],{n,90}]] (* Harvey P. Dale, Aug 11 2024 *)
  • Scheme
    (define (A232098 n) (A055881 (A000290 n)))

Formula

a(n) = A055881(A000290(n)) = A055881(n^2).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/A065887(k) = 1.78672776922161809767... . - Amiram Eldar, Jan 01 2024

A231719 After zero, a(n) = largest m such that m! divides the difference between successive nodes A219666(n-1) and A219666(n) in the infinite trunk of the factorial beanstalk.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 12 2013

Keywords

Comments

The first 4 occurs at n=2206. The first 5 occurs at n = 361788001015 = A226061(16).

Crossrefs

Programs

  • Mathematica
    nn = 1200; m = 1; While[Factorial@ m < nn, m++]; m; t = TakeWhile[
    Reverse@ NestList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, nn, 182], # <= 1000 &]; {0}~Join~Table[SelectFirst[Reverse@ Range@ 10, Divisible[t[[n]] - t[[n - 1]], #!] &], {n, 2, 87}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
  • Scheme
    (define (A231719 n) (if (zero? n) n (A055881 (A230406 n))))

Formula

a(0)=0 and for n>=1, a(n) = A055881(A230406(n)).
For all n, a(A226061(n+1)) = A232096(n).

A059958 Smallest number m such that m*(m+1) has at least n distinct prime factors.

Original entry on oeis.org

1, 2, 5, 14, 65, 209, 714, 7314, 38570, 254540, 728364, 11243154, 58524465, 812646120, 5163068910, 58720148850, 555409903685, 4339149420605, 69322940121435, 490005293940084, 5819629108725509, 76622240600506314
Offset: 1

Views

Author

Labos Elemer, Mar 02 2001

Keywords

Comments

The original definition left unclear whether "at least" or "exactly" n prime factors are required. Now the "at least" variant was chosen, for the other variant ("exactly"), see A069354: At least up to a(18), both criteria yield the same number, and therefore a(n) = A069354(n) - 1, since m and m+1 are always coprime. - M. F. Hasler, Jan 15 2014
10^13 < a(19) <= 69322940121435. - Giovanni Resta, Mar 24 2020
Terms a(1)-a(10) appear in Erdős and Nicolas (1978-1979). - Amiram Eldar, Jun 24 2023

Examples

			For n = 9, a(9)*(a(9) + 1) = 38570*38571 = (2*5*7*19*29)*(3*13*23*43) with 9 distinct prime factors.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Map[PrimeNu[Times @@ #] &, Partition[Range[10^6], 2, 1]]}, Array[FirstPosition[s, n_/; n>=#][[1]] &, Max@ s]] (* Michael De Vlieger, Nov 02 2017 *)
  • PARI
    a(n) = my(m=1); while(omega(m*(m+1)) < n, m++); m; \\ Michel Marcus, Jul 09 2018

Formula

a(n) = Min_{ m | A001221(m*(m+1)) >= n }.
a(n) <= A002110(n) - 1 because A001221((q-1)*q) >= n+1 for q = A002110(n).
Conjecture: a(n) = A069354(n) - 1. - Robert G. Wilson v, Feb 18 2014

Extensions

More terms from William Rex Marshall, Mar 18 2001
Offset corrected and a(15)-a(16) from Donovan Johnson, Jan 31 2009
a(17) from Donovan Johnson, Sep 15 2010
a(18) from Don Reble, Jan 15 2014
Edited by M. F. Hasler, Jan 15 2014
a(19)-a(20) from Michael S. Branicky, Feb 08 2023
a(21) from Michael S. Branicky, Feb 10 2023
a(22) from Michael S. Branicky, Feb 23 2023

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

A232095 Minimal number of factorials which add to 0+1+2+...+n; a(n) = A034968(A000217(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 18 2013

Keywords

Comments

1's occur at positions n=1, n=3 and n=15 as they are such natural numbers that A000217(n) is also one of the factorial numbers (A000142), as we have A000217(1) = 1 = 1!, A000217(3) = 1+2+3 = 6 = 3! and A000217(15) = 1 + 2 + ... + 15 = 120 = 5!
On the other hand, a(2)=2, as A000217(2) = 1+2 = 3 = 2! + 1!. Is this the only occurrence of 2?
Are some numbers guaranteed to occur an infinite number of times?

Crossrefs

Programs

Formula

a(n) = A034968(A000217(n)).
a(n) = A231717(A226061(n+1)). [Not a practical way to compute this sequence. Please see comments at A231717.]
For all n, a(n) >= A232094(n).

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.