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

A013942 Triangle of numbers T(n,k) = floor(2n/k), k=1..2n, read by rows.

Original entry on oeis.org

2, 1, 4, 2, 1, 1, 6, 3, 2, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 12, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 14, 7, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 16, 8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 18, 9, 6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 20, 10, 6, 5, 4, 3
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the leading term in period of continued fraction for n-th nonsquare.
Row A026741(n) contains n and all rows with a smaller row number do not contain n. - Reinhard Zumkeller, Jun 04 2013

Examples

			First four rows:
  2 1
  4 2 1 1
  6 3 2 1 1 1
  8 4 2 2 1 1 1 1
  ...
		

Crossrefs

Cf. A010766.
Cf. A005843 (row lengths and left edge), A062550 (row sums).

Programs

  • Haskell
    a013942 n k = a013942_tabf !! (n-1) !! (k-1)
    a013942_row n = map (div (n * 2)) [1 .. 2 * n]
    a013942_tabf = map a013942_row [1 ..]
    -- Reinhard Zumkeller, Jun 04 2013
    
  • Mathematica
    f[n_,h_]:=FractionalPart[(n^2+h)^(1/2)];
    g[n_,h_]:=Floor[1/f[n,h]];
    TableForm[Table[g[n,h],{n,1,13},{h,1,2n}]]
  • PARI
    T(n, k) = 2*n\k;
    tabf(nn) = for (n=1, nn, for (k=1, 2*n, print1(T(n,k), ", ")); print()); \\ Michel Marcus, Sep 30 2016

Formula

T(n,k) = floor(2n/k), k=1,...,2n.
T(n,k) = [1/{sqrt(k+n^2)}], k=1,2,...,2n, {}=fractional part, []=floor.

Extensions

Keyword tabl replaced by tabf and missing a(90)=1 inserted by Reinhard Zumkeller, Jun 04 2013

A123229 Triangle read by rows: T(n, m) = n - (n mod m).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 06 2006

Keywords

Comments

An equivalent definition: Consider A000012 as a lower-left all-1's triangle, and build the matrix product by multiplication with A127093 from the right. That is, T(n,m) = Sum_{j=m..n} A000012(n,j)*A127093(j,m) = Sum_{j=m..n} A127093(j,m) = m*floor(n/m) = m*A010766(n,m). - Gary W. Adamson, Jan 05 2007
The number of parts k in the triangle is A000203(k) hence the sum of parts k is A064987(k). - Omar E. Pol, Jul 05 2014

Examples

			Triangle begins:
{1},
{2, 2},
{3, 2, 3},
{4, 4, 3, 4},
{5, 4, 3, 4, 5},
{6, 6, 6, 4, 5, 6},
{7, 6, 6, 4, 5, 6, 7},
{8, 8, 6, 8, 5, 6, 7, 8},
{9, 8, 9, 8, 5, 6, 7, 8, 9},
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..10],n->List([1..n],m->n-(n mod m)))); # Muniru A Asiru, Oct 12 2018
  • Maple
    seq(seq(n-modp(n,m),m=1..n),n=1..13); # Muniru A Asiru, Oct 12 2018
  • Mathematica
    a = Table[Table[n - Mod[n, m], {m, 1, n}], {n, 1, 20}]; Flatten[a]
  • PARI
    for(n=1,9,for(m=1,n,print1(n-n%m", "))) \\ Charles R Greathouse IV, Nov 07 2011
    

Extensions

Edited by N. J. A. Sloane, Jul 05 2014 at the suggestion of Omar E. Pol, who observed that A127095 (Gary W. Adamson, with edits by R. J. Mathar) was the same as this sequence.

A138534 Super least prime signatures; LCM of all signatures with n factors.

Original entry on oeis.org

1, 2, 12, 120, 5040, 110880, 43243200, 1470268800, 1173274502400, 269853135552000, 516498901446528000, 32022931889684736000, 3234636350177055183360000, 265240180714518525035520000, 1163343432613878250805790720000, 6014485546613750556665938022400000
Offset: 0

Views

Author

Alford Arnold, Mar 28 2008

Keywords

Comments

Also the row product of the following table:
1
2
4 3
8 3 5
16 9 5 7
32 9 5 7 11
64 27 25 7 11 13
128 27 25 7 11 13 17
256 81 25 49 11 13 17 19
512 81 125 49 11 13 17 19 23
1024 243 125 49 121 13 17 19 23 29
...

Examples

			For n = 3 the signatures are {8, 12, 30} so a(3) = 120.
		

Crossrefs

Subsequence of A025487.
LCM of terms in rows of A215366.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, 2^n,
          ilcm(seq(b(n-i*j, i-1)*ithprime(i)^j, j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..17);  # Alois P. Heinz, May 15 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i < 2, 2^n, LCM @@ Table[b[n - i j, i - 1] Prime[i]^j, {j, 0, n/i}]];
    a[n_] := b[n, n];
    a /@ Range[0, 17] (* Jean-François Alcover, Nov 02 2020, after Alois P. Heinz *)
    a[n_] := Product[Prime[k]^Floor[n/k], {k, 1, n}]; Array[a, 16, 0] (* Amiram Eldar, Jul 02 2021 *)
  • PARI
    a(n) = prod(k=1, n, prime(k)^(n\k)); \\ Michel Marcus, Jul 03 2021

Formula

From Amiram Eldar, Jul 02 2021: (Start)
a(n) = Product_{k=1..n} prime(k)^floor(n/k).
A001222(a(n)) = A006218(n). (End)
Sum_{n>=0} 1/a(n) = A346044. - Amiram Eldar, Jul 02 2023

Extensions

More terms from Reikku Kulon, Oct 02 2008

A234575 Triangle T(n, k) read by rows: T(n, k) = floor(n/k) + n mod k.

Original entry on oeis.org

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

Views

Author

Alex Ratushnyak, Dec 28 2013

Keywords

Examples

			Triangle begins:
   1
   2  1
   3  2  1
   4  2  2  1
   5  3  3  2  1
   6  3  2  3  2  1
   7  4  3  4  3  2  1
   8  4  4  2  4  3  2  1
   9  5  3  3  5  4  3  2  1
  10  5  4  4  2  5  4  3  2  1
  11  6  5  5  3  6  5  4  3  2  1
  12  6  4  3  4  2  6  5  4  3  2  1
  13  7  5  4  5  3  7  6  5  4  3  2  1
  14  7  6  5  6  4  2  7  6  5  4  3  2  1
  15  8  5  6  3  5  3  8  7  6  5  4  3  2  1
		

Crossrefs

Programs

  • Haskell
    a234575 n k = a234575_tabl !! (n-1) !! (k-1)
    a234575_row n = a234575_tabl !! (n-1)
    a234575_tabl = zipWith (zipWith (+)) a048158_tabl a010766_tabl
    -- Reinhard Zumkeller, Apr 29 2015
  • Mathematica
    With[{rows=10},Table[Floor[n/k]+Mod[n,k],{n,rows},{k,n}]] (* Paolo Xausa, Sep 26 2023 *)
  • Python
    for n in range(1, 19):
      for k in range(1, n+1):
        c = n//k + n%k
        print('%2d' % c, end=' ')
      print()
    
  • Python
    def T(n, k) -> int: return n - (k - 1) * (n // k)
    for n in range(1,16): print([T(n, k) for k in range(1,n+1)]) # Peter Luschny, Jun 01 2025
    
  • Scheme
    ;; MIT/GNU Scheme
    (define (A234575bi n k) (+ (floor->exact (/ n k)) (modulo n k)))
    (define (A234575 n) (A234575bi (A002024 n) (A002260 n)))
    ;; Antti Karttunen, Dec 29 2013
    

Formula

T(n, k) = A048158(n, k) + A010766(n, k). - Reinhard Zumkeller, Apr 29 2015
G.f. of the k-th column: x^k*((Sum_{i=0..k-1} x^i) - (k-1)*x^k)/((1 - x)^2*Sum_{i=0..k-1} x^i). - Stefano Spezia, May 08 2024
T(n, k) = n - (k - 1) * floor(n/k). - Peter Luschny, Jun 01 2025

A320224 a(1) = 1; a(n > 1) = Sum_{k = 1..n-1} Sum_{d|k, d < k} a(d).

Original entry on oeis.org

1, 0, 1, 2, 3, 4, 6, 7, 10, 12, 16, 17, 25, 26, 33, 38, 48, 49, 65, 66, 84, 92, 109, 110, 142, 146, 172, 184, 219, 220, 274, 275, 323, 341, 390, 400, 484, 485, 551, 578, 669, 670, 792, 793, 904, 952, 1062, 1063, 1243, 1250, 1408, 1458, 1632, 1633, 1870, 1890
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Crossrefs

Programs

  • Magma
    sol:=[1]; for n in [2..56] do Append(~sol, &+[sol[d]*Floor((n-1)/d-1):d in [1..n-1]]); end for; sol; // Marius A. Burtea, Sep 07 2019
    
  • Mathematica
    sau[n_]:=If[n==1,1,Sum[sau[d],{k,n-1},{d,Most[Divisors[k]]}]];
    Table[sau[n],{n,60}]
  • PARI
    seq(n)={my(v=vector(n)); v[1]=1; for(n=2, #v, v[n]=sum(k=1, n-1, v[k]*((n-1)\k - 1))); v} \\ Andrew Howroyd, Sep 07 2019

Formula

a(1) = 1; a(n > 1) = Sum_{d = 1..n-1} a(d) * floor((n-1)/d - 1).
G.f. A(x) satisfies A(x) = x + (x/(1 - x)) * Sum_{k>=2} A(x^k). - Ilya Gutkovskiy, Sep 06 2019

A033322 a(n) = floor(2/n).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A010766.

Programs

A123711 Indices n such that A123709(n) = 8 = number of nonzero terms in row n of triangle A123706.

Original entry on oeis.org

12, 18, 20, 24, 28, 36, 40, 44, 45, 48, 50, 52, 54, 56, 63, 68, 72, 75, 76, 80, 88, 92, 96, 98, 99, 100, 104, 108, 112, 116, 117, 124, 135, 136, 144, 147, 148, 152, 153, 160, 162, 164, 171, 172, 175, 176, 184, 188, 189, 192, 196, 200, 207, 208, 212, 216, 224, 225
Offset: 1

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Triangle A123706 is the matrix inverse of triangle A010766, where A010766(n,k) = [n/k].
It appears that this equals A200511, numbers of the form p^k q^m with k,m >= 1, k+m > 2 and p, q prime. - M. F. Hasler, Feb 12 2012

Crossrefs

Programs

  • Mathematica
    Moebius[i_, j_] := If[Divisible[i, j], MoebiusMu[i/j], 0]; A123709[n_] :=
    Length[Select[Table[Moebius[n, j] - Moebius[n, j + 1], {j, 1, n}], # != 0 &]]; Select[Range[500], A123709[#] == 8 &] (* G. C. Greubel, Apr 22 2017 *)
  • PARI
    
    				

A123712 Indices n such that 16 = A123709(n) = number of nonzero terms in row n of triangle A123706.

Original entry on oeis.org

60, 84, 90, 120, 126, 132, 140, 150, 156, 168, 180, 198, 204, 220, 228, 234, 240, 252, 260, 264, 270, 276, 280, 294, 300, 306, 308, 312, 315, 336, 340, 342, 348, 350, 360, 364, 372, 378, 380, 396, 408, 414, 440, 444, 450, 456, 460, 468, 476, 480, 490, 492
Offset: 1

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Triangle A123706 is the matrix inverse of triangle A010766, where A010766(n,k) = [n/k].
a(n) = A178212(n) for n <= 52, possibly more. [Reinhard Zumkeller, May 24 2010]
a(n) = A178212(n) for n <= 2000. - Bill McEachen, Jul 14 2024

Crossrefs

Programs

  • Mathematica
    Moebius[i_, j_] := If[Divisible[i, j], MoebiusMu[i/j], 0]; A123709[n_] := Length[Select[Table[Moebius[n, j] - Moebius[n, j + 1], {j, 1, n}], # != 0 &]]; Select[Range[6500], A123709[#] == 16 &] (* G. C. Greubel, Apr 22 2017 *)
  • PARI
    is(n)=my(M=matrix(n, n, r, c,r\c)^-1); sum(k=1, n, M[n, k]!=0)==16 \\ Charles R Greathouse IV, Feb 09 2012

A212120 Triangle read by rows T(n,k), n>=1, k>=1, where T(n,k) is the sum of the divisors d of n with min(d, n/d) = k.

Original entry on oeis.org

1, 3, 5, 7, 1, 9, 1, 11, 3, 13, 3, 15, 5, 17, 5, 1, 19, 7, 1, 21, 7, 1, 23, 9, 3, 25, 9, 3, 27, 11, 3, 29, 11, 5, 31, 13, 5, 1, 33, 13, 5, 1, 35, 15, 7, 1, 37, 15, 7, 1, 39, 17, 7, 3, 41, 17, 9, 3, 43, 19, 9, 3, 45, 19, 9, 3, 47, 21, 11, 5, 49, 21, 11, 5, 1
Offset: 1

Views

Author

Omar E. Pol, Jul 02 2012

Keywords

Comments

Column k lists the odd numbers repeated k times starting in row k^2.
1 together with the first differences of the row sums give the divisor function A000005.
T(n,k) is also the total number of divisors of all positive integers <= n on the edges of k-th triangle in the diagram of divisors (see link section). See also A212119.

Examples

			Written as an irregular triangle the sequence begins:
1;
3;
5;
7,   1;
9,   1;
11,  3;
13,  3;
15,  5;
17,  5,  1;
19,  7,  1;
21,  7,  1;
23,  9,  3;
25,  9,  3;
27, 11,  3;
29, 11,  5;
31, 13,  5,  1;
33, 13,  5,  1;
35, 15,  7,  1;
37, 15,  7,  1;
39, 17,  7,  3;
41, 17,  9,  3;
43, 19,  9,  3;
45, 19,  9,  3;
47, 21, 11,  5;
49, 21, 11,  5,  1;
		

Crossrefs

Row sums give A006218, n >= 1.
Columns (1-5): A005408, A109613, A130823, A129756, A130497.

Formula

T(n,k) = Sum_{j=1..n} A212119(j,k).

Extensions

Definition changed by Franklin T. Adams-Watters, Jul 12 2012

A277646 Triangle T(n,k) = floor(n^2/k) for 1 <= k <= n^2, read by rows.

Original entry on oeis.org

1, 4, 2, 1, 1, 9, 4, 3, 2, 1, 1, 1, 1, 1, 16, 8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 25, 12, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 36, 18, 12, 9, 7, 6, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 49, 24, 16, 12, 9, 8, 7, 6
Offset: 1

Views

Author

Jason Kimberley, Nov 09 2016

Keywords

Examples

			The first five rows of the triangle are:
1;
4, 2, 1, 1;
9, 4, 3, 2, 1, 1, 1, 1, 1;
16, 8, 5, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1;
25, 12, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Cf. Related triangles: A010766, A277647, A277648.
Rows of this triangle (with infinite trailing zeros):
T(1,k) = A000007(k-1),
T(2,k) = A033324(k),
T(3,k) = A033329(k),
T(4,k) = A033336(k),
T(5,k) = A033345(k),
T(6,k) = A033356(k),
T(7,k) = A033369(k),
T(8,k) = A033384(k),
T(9,k) = A033401(k),
T(10,k) = A033420(k),
T(100,k) = A033422(k),
T(10^3,k) = A033426(k),
T(10^4,k) = A033424(k).
Columns of this triangle:
T(n,1) = A000290(n),
T(n,2) = A007590(n),
T(n,3) = A000212(n),
T(n,4) = A002620(n),
T(n,5) = A118015(n),
T(n,6) = A056827(n),
T(n,7) = A056834(n),
T(n,8) = A130519(n+1),
T(n,9) = A056838(n),
T(n,10)= A056865(n),
T(n,12)= A174709(n+2).

Programs

  • Magma
    A277646:=func;
    [A277646(n,k):k in[1..n^2],n in[1..7]];
  • Mathematica
    Table[Floor[n^2/k], {n, 7}, {k, n^2}] // Flatten (* Michael De Vlieger, Nov 24 2016 *)

Formula

T(n,k) = A010766(n^2,k).
Previous Showing 31-40 of 78 results. Next