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

A089913 Table T(n,k) = lcm(n,k)/gcd(n,k) = n*k/gcd(n,k)^2 read by antidiagonals (n >= 1, k >= 1).

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 6, 6, 4, 5, 2, 1, 2, 5, 6, 10, 12, 12, 10, 6, 7, 3, 15, 1, 15, 3, 7, 8, 14, 2, 20, 20, 2, 14, 8, 9, 4, 21, 6, 1, 6, 21, 4, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 5, 3, 2, 35, 1, 35, 2, 3, 5, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12, 13, 6, 33, 10, 45
Offset: 1

Views

Author

Marc LeBrun, Nov 14 2003

Keywords

Comments

A multiplicative analog of absolute difference A049581. Exponents in prime factorization of T(n,k) are absolute differences of those of n and k. Commutative non-associative operator with identity 1. T(nx,kx)=T(n,k), T(n^x,k^x)=T(n,k)^x, etc.
The bivariate function log(T(., .)) is a distance (or metric) function. It is a weighted analog of A130836, in the sense that if e_i (resp. f_i) denotes the exponent of prime p_i in the factorization of m (resp. of n), then both log(T(m, n)) and A130836(m, n) are writable as Sum_{i} w_i * abs(e_i - f_i). For A130836, w_i = 1 for all i, whereas for log(T(., .)), w_i = log(p_i). - Luc Rousseau, Sep 17 2018
If the analog of absolute difference, as described in the first comment, is determined by factorization into distinct terms of A050376 instead of by prime factorization, the equivalent operation is defined by A059897 and is associative. The positive integers form a group under A059897. The two factorization methods give the same factorization for squarefree numbers (A005117), so that T(.,.) restricted to A005117 is associative. Thus the squarefree numbers likewise form a group under the operation defined by this sequence. - Peter Munn, Apr 04 2019

Examples

			T(6,10) = lcm(6,10)/gcd(6,10) = 30/2 = 15.
  1,  2,  3,  4,  5, ...
  2,  1,  6,  2, 10, ...
  3,  6,  1, 12, 15, ...
  4,  2, 12,  1, 20, ...
  5, 10, 15, 20,  1, ...
  ...
		

Crossrefs

Programs

  • GAP
    T:=Flat(List([1..13],n->List([1..n-1],k->Lcm(k,n-k)/Gcd(k,n-k)))); # Muniru A Asiru, Oct 24 2018
    
  • Mathematica
    Flatten[Table[LCM[i, m - i]/GCD[i, m - i], {m, 15}, {i, m - 1}]] (* Ivan Neretin, Apr 27 2015 *)
  • PARI
    A089913(n,k)=n*k/gcd(n,k)^2 \\ M. F. Hasler, Dec 06 2019

Formula

A130836(n, k) = A001222(T(n, k)). - Luc Rousseau, Sep 17 2018

A286101 Square array A(n,k) read by antidiagonals: A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 7, 16, 16, 7, 11, 12, 13, 12, 11, 16, 46, 67, 67, 46, 16, 22, 23, 106, 25, 106, 23, 22, 29, 92, 31, 191, 191, 31, 92, 29, 37, 38, 211, 80, 41, 80, 211, 38, 37, 46, 154, 277, 379, 436, 436, 379, 277, 154, 46, 56, 57, 58, 59, 596, 61, 596, 59, 58, 57, 56, 67, 232, 436, 631, 781, 862, 862, 781, 631, 436, 232, 67, 79, 80, 529, 212, 991, 302, 85, 302, 991, 212, 529, 80, 79
Offset: 1

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 12 X 12 corner of the array:
   1,   2,   4,   7,   11,   16,   22,   29,   37,   46,   56,   67
   2,   5,  16,  12,   46,   23,   92,   38,  154,   57,  232,   80
   4,  16,  13,  67,  106,   31,  211,  277,   58,  436,  529,   94
   7,  12,  67,  25,  191,   80,  379,   59,  631,  212,  947,  109
  11,  46, 106, 191,   41,  436,  596,  781,  991,   96, 1486, 1771
  16,  23,  31,  80,  436,   61,  862,  302,  193,  467, 2146,  142
  22,  92, 211, 379,  596,  862,   85, 1541, 1954, 2416, 2927, 3487
  29,  38, 277,  59,  781,  302, 1541,  113, 2557,  822, 3829,  355
  37, 154,  58, 631,  991,  193, 1954, 2557,  145, 4006, 4852,  706
  46,  57, 436, 212,   96,  467, 2416,  822, 4006,  181, 5996, 1832
  56, 232, 529, 947, 1486, 2146, 2927, 3829, 4852, 5996,  221, 8647
  67,  80,  94, 109, 1771,  142, 3487,  355,  706, 1832, 8647,  265
		

Crossrefs

Cf. A000124 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(gcd(n,k), lcm(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N x N to N.
A(n,k) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

A006580 a(n) = Sum_{k=1..n-1} lcm(k,n-k).

Original entry on oeis.org

0, 0, 1, 4, 8, 20, 21, 56, 60, 96, 105, 220, 152, 364, 301, 360, 464, 816, 549, 1140, 760, 1036, 1221, 2024, 1196, 2200, 2041, 2484, 2184, 4060, 2205, 4960, 3664, 4224, 4641, 5180, 4008, 8436, 6517, 7072, 5980, 11480, 6321, 13244, 8888, 9540, 11661, 17296
Offset: 0

Views

Author

Keywords

References

  • Marc LeBrun, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Antidiagonal sums of array A003990.
Cf. A209295.

Programs

  • Haskell
    a006580 n = a006580_list !! (n-1)
    a006580_list = map sum a003990_tabl
    -- Reinhard Zumkeller, Aug 05 2012
    
  • Maple
    a:= n-> add(ilcm(j, n-j), j=0..n):
    seq(a(n), n=0..70);  # Alois P. Heinz, Aug 25 2019
  • Mathematica
    Table[ Sum[ LCM[ k, n-k ], {k, 1, n-1} ], {n, 2, 50} ] (* Olivier Gérard, Aug 15 1997 *)
    f1[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); f2[p_, e_] := 1 - (p - 1)*e; a[n_] := (Times @@ f1 @@@ (fct = FactorInteger[n]) - Times @@ f2 @@@ fct)*n/6; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    a(n) = sum(k=1, n-1, lcm(k, n-k)); \\ Michel Marcus, Aug 11 2017

Formula

For n > 0, a(n) = (n/6)*Sum_{d|n} (d*phi(d) - A023900(d)). - Sebastian Karlsson, Oct 02 2021
a(n) = (n/6) * (A057660(n) - A130054(n)), for n > 0. - Amiram Eldar, Apr 28 2023

Extensions

More terms from Olivier Gérard, Aug 15 1997

A075175 Prime factorization of n encoded by interleaving successive prime exponents in unary to bit-positions given by columns of A001477.

Original entry on oeis.org

0, 1, 2, 5, 8, 3, 64, 37, 18, 9, 1024, 7, 32768, 65, 10, 549, 2097152, 19, 268435456, 13, 66, 1025, 68719476736, 39, 136, 32769, 274, 69, 35184372088832, 11, 36028797018963968, 16933, 1026, 2097153, 72, 23, 73786976294838206464
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

Here we store the exponent e_i of p_i (p1=2, p2=3, p3=5, ...) in the factorization of n to the bit positions given by the column i-1 of A001477 viewed as a table (the exponent of 2 is thus stored to bit positions 0, 2, 5, 9, 14, 20, ..., exponent of 3 to 1, 4, 8, 13, 19, ..., exponent of 5 to 3, 7, 12, 18, 25, ...) using unary system, i.e. we actually store 2^(e_i) - 1 in binary.
This injective mapping from N to N offers an example of the proof given in Cameron's book that any distributive lattice can be represented as a sublattice of the power-set lattice P(X) of some set X. With this we can implement GCD (A003989) with bitwise AND (A004198) and LCM (A003990) with bitwise OR (A003986). Also, to test whether x divides y, it is enough to check that ((a(x) OR a(y)) XOR a(y)) = A003987(A003986(a(x),a(y)),a(y)) is zero.

Examples

			a(24) = 39 because 24 = 2^3 * 3^1 so we add the binary words 100101 and 10 to get 100111 in binary = 39 in decimal and a(25) = 136 because 25 = 5^2 so we form a binary word 10001000 = 136 in decimal.
		

References

  • P. J. Cameron, Combinatorics: Topics, Techniques, Algorithms, Cambridge University Press, 1998, page 191. (12.3. Distributive lattices)

Crossrefs

Variant: A075173. Inverse: A075176.
A003989(x, y) = A075176(A004198(a(x), a(y))), A003990(x, y) = A075176(A003986(a(x), a(y))).

A188649 Least common multiple of reversals of divisors of n in decimal representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 84, 31, 574, 255, 488, 71, 162, 91, 20, 84, 22, 32, 168, 260, 62, 72, 1148, 92, 510, 13, 11224, 33, 6106, 1855, 2268, 73, 15106, 93, 40, 14, 6888, 34, 44, 4590, 64, 74, 10248, 658, 260, 1065, 3100, 35, 3240, 55, 149240, 6825, 7820, 95, 7140, 16, 26, 252, 11224, 8680, 66, 76, 12212, 96, 152110, 17, 4536, 37, 6862, 251940, 2024204, 77
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2011

Keywords

Examples

			Divisors(42) = {1,2,3,6,7,14,21,42}, therefore a(42) = lcm(1,2,3,6,7,41,12,24) = 6888.
		

Crossrefs

Cf. A003990 (LCM), A027750 (divisors), A004086 (reversal), A188650.

Programs

  • Haskell
    a188649 n = foldl lcm 1 $ map a004086 $ filter ((== 0) . mod n) [1..n]
    
  • PARI
    a(n) = lcm(apply(x->fromdigits(Vecrev(digits(x))), divisors(n))); \\ Michel Marcus, Mar 13 2018
    
  • Python
    from math import lcm
    from sympy import divisors
    def a(n): return lcm(*(int(str(d)[::-1]) for d in divisors(n)))
    print([a(n) for n in range(1, 78)]) # Michael S. Branicky, Aug 14 2022

Formula

a(A000040(n)) = A004087(n);
a(A002385(n)) = A002385(n), see A188650 for all fixed points.

A286102 Square array A(n,k) read by antidiagonals: A(n,k) = T(lcm(n,k), gcd(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table.

Original entry on oeis.org

1, 3, 3, 6, 5, 6, 10, 21, 21, 10, 15, 14, 13, 14, 15, 21, 55, 78, 78, 55, 21, 28, 27, 120, 25, 120, 27, 28, 36, 105, 34, 210, 210, 34, 105, 36, 45, 44, 231, 90, 41, 90, 231, 44, 45, 55, 171, 300, 406, 465, 465, 406, 300, 171, 55, 66, 65, 64, 63, 630, 61, 630, 63, 64, 65, 66, 78, 253, 465, 666, 820, 903, 903, 820, 666, 465, 253, 78, 91, 90, 561, 230, 1035, 324, 85, 324, 1035, 230, 561, 90, 91
Offset: 1

Views

Author

Antti Karttunen, May 03 2017

Keywords

Comments

The array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Examples

			The top left 12 X 12 corner of the array:
   1,   3,   6,  10,   15,   21,   28,   36,   45,   55,   66,   78
   3,   5,  21,  14,   55,   27,  105,   44,  171,   65,  253,   90
   6,  21,  13,  78,  120,   34,  231,  300,   64,  465,  561,  103
  10,  14,  78,  25,  210,   90,  406,   63,  666,  230,  990,  117
  15,  55, 120, 210,   41,  465,  630,  820, 1035,  101, 1540, 1830
  21,  27,  34,  90,  465,   61,  903,  324,  208,  495, 2211,  148
  28, 105, 231, 406,  630,  903,   85, 1596, 2016, 2485, 3003, 3570
  36,  44, 300,  63,  820,  324, 1596,  113, 2628,  860, 3916,  375
  45, 171,  64, 666, 1035,  208, 2016, 2628,  145, 4095, 4950,  739
  55,  65, 465, 230,  101,  495, 2485,  860, 4095,  181, 6105, 1890
  66, 253, 561, 990, 1540, 2211, 3003, 3916, 4950, 6105,  221, 8778
  78,  90, 103, 117, 1830,  148, 3570,  375,  739, 1890, 8778,  265
		

Crossrefs

Cf. A000217 (row 1 and column 1), A001844 (main diagonal).

Programs

Formula

A(n,k) = T(lcm(n,k), gcd(n,k)), where T(n,k) is sequence A000027 considered as a two-dimensional table, that is, as a pairing function from N x N to N.
A(n,k) = A(k,n), or equivalently, a(A038722(n)) = a(n). [Array is symmetric.]

A091256 Table of lcm(x,y) computed for polynomials over GF(2), where (x,y) runs as (1,1),(1,2),(2,1),(1,3),(2,2),(3,1),...

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 4, 6, 6, 4, 5, 4, 3, 4, 5, 6, 10, 12, 12, 10, 6, 7, 6, 5, 4, 5, 6, 7, 8, 14, 6, 20, 20, 6, 14, 8, 9, 8, 9, 12, 5, 12, 9, 8, 9, 10, 18, 24, 28, 10, 10, 28, 24, 18, 10, 11, 10, 9, 8, 27, 6, 27, 8, 9, 10, 11, 12, 22, 10, 36, 40, 18, 18, 40, 36, 10, 22, 12, 13, 12, 29
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2004

Keywords

Comments

Analogous to A003990.

Crossrefs

A157754 a(1) = 0, a(n) = lcm(A051904(n), A051903(n)) for n >= 2.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Mar 05 2009

Keywords

Comments

a(n) for n >= 2 equals LCM of minimum and maximum exponents in the prime factorization of n.
a(n) for n >= 2 deviates from A072411, first different term is a(360), a(360) = 3, A072411(360) = 6.

Examples

			For n = 12 = 2^2 * 3^1 we have a(12) = lcm(2,1) = 2.
For n = 144 = 2^4 * 3^2 we have a(144) = lcm(4,2) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[LCM @@ {Min@ #, Max@ #} - Boole[n == 1] &@ FactorInteger[n][[All, -1]], {n, 100}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    a(n) = if(n == 1, 0, my(e = factor(n)[,2]); lcm(vecmin(e), vecmax(e))); \\ Amiram Eldar, Sep 11 2024

Formula

a(1) = 0, a(p) = 1, a(pq) = 1, a(pq...z) = 1, a(p^k) = k, for p = primes (A000040), pq = product of two distinct primes (A006881), pq...z = product of k (k > 2) distinct primes p, q, ..., z (A120944), p^k = prime powers (A000961(n) for n > 1) k = natural numbers (A000027).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A033150. - Amiram Eldar, Sep 11 2024

A351962 Square array A(n,k) = A156552(lcm(A005940(1+n), A005940(1+k))), read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 3, 5, 5, 3, 4, 3, 2, 3, 4, 5, 9, 11, 11, 9, 5, 6, 5, 10, 3, 10, 5, 6, 7, 13, 5, 19, 19, 5, 13, 7, 8, 7, 6, 11, 4, 11, 6, 7, 8, 9, 17, 23, 27, 21, 21, 27, 23, 17, 9, 10, 9, 18, 7, 22, 5, 22, 7, 18, 9, 10, 11, 21, 21, 35, 39, 13, 13, 39, 35, 21, 21, 11, 12, 11, 10, 19, 20, 23, 6, 23, 20, 19, 10, 11, 12
Offset: 0

Views

Author

Antti Karttunen, Feb 26 2022

Keywords

Comments

The indices run as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc. The array is symmetric.

Examples

			The top left corner of the array:
      n=0   1   2   3   4   5    6    7    8   9   10   11   12
-----|-----------------------------------------------------------
k= 0 |  0,  1,  2,  3,  4,  5,   6,   7,   8,  9,  10,  11,  12,
   1 |  1,  1,  5,  3,  9,  5,  13,   7,  17,  9,  21,  11,  25,
   2 |  2,  5,  2, 11, 10,  5,   6,  23,  18, 21,  10,  11,  26,
   3 |  3,  3, 11,  3, 19, 11,  27,   7,  35, 19,  43,  11,  51,
   4 |  4,  9, 10, 19,  4, 21,  22,  39,  20,  9,  10,  43,  12,
   5 |  5,  5,  5, 11, 21,  5,  13,  23,  37, 21,  21,  11,  53,
   6 |  6, 13,  6, 27, 22, 13,   6,  55,  38, 45,  22,  27,  54,
   7 |  7,  7, 23,  7, 39, 23,  55,   7,  71, 39,  87,  23, 103,
   8 |  8, 17, 18, 35, 20, 37,  38,  71,   8, 41,  42,  75,  44,
   9 |  9,  9, 21, 19,  9, 21,  45,  39,  41,  9,  21,  43,  25,
  10 | 10, 21, 10, 43, 10, 21,  22,  87,  42, 21,  10,  43,  26,
  11 | 11, 11, 11, 11, 43, 11,  27,  23,  75, 43,  43,  11, 107,
  12 | 12, 25, 26, 51, 12, 53,  54, 103,  44, 25,  26, 107,  12,
  13 | 13, 13, 13, 27, 45, 13,  13,  55,  77, 45,  45,  27, 109,
  14 | 14, 29, 14, 59, 46, 29,  14, 119,  78, 93,  46,  59, 110,
  15 | 15, 15, 47, 15, 79, 47, 111,  15, 143, 79, 175,  47, 207,
  16 | 16, 33, 34, 67, 36, 69,  70, 135,  40, 73,  74, 139,  76,
		

Crossrefs

Cf. A001477 (main diagonal).
Cf. also A341520, A351960, A351961.

Programs

  • PARI
    up_to = 104;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A351962sq(n,k) = A156552(lcm(A005940(1+n),A005940(1+k)));
    A351962list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0,oo, for(col=0,a, i++; if(i > #v, return(v)); v[i] = A351962sq(col,(a-(col))))); (v); };
    v351962 = A351962list(up_to);
    A351962(n) = v351962[1+n];

A257522 Table T(i,j) = denominator of (1/i + 1/j) = i*j/gcd(i*j,i+j) read by antidiagonals (i >= 1, j >= 1).

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 6, 6, 4, 5, 4, 3, 4, 5, 6, 10, 12, 12, 10, 6, 7, 3, 15, 2, 15, 3, 7, 8, 14, 2, 20, 20, 2, 14, 8, 9, 8, 21, 12, 5, 12, 21, 8, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 5, 9, 8, 35, 3, 35, 8, 9, 5, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12
Offset: 1

Views

Author

Ivan Neretin, Apr 27 2015

Keywords

Comments

a(n) is a divisor of A003990(n) and a multiple of A089913(n).

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Denominator[1/i + 1/(m - i)], {m, 15}, {i, m - 1}]]
Previous Showing 11-20 of 31 results. Next