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-10 of 12 results. Next

A226056 a(n) = Number of common trailing terms on the row n of tables A225632 and A225642.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 24 2013

Keywords

Comments

The positions n, in which a(n)=1: 0, 1, 2, 14, 15, 18, 26, 30, 34, 38, 40, 50, 62, 63, 64, 69, 78, 80, ...
By convention, a(0)=1 as this applies also to the tables A225630 and A225640, whose columns start from zero.
In other words, a(n) = 1 + distance from the first common term on column n (A226055(n)) of tables A225630 and A225640 to the respective fixed point, A003418(n).

Examples

			Row 7 of A225632 is: 1, 12, 84, 420;
Row 7 of A225642 is: 7, 84, 420;
the last two terms (84 and 420) are common to them, thus a(7)=2.
Row 14 of A225632 is: 1, 84, 1260, 16380, 180180, 360360;
Row 14 of A225642 is: 14, 630, 8190, 90090, 360360;
they have no common term until as the last term of those rows (which is A003418(14)=360360), thus a(14)=1.
		

Crossrefs

Programs

Formula

a(n) = A225634(n)-A225638(n) = A225644(n)-A225639(n).

A225654 a(n) = the number of surplus elements on the n-th row of A225632 compared to the n-th row of A225642.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 17 2013

Keywords

Comments

a(n) = how many more iterations is required to reach fixed point A003418(n) with the process described in A225632 and A225642 when starting from partition {1+1+...+1} of n, than when starting from partition {n} of n.
a(0)=0 by convention.

Crossrefs

Cf. A225653 (positions of zeros).

Programs

Formula

a(n) = A225634(n) - A225644(n).
a(n) = A225638(n) - A225639(n).

A225643 Number of steps to reach a fixed point (A003418(n)), when starting from partition {n} of n and continuing with the process described in A225642.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

a(0)=0, as its only partition is an empty partition {}, and by convention lcm()=1, thus it takes no steps to reach from 1 to A003418(0)=1.
The records occur at positions 0, 3, 5, 9, 11, 13, 19, 27, 30, 33, 43, 44, 51, 65, 74, 82, ... and they seem to occur in order, i.e., as A001477. Thus the record-positions probably also give the left inverse function for this sequence. It also seems that each integer occurs only finite times in this sequence, so there should be a right inverse function as well.

Crossrefs

Programs

Formula

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

A003418 Least common multiple (or LCM) of {1, 2, ..., n} for n >= 1, a(0) = 1.

Original entry on oeis.org

1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, 360360, 360360, 360360, 720720, 12252240, 12252240, 232792560, 232792560, 232792560, 232792560, 5354228880, 5354228880, 26771144400, 26771144400, 80313433200, 80313433200, 2329089562800, 2329089562800
Offset: 0

Views

Author

Roland Anderson (roland.anderson(AT)swipnet.se)

Keywords

Comments

The minimal exponent of the symmetric group S_n, i.e., the least positive integer for which x^a(n)=1 for all x in S_n. - Franz Vrabec, Dec 28 2008
Product over all primes of highest power of prime less than or equal to n. a(0) = 1 by convention.
Also smallest number whose set of divisors contains an n-term arithmetic progression. - Reinhard Zumkeller, Dec 09 2002
An assertion equivalent to the Riemann hypothesis is: | log(a(n)) - n | < sqrt(n) * log(n)^2. - Lekraj Beedassy, Aug 27 2006. (This is wrong for n = 1 and n = 2. Should "for n large enough" be added? - Georgi Guninski, Oct 22 2011)
Corollary 3 of Farhi gives a proof that a(n) >= 2^(n-1). - Jonathan Vos Post, Jun 15 2009
Appears to be row products of the triangle T(n,k) = b(A010766) where b = A130087/A130086. - Mats Granvik, Jul 08 2009
Greg Martin (see link) proved that "the product of the Gamma function sampled over the set of all rational numbers in the open interval (0,1) whose denominator in lowest terms is at most n" equals (2*Pi)^(1/2)*a(n)^(-1/2). - Jonathan Vos Post, Jul 28 2009
a(n) = lcm(A188666(n), A188666(n)+1, ..., n). - Reinhard Zumkeller, Apr 25 2011
a(n+1) is the smallest integer such that all polynomials a(n+1)*(1^i + 2^i + ... + m^i) in m, for i=0,1,...,n, are polynomials with integer coefficients. - Vladimir Shevelev, Dec 23 2011
It appears that A020500(n) = a(n)/a(n-1). - Asher Auel, corrected by Bill McEachen, Apr 05 2024
n-th distinct value = A051451(n). - Matthew Vandermast, Nov 27 2009
a(n+1) = least common multiple of n-th row in A213999. - Reinhard Zumkeller, Jul 03 2012
For n > 2, (n-1) = Sum_{k=2..n} exp(a(n)*2*i*Pi/k). - Eric Desbiaux, Sep 13 2012
First column minus second column of A027446. - Eric Desbiaux, Mar 29 2013
For n > 0, a(n) is the smallest number k such that n is the n-th divisor of k. - Michel Lagneau, Apr 24 2014
Slowest growing integer > 0 in Z converging to 0 in Z^ when considered as profinite integer. - Herbert Eberle, May 01 2016
What is the largest number of consecutive terms that are all equal? I found 112 equal terms from a(370261) to a(370372). - Dmitry Kamenetsky, May 05 2019
Answer: there exist arbitrarily long sequences of consecutive terms with the same value; also, the maximal run of consecutive terms with different values is 5 from a(1) to a(5) (see link Roger B. Eggleton). - Bernard Schott, Aug 07 2019
Related to the inequality (54) in Ramanujan's paper about highly composite numbers A002182, also used in A199337: a(A329570(m))^2 is a (not minimal) bound above which all highly composite numbers are divisible by m, according to the right part of that inequality. - M. F. Hasler, Jan 04 2020
For n > 2, a(n) is of the form 2^e_1 * p_2^e_2 * ... * p_m^e_m, where e_m = 1 and e = floor(log_2(p_m)) <= e_1. Therefore, 2^e * p_m^e_m is a primitive Zumkeler number (A180332). Therefore, 2^e_1 * p_m^e_m is a Zumkeller number (A083207). Therefore, for n > 2, a(n) = 2^e_1 * p_m^e_m * r, where r is relatively prime to 2*p_m, is a Zumkeller number (see my proof at A002182 for details). - Ivan N. Ianakiev, May 10 2020
For n > 1, 2|(a(n)+2) ... n|(a(n)+n), so a(n)+2 .. a(n)+n are all composite and (part of) a prime gap of at least n. (Compare n!+2 .. n!+n). - Stephen E. Witham, Oct 09 2021

Examples

			LCM of {1,2,3,4,5,6} = 60. The primes up to 6 are 2, 3 and 5. floor(log(6)/log(2)) = 2 so the exponent of 2 is 2.
floor(log(6)/log(3)) = 1 so the exponent of 3 is 1.
floor(log(6)/log(5)) = 1 so the exponent of 5 is 1. Therefore, a(6) = 2^2 * 3^1 * 5^1 = 60. - _David A. Corneth_, Jun 02 2017
		

References

  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 365.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row products of A133233.
Cf. A025528 (number of prime factors of a(n) with multiplicity).
Cf. A275120 (lengths of runs of consecutive equal terms), A276781 (ordinal transform from term a(1)=1 onward).

Programs

  • Haskell
    a003418 = foldl lcm 1 . enumFromTo 2
    -- Reinhard Zumkeller, Apr 04 2012, Apr 25 2011
    
  • Magma
    [1] cat [Exponent(SymmetricGroup(n)) : n in [1..28]]; // Arkadiusz Wesolowski, Sep 10 2013
    
  • Magma
    [Lcm([1..n]): n in [0..30]]; // Bruno Berselli, Feb 06 2015
    
  • Maple
    A003418 := n-> lcm(seq(i,i=1..n));
    HalfFarey := proc(n) local a,b,c,d,k,s; a := 0; b := 1; c := 1; d := n; s := NULL; do k := iquo(n + b, d); a, b, c, d := c, d, k*c - a, k*d - b; if 2*a > b then break fi; s := s,(a/b); od: [s] end: LCM := proc(n) local i; (1/2)*mul(2*sin(Pi*i),i=HalfFarey(n))^2 end: # Peter Luschny
    # next Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, ilcm(n, a(n-1))) end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Jun 10 2021
  • Mathematica
    Table[LCM @@ Range[n], {n, 1, 40}] (* Stefan Steinerberger, Apr 01 2006 *)
    FoldList[ LCM, 1, Range@ 28]
    A003418[0] := 1; A003418[1] := 1; A003418[n_] := A003418[n] = LCM[n,A003418[n-1]]; (* Enrique Pérez Herrero, Jan 08 2011 *)
    Table[Product[Prime[i]^Floor[Log[Prime[i], n]], {i, PrimePi[n]}], {n, 0, 28}] (* Wei Zhou, Jun 25 2011 *)
    Table[Product[Cyclotomic[n, 1], {n, 2, m}], {m, 0, 28}] (* Fred Daniel Kline, May 22 2014 *)
    a1[n_] := 1/12 (Pi^2+3(-1)^n (PolyGamma[1,1+n/2] - PolyGamma[1,(1+n)/2])) // Simplify
    a[n_] := Denominator[Sqrt[a1[n]]];
    Table[If[IntegerQ[a[n]], a[n], a[n]*(a[n])[[2]]], {n, 0, 28}] (* Gerry Martens, Apr 07 2018 [Corrected by Vaclav Kotesovec, Jul 16 2021] *)
  • PARI
    a(n)=local(t); t=n>=0; forprime(p=2,n,t*=p^(log(n)\log(p))); t
    
  • PARI
    a(n)=if(n<1,n==0,1/content(vector(n,k,1/k)))
    
  • PARI
    a(n)=my(v=primes(primepi(n)),k=sqrtint(n),L=log(n+.5));prod(i=1,#v,if(v[i]>k,v[i],v[i]^(L\log(v[i])))) \\ Charles R Greathouse IV, Dec 21 2011
    
  • PARI
    a(n)=lcm(vector(n,i,i)) \\ Bill Allombert, Apr 18 2012 [via Charles R Greathouse IV]
    
  • PARI
    n=1; lim=100; i=1; j=1; until(n==lim, a=lcm(j,i+1); i++; j=a; n++; print(n" "a);); \\ Mike Winkler, Sep 07 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import sieve
    def integerlog(n,b): # find largest integer k>=0 such that b^k <= n
        kmin, kmax = 0,1
        while b**kmax <= n:
            kmax *= 2
        while True:
            kmid = (kmax+kmin)//2
            if b**kmid > n:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmin
    def A003418(n):
        return reduce(mul,(p**integerlog(n,p) for p in sieve.primerange(1,n+1)),1) # Chai Wah Wu, Mar 13 2021
    
  • Python
    # generates initial segment of sequence
    from math import gcd
    from itertools import accumulate
    def lcm(a, b): return a * b // gcd(a, b)
    def aupton(nn): return [1] + list(accumulate(range(1, nn+1), lcm))
    print(aupton(30)) # Michael S. Branicky, Jun 10 2021
  • Sage
    [lcm(range(1,n)) for n in range(1, 30)] # Zerinvary Lajos, Jun 06 2009
    
  • Scheme
    (define (A003418 n) (let loop ((n n) (m 1)) (if (zero? n) m (loop (- n 1) (lcm m n))))) ;; Antti Karttunen, Jan 03 2018
    

Formula

The prime number theorem implies that lcm(1,2,...,n) = exp(n(1+o(1))) as n -> infinity. In other words, log(lcm(1,2,...,n))/n -> 1 as n -> infinity. - Jonathan Sondow, Jan 17 2005
a(n) = Product (p^(floor(log n/log p))), where p runs through primes not exceeding n (i.e., primes 2 through A007917(n)). - Lekraj Beedassy, Jul 27 2004
Greg Martin showed that a(n) = lcm(1,2,3,...,n) = Product_{i = Farey(n), 0 < i < 1} 2*Pi/Gamma(i)^2. This can be rewritten (for n > 1) as a(n) = (1/2)*(Product_{i = Farey(n), 0 < i <= 1/2} 2*sin(i*Pi))^2. - Peter Luschny, Aug 08 2009
Recursive formula useful for computations: a(0)=1; a(1)=1; a(n)=lcm(n,a(n-1)). - Enrique Pérez Herrero, Jan 08 2011
From Enrique Pérez Herrero, Jun 01 2011: (Start)
a(n)/a(n-1) = A014963(n).
if n is a prime power p^k then a(n)=a(p^k)=p*a(n-1), otherwise a(n)=a(n-1).
a(n) = Product_{k=2..n} (1 + (A007947(k)-1)*floor(1/A001221(k))), for n > 1. (End)
a(n) = A079542(n+1, 2) for n > 1.
a(n) = exp(Sum_{k=1..n} Sum_{d|k} moebius(d)*log(k/d)). - Peter Luschny, Sep 01 2012
a(n) = A025529(n) - A027457(n). - Eric Desbiaux, Mar 14 2013
a(n) = exp(Psi(n)) = 2 * Product_{k=2..A002088(n)} (1 - exp(2*Pi*i * A038566(k+1) / A038567(k))), where i is the imaginary unit, and Psi the second Chebyshev's function. - Eric Desbiaux, Aug 13 2014
a(n) = A064446(n)*A038610(n). - Anthony Browne, Jun 16 2016
a(n) = A000142(n) / A025527(n) = A000793(n) * A225558(n). - Antti Karttunen, Jun 02 2017
log(a(n)) = Sum_{k>=1} (A309229(n, k)/k - 1/k). - Mats Granvik, Aug 10 2019
From Petros Hadjicostas, Jul 24 2020: (Start)
Nair (1982) proved that 2^n <= a(n) <= 4^n for n >= 9. See also Farhi (2009). Nair also proved that
a(n) = lcm(m*binomial(n,m): 1 <= m <= n) and
a(n) = gcd(a(m)*binomial(n,m): n/2 <= m <= n). (End)
Sum_{n>=1} 1/a(n) = A064859. - Bernard Schott, Aug 24 2020

A225632 Irregular table read by rows: n-th row gives distinct values of successively iterated Landau-like functions for n, starting with the initial value 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 1, 4, 12, 1, 6, 30, 60, 1, 6, 30, 60, 1, 12, 84, 420, 1, 15, 120, 840, 1, 20, 180, 1260, 2520, 1, 30, 210, 840, 2520, 1, 30, 420, 4620, 13860, 27720, 1, 60, 660, 4620, 13860, 27720, 1, 60, 780, 8580, 60060, 180180, 360360
Offset: 1

Views

Author

Antti Karttunen, May 13 2013

Keywords

Comments

The leftmost column of table (the initial term of each row, T(n,1)) is 1, corresponding to lcm(1,1,...,1) computed from the {1+1+...+1} partition of n, after which, on the same row, each further term T(n,i) is computed by finding such a partition [p1,p2,...,pk] of n so that value of lcm(T(n,i-1), p1,p2,...,pk) is maximized, until finally A003418(n) is reached, which will be listed as the last term of row n (as the result would not change after that, if we continued the same process).

Examples

			The first fifteen rows of table are:
  1;
  1,   2;
  1,   3,    6;
  1,   4,   12;
  1,   6,   30,    60;
  1,   6,   30,    60;
  1,  12,   84,   420;
  1,  15,  120,   840;
  1,  20,  180,  1260,   2520;
  1,  30,  210,   840,   2520;
  1,  30,  420,  4620,  13860,  27720;
  1,  60,  660,  4620,  13860,  27720;
  1,  60,  780,  8580,  60060, 180180, 360360;
  1,  84, 1260, 16380, 180180, 360360;
  1, 105, 4620, 60060, 180180, 360360;
		

Crossrefs

Cf. A225634 (length of n-th row), A000793 (n>=2 gives the second column).
Cf. A225629 (second largest/rightmost term of n-th row).
Cf. A003418 (largest/rightmost term of n-th row).
Cf. A225642 (row n starts from n instead of 1).
Cf. A226055 (the first term common with A225642 on the n-th row).
Cf. A225638 (distance to that first common term from the beginning of the row n).
Cf. A226056 (number of trailing terms common with A225642 on the n-th row).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {1},
          `if`(i<1, {}, {seq(map(x->ilcm(x, `if`(j=0, 1, i)),
           b(n-i*j, i-1))[], j=0..n/i)}))
        end:
    T:= proc(n) option remember; local d, h, l, ll;
          l:= b(n$2); ll:= NULL; d:=1; h:=0;
          while d<>h do ll:= ll, d; h:= d;
            d:= max(seq(ilcm(h, i), i=l))
          od; ll
        end:
    seq(T(n), n=1..20);  # Alois P. Heinz, May 29 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, {1}, If[i<1, {}, Table[Map[Function[{x}, LCM[x, If[j==0, 1, i]]], b[n-i*j, i-1]], {j, 0, n/i}]]]; T[n_] := T[n] = Module[{d, h, l, ll}, l=b[n, n]; ll={}; d=1; h=0; While[d != h, AppendTo[ll, d]; h=d; d = Max[ Table[LCM[h, i], {i, l}]]]; ll]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)

A225640 Array A(n,k) of iterated Landau-like functions, where on the row n=0 A(0,0)=1 and A(0,k>=1)=k, and the successive rows A(n,k) give a maximum value lcm(p1,p2,...,pj,A(n-1,k)) for all partitions {p1+p2+...+pj} of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 6, 2, 1, 1, 5, 12, 6, 2, 1, 1, 6, 30, 12, 6, 2, 1, 1, 7, 30, 60, 12, 6, 2, 1, 1, 8, 84, 60, 60, 12, 6, 2, 1, 1, 9, 120, 420, 60, 60, 12, 6, 2, 1, 1, 10, 180, 840, 420, 60, 60, 12, 6, 2, 1, 1, 11, 210, 1260, 840, 420, 60, 60, 12, 6, 2, 1, 1
Offset: 0

Views

Author

Antti Karttunen, May 14 2013

Keywords

Comments

In this array the maximization of LCM starts from partition {k} of k, instead of partition {1+1+...+1} as in A225630.

Examples

			The top-left corner of the array:
1, 1, 2, 3,  4,  5,  6,   7,   8,   9,    10,    11,    12, ...
1, 1, 2, 6, 12, 30, 30,  84, 120,  180,  210,   330,   420, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 1260,  840,  4620,  4620, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 13860, 13860, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, ...
...
		

Crossrefs

Transpose: A225641.
Cf. A225642, A225644, A001477 (row 0), A225646 (row 1).
Rows converge towards A003418 (main diagonal of this array).
See A225630 for a variant employing a similar process, but which uses 1 in column n as the initial seed for that column, instead of n.

Programs

  • Scheme
    (define (A225640 n) (A225640bi (A025581 n) (A002262 n)))
    (define (A225640bi col row) (let ((maxlcm (list 0))) (let loop ((prevmaxlcm (max 1 col)) (stepsleft row)) (if (zero? stepsleft) prevmaxlcm (begin (gen_partitions col (lambda (p) (set-car! maxlcm (max (car maxlcm) (apply lcm (cons prevmaxlcm p)))))) (loop (car maxlcm) (- stepsleft 1)))))))
    (define (gen_partitions m colfun) (let recurse ((m m) (b m) (n 0) (partition (list))) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (cons i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))

A225639 a(n) is the index of the first row in column n of A225640 where A226055(n) occurs.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 21 2013

Keywords

Comments

Consider an algorithm which finds a maximal value lcm(p1,p2,...,pk,prevmax) among all partitions {p1+p2+...+pk} of n, where the "seed number" prevmax is a maximal value from the previous iteration.
a(n) gives the number of such iterations needed when starting from the initial seed value n, for the process to reach the first identical value (A226055(n)) that is eventually produced when the same algorithm is started with the initial seed value of 1.
The records occur at positions 0, 5, 11, 14, 21, 26, 30, 38, 50, 62, 74, 80, ...

Examples

			Looking at A225632 and A225642, which are just arrays A225630 and A225640 transposed and eventually repeating values removed, we see that:
row 11 of A225632 is 1, 30, 420, 4620, 13860, 27720;
row 11 of A225642 is 11, 330, 4620, 13860, 27720;
their first common term, 4620 (= A226055(11)), occurs as two positions after the initial 11 of that row in A225642, thus a(11)=2.
Equivalently, 4620 occurs as the element A(2,11) of array A225640.
		

Programs

  • Scheme
    (define (A225639 n) (if (zero? n) n (let ((fun1 (lambda (seed) (let ((max1 (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! max1 (max (car max1) (lcm seed p))))) (car max1)))) (fun2 (lambda (seed) (let ((max2 (list 0))) (fold_over_partitions_of n (max 1 n) lcm (lambda (p) (set-car! max2 (max (car max2) (lcm seed p))))) (car max2))))) (steps-to-convergence-nondecreasing fun2 fun1 n 1))))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
    (define (steps-to-convergence-nondecreasing fun1 fun2 initval1 initval2) (let loop ((steps 0) (a1 initval1) (a2 initval2)) (cond ((equal? a1 a2) steps) ((< a1 a2) (loop (+ steps 1) (fun1 a1) a2)) (else (loop steps a1 (fun2 a2))))))

Formula

a(n) = A225638(n) - A225654(n) = A225644(n) - A226056(n). (But please see the given Scheme-program for how this sequence can actually be computed.)
A226055(n) = A225640(a(n),k) = A225630(A225638(n),k).

A225638 a(n) is the row index where the first term in column n of A225630 equivalent to some term in column n of A225640 is found from.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 20 2013

Keywords

Comments

Consider an algorithm which finds a maximum value lcm(p1,p2,...,pk,prevmax) among all partitions {p1+p2+...+pk} of n, where the "seed number" prevmax is such a maximum value from the previous iteration.
a(n) tells the number of such iterations needed, when starting from the initial seed value 1, for the process to reach the first identical value (A226055(n)) that is eventually produced when the same algorithm is started with the initial seed value of n.

Examples

			Looking at A225632 and A225642, which are just arrays A225630 and A225640 transposed and repeating values removed, we see that:
row 11 of A225632 is 1, 30, 420, 4620, 13860, 27720;
row 11 of A225642 is 11, 330, 4620, 13860, 27720;
their first common term, 4620 (= A226055(11)), occurs as three positions after the initial 1 of that row in A225632, thus a(11)=3.
Equivalently, 4620 occurs as the element A(3,11) of array A225630.
		

Programs

  • Scheme
    (define (A225638 n) (if (zero? n) n (let ((fun1 (lambda (seed) (let ((max1 (list 0))) (fold_over_partitions_of n 1 lcm (lambda (p) (set-car! max1 (max (car max1) (lcm seed p))))) (car max1)))) (fun2 (lambda (seed) (let ((max2 (list 0))) (fold_over_partitions_of n (max 1 n) lcm (lambda (p) (set-car! max2 (max (car max2) (lcm seed p))))) (car max2))))) (steps-to-convergence-nondecreasing fun1 fun2 1 n))))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
    (define (steps-to-convergence-nondecreasing fun1 fun2 initval1 initval2) (let loop ((steps 0) (a1 initval1) (a2 initval2)) (cond ((equal? a1 a2) steps) ((< a1 a2) (loop (+ steps 1) (fun1 a1) a2)) (else (loop steps a1 (fun2 a2))))))

Formula

a(n) = A225639(n) + A225654(n) = A225634(n) - A226056(n). (But please see the Scheme-program how this sequence actually can be computed.)
A226055(n) = A225630(a(n),k) = A225640(A225639(n),k).

A226055 a(n) is the first common term in column n of tables A225630 and A225640, when scanned from the top to bottom.

Original entry on oeis.org

1, 1, 2, 3, 4, 30, 6, 84, 120, 180, 210, 4620, 4620, 780, 360360, 360360, 240240, 92820, 12252240, 175560, 58198140, 116396280, 360360, 753480, 2677114440, 13385572200, 26771144400, 40156716600, 2677114440, 13665960, 2329089562800, 82990547640, 48134517631200
Offset: 0

Views

Author

Antti Karttunen, May 24 2013

Keywords

Comments

Consider an algorithm which finds a maximum value lcm(p1,p2,...,pk,prevmax) among all partitions {p1+p2+...+pk} of n, where the "seed number" prevmax is such a maximum value from the previous iteration.
a(n) gives the first identical value encountered, after repeated iterations, when starting from the initial seed value 1, and when starting from the initial seed value of n.
Equivalently, the first common term occurring on the row n of tables A225632 and A225642, when scanning the rows from the left. These are A225638(n)-th and A225639(n)-th terms from the beginning of each row, respectively.

Examples

			Row 8 of A225632 is 1, 15, 120, 840;
Row 8 of A225642 is 8, 120, 840;
Their first common term from the left is 120, thus a(8)=120.
		

Crossrefs

Also, a(n) is the A226056(n)-th rightmost term on the row n in tables A225632 and A225642.

Programs

Formula

a(n) = A225630(A225638(n),n) = A225640(A225639(n),n).

A225646 a(n) = lcm(n,p1,p2,...,pk) for such a partition of n which maximizes this value among all partitions {p1+p2+...pk} of n.

Original entry on oeis.org

1, 1, 2, 6, 12, 30, 30, 84, 120, 180, 210, 330, 420, 780, 630, 840, 1680, 3570, 1386, 7980, 1980, 4620, 6930, 19320, 9240, 23100, 30030, 41580, 16380, 73080, 10920, 143220, 110880, 120120, 157080, 120120, 180180, 512820, 311220, 240240, 360360, 1231230, 180180
Offset: 0

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

Second row of table A225640.
a(0)=1 by convention.

Crossrefs

Programs

  • Scheme
    (define (A225646 n) (let ((maxlcm (list 1))) (fold_over_partitions_of n n lcm (lambda (p) (set-car! maxlcm (max (car maxlcm) p)))) (car maxlcm)))
    (define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
Showing 1-10 of 12 results. Next