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 42 results. Next

A348391 Row sums of irregular triangle A348390.

Original entry on oeis.org

3, 7, 18, 24, 48, 56, 87, 109, 147, 159, 235, 249, 301, 355, 434, 452, 563, 583, 705, 779, 859, 883, 1087, 1143, 1237, 1331, 1499, 1529, 1781, 1813, 2004, 2118, 2240, 2358, 2701, 2739, 2875, 3009, 3339, 3381, 3729, 3773
Offset: 2

Views

Author

Wolfdieter Lang, Nov 07 2021

Keywords

Examples

			a(5) = 2 + 3 + 4 + 5 + 1 + 4 + 1 + 1 + 2 + 1 = (1 + 1 + 1 + 2 + 1) + (2 + 3 + 4 + 5 + 4) = 6 + 18 = 24.
		

Crossrefs

Programs

  • Mathematica
    nterms=50;Table[Total[Flatten[Table[Join[Most[Divisors[k]],Range[2k,n,k]],{k,n}]]],{n,2,nterms+1}] (* Paolo Xausa, Nov 23 2021 *)

Formula

a(n) = Sum_{m=1..2*A002541(n)} A348390(n, m), for n >= 2.
a(n) = A153485(n) + A348392(n).

A361660 Irregular triangle read by rows where row n lists the successive numbers moved in the process of forming row n of the triangle A361642.

Original entry on oeis.org

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

Views

Author

Tamas Sandor Nagy, Mar 19 2023

Keywords

Comments

The first and last numbers in row n>=2 are n and 2, respectively, and they occur just once each in the row.
For row n>=3, and if and only if n-1 is prime, numbers n and 2 are the only numbers which occur just once (since when n-1 is prime it cannot make a rectangle for any other number to move from the initial column to the final row).
A number can move twice in succession, and so occur here twice in succession, when it fills the top right corner cell in a rectangle of width * height = n.
The move is from the initial column to top right corner cell, and therefore the numbers which appear twice in succession are d+1 for each divisor d of n, in the range 1 < d < n.
If n is a prime, then it has no such divisors, or if n is a semiprime n = x*y (including square of a prime) then x+1 and y+1 are the only numbers appearing twice in succession.
The length of row n is A002541(n). This equals to the number of special integer partitions of n there. Where a rectangle is formed of the changing shape, the row length increases more because the movement of a number that completes the rectangle is repeated as it continues to move again.

Examples

			The irregular triangle T(n,k) begins:
  n/k |  1  2  3  4  5  6  7  8  9 10 11 12 13 14
  ------------------------------------------------
  1   |  (empty row)
  2   |  2;
  3   |  3, 2;
  4   |  4, 3, 3, 2;
  5   |  5, 4, 3, 4, 2;
  6   |  6, 5, 4, 4, 3, 3, 5, 2;
  7   |  7, 6, 5, 4, 5, 3, 5, 6, 2;
  8   |  8, 7, 6, 5, 5, 4, 6, 3, 3, 4, 7, 2;
  9   |  9, 8, 7, 6, 5, 6, 4, 4, 7, 3, 7, 6, 8, 2;
.
Movements of the six-number-high column. 1 never moves. 4 and 3 move twice each in immediate succession as 6 is a composite and a semiprime:
.
  6
  5   5
  4   4     4
  3   3     3     3 4   3
  2   2     2 5   2 5   2 5     2 5 3   2 5       2
  1   1 6   1 6   1 6   1 6 4   1 6 4   1 6 4 3   1 6 4 3 5   1 6 4 3 5 2
.
The parallel is shown for row length and the special integer partition in A002541:
For n = 4, its row consists of 4, 3, 3 and 2, that is four elements.
The special partition of n = 4 is (4), (2 2), (3 1), and (2 1 1), that is also four partitions. The relation is demonstrated by the illustration below. Square blocks represent the four numbers. As they move, the changing shape assumes a number of identical or reflected formations. The number of possible grouping of the blocks within them is exactly the same as the number of the moves that the blocks undergo:
.  _ _
  |   |__________ 1st move
  |   |     _ _  |
  |   |    |   |_|____________ 2nd move ____________________________ 4th move
  |   |    |   | |       _ _ _v_      _|_                           |
  |   |    |   | |      |   |   |____|___|_____ 3rd move            |
  |   |    |   |_v_     |   |   |    |   |_ _ _v_      _ _ _ _ _ _ _v_
  |   |    |   |   |    |   |   |    |   |   |   |    |               |
  |_ _|    |_ _|_ _|    |_ _|_ _|    |_ _|_ _|_ _|    |_ _ _ _ _ _ _ _|
    4        3   1        2   2        2   1   1              4
    ^                                                         ^
    |____________________ Identical partition ________________|
		

Crossrefs

Cf. A361642, A002541 (row length).

A004199 Table of [ x/y ], where (x,y) = (1,1),(1,2),(2,1),(1,3),(2,2),(3,1),...

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Entry in row n and column k is also the number of multiples of k less than or equal to n, n,k >= 1. - L. Edson Jeffery, Aug 31 2014

Examples

			Array begins:
  1, 0, 0, 0, 0, 0, 0, 0, ...
  2, 1, 0, 0, 0, 0, 0, 0, ...
  3, 1, 1, 0, 0, 0, 0, 0, ...
  4, 2, 1, 1, 0, 0, 0, 0, ...
  5, 2, 1, 1, 1, 0, 0, 0, ...
  ...
		

Crossrefs

Cf. A002541 (antidiagonal sums).
Cf. A010766 (same sequence as triangle, omitting the zeros), A010783.

Programs

  • Mathematica
    (* Array version: *)
    Grid[Table[Floor[n/k], {n, 14}, {k, 14}]] (* L. Edson Jeffery, Aug 31 2014 *)
    (* Array antidiagonals flattened: *)
    Flatten[Table[Floor[(n - k + 1)/k], {n, 14}, {k, n}]] (* L. Edson Jeffery, Aug 31 2014 *)

Formula

Sum_{k=1..n} a(n-k+1,k) = A002541(n+1).

A144489 Partial sums of A087624.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 3, 4, 5, 7, 7, 9, 9, 11, 13, 14, 14, 16, 16, 18, 20, 22, 22, 24, 25, 27, 28, 30, 30, 33, 33, 34, 36, 38, 40, 42, 42, 44, 46, 48, 48, 51, 51, 53, 55, 57, 57, 59, 60, 62, 64, 66, 66, 68, 70, 72, 74, 76, 76, 79, 79, 81, 83, 84, 86, 89, 89, 91, 93, 96, 96, 98, 98, 100, 102
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2008

Keywords

Comments

Number of pairs (p,q) with 1 < p < q <= n, p|q and p prime. - Wesley Ivan Hurt, Oct 30 2022

Crossrefs

Programs

  • Mathematica
    Accumulate[Array[If[PrimeQ[#],0,PrimeNu[#]]&,110]] (* Harvey P. Dale, Jul 19 2019 *)
  • PARI
    a(n) = sum(k=1, n, if (!isprime(k), omega(k))); \\ Michel Marcus, Nov 06 2022

A248517 Number of odd divisors > 1 in the numbers 1 through n, counted with multiplicity.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 4, 6, 7, 8, 9, 10, 11, 14, 14, 15, 17, 18, 19, 22, 23, 24, 25, 27, 28, 31, 32, 33, 36, 37, 37, 40, 41, 44, 46, 47, 48, 51, 52, 53, 56, 57, 58, 63, 64, 65, 66, 68, 70, 73, 74, 75, 78, 81, 82, 85, 86, 87, 90, 91, 92, 97, 97, 100, 103, 104, 105, 108, 111
Offset: 0

Views

Author

R. J. Mathar, Jun 18 2015

Keywords

Comments

Number of partitions of n into 3 parts such that the smallest part divides the "middle" part. - Wesley Ivan Hurt, Oct 21 2021

Crossrefs

Programs

  • Maple
    A248517 := proc(n)
        add(A069283(j),j=1..n) ;
    end proc:
  • Mathematica
    Table[Sum[Floor[Floor[i/2]/(n - i)], {i, n - 1}], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 30 2016 *)
    Join[{0},Accumulate[Table[Count[Divisors[n],?OddQ]-1,{n,80}]]] (* _Harvey P. Dale, Jan 06 2019 *)
    Join[{0}, Accumulate[Table[DivisorSigma[0, n/2^IntegerExponent[n, 2]] - 1, {n, 1, 100}]]] (* Amiram Eldar, Jul 10 2022 *)
  • PARI
    a(n)=my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2-n \\ Charles R Greathouse IV, Jun 18 2015
    
  • Python
    from math import isqrt
    def A248517(n): return ((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)+(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1)-n # Chai Wah Wu, Oct 23 2023

Formula

a(n) = Sum_{j=1..n} A069283(j).
a(n) = A060831(n) - n.
a(n) = A006218(n) - A006218(floor(n/2)) - n. - Charles R Greathouse IV, Jun 18 2015
a(n) = Sum_{i=1..n-1} floor(floor(i/2)/(n-i)). - Wesley Ivan Hurt, Jan 30 2016

A330476 a(n) = Sum_{m=2..n} floor(n/m)^2.

Original entry on oeis.org

0, 1, 2, 6, 7, 16, 17, 28, 34, 47, 48, 75, 76, 93, 108, 134, 135, 172, 173, 212, 231, 256, 257, 322, 332, 361, 384, 435, 436, 513, 514, 571, 598, 635, 658, 760, 761, 802, 833, 926, 927, 1028, 1029, 1104, 1165, 1214, 1215, 1358, 1372, 1453, 1492, 1579, 1580, 1705, 1736, 1857, 1900, 1961, 1962
Offset: 1

Views

Author

Robert Israel, Dec 15 2019

Keywords

Examples

			a(4) = floor(4/2)^2 + floor(4/3)^2 + floor(4/4)^2 = 6.
		

Crossrefs

Programs

  • Magma
    [0] cat [&+[Floor(n/m)^2:m in [2..n]]:n in [2..60]]; // Marius A. Burtea, Dec 15 2019
  • Maple
    f:=  proc(n) local m; add(floor(n/m)^2,m=2..n) end proc:
    map(f, [$1..100]);
  • Mathematica
    Table[Sum[IntegerPart[(n/m)]^2,{m,2,n}],{n,1,100}] (* Metin Sariyar, Dec 15 2019 *)

A333885 Number of triples (i,j,k) with 1 <= i < j < k <= n such that i divides j divides k.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 3, 6, 7, 9, 9, 16, 16, 18, 20, 26, 26, 33, 33, 40, 42, 44, 44, 59, 60, 62, 65, 72, 72, 84, 84, 94, 96, 98, 100, 119, 119, 121, 123, 138, 138, 150, 150, 157, 164, 166, 166, 192, 193, 200, 202, 209, 209, 224, 226, 241, 243, 245, 245, 276, 276
Offset: 1

Views

Author

Derek Lim, Apr 08 2020

Keywords

Examples

			The a(4) = 1 triple is (1,2,4).
The a(8) = 6 triples are (1,2,4), (1,2,6), (1,2,8), (1,3,6), (1,4,8), (2,4,8).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
           add(tau(d)-1, d=divisors(n) minus {n}))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Apr 09 2020
  • Mathematica
    a[n_] := a[n] = If[n == 0, 0, a[n - 1] + Sum[DivisorSigma[0, d] - 1, {d, Most @ Divisors[n]}]];
    Array[a, 80] (* Jean-François Alcover, Nov 27 2020, after Alois P. Heinz *)
  • Python
    an = len([(i,j,k) for i in range(1,n+1) for j in range(i+1,n+1) for k in range(j+1,n+1) if j%i==0 and k%j==0])

Formula

a(n) = Sum_{m=1..n} Sum_{d|m, dAlois P. Heinz, Apr 09 2020

A339804 a(n) = Sum_{k=1..floor(n/2)} k * (n-k) * floor((n-k)/k).

Original entry on oeis.org

0, 1, 4, 13, 22, 50, 68, 116, 162, 236, 278, 437, 498, 634, 794, 1018, 1118, 1450, 1574, 1975, 2276, 2598, 2774, 3519, 3834, 4273, 4746, 5490, 5772, 6887, 7214, 8163, 8856, 9586, 10330, 12072, 12540, 13443, 14382, 16244, 16806, 18861, 19480, 21192, 22954, 24267
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 17 2020

Keywords

Comments

Total volume of all rectangular prisms with dimensions (x, y, z) where x and y are positive integers such that x + y = n, x <= y, and z = floor(y/x). - Wesley Ivan Hurt, Dec 20 2020

Crossrefs

Programs

  • Mathematica
    Table[Sum[k (n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 50}]
  • PARI
    a(n) = sum(k=1, n\2, k*(n-k)*((n-k)\k)); \\ Michel Marcus, Dec 19 2020
    
  • Python
    from math import isqrt
    def A339804(n): return (n*(1-n**2)+((s:=isqrt(n))**4<<1)+s**3*(3*(1-n))+s**2*(1-3*n) + sum((q:=n//k)*(-6*k**2+n*(3*((k<<1)+q+1))-q*((q<<1)+3)-1) for k in range(1,s+1)))//6 # Chai Wah Wu, Oct 27 2023

Formula

a(n) ~ n^3*(Pi^2-2-4*zeta(3))/12. - Rok Cestnik, Dec 19 2020
a(n) = n*A153485(n) - A279847(n). - Vaclav Kotesovec, Dec 21 2020

A361819 Irregular triangle read by rows where T(n,k) is the distance which number A361660(n,k) moves in the process described in A361642.

Original entry on oeis.org

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

Views

Author

Tamas Sandor Nagy, Mar 25 2023

Keywords

Comments

Number A361660(n,k) moves to the right and then down and T(n,k) counts the steps in both.
All moves are T(n,k) >= 2 steps since a number moves at least one step right and one step down.
Row n has sum A002378(n-1) which is the total steps to move a column down to a row irrespective of the order of movement.
Each row is a palindrome (the same when reversed), since the moves in A361642 are exactly the reverse moves to send its row back to the starting column.

Examples

			Irregular triangle T(n,k) begins:
  n/k     |   1    2    3    4    5    6    7    8    9
  ------------------------------------------------------
  1       |   (empty row)
  2       |   2;
  3       |   3,   3;
  4       |   4,   2,   2,   4;
  5       |   5,   3,   4,   3,   5;
  6       |   6,   4,   2,   3,   3,   2,   4,   6;
  7       |   7,   5,   3,   5,   2,   5,   3,   5,   7;
 ...
		

Crossrefs

Cf. A361642, A361660, A002541 (row lengths), A002378 (row sums).

Programs

  • MATLAB
    function a = A361819( max_row )
        k = 1;
        for r = 2:max_row
            h = zeros(1,r); h(1) = r;
            while max(h) > 1
               j =  find(h == max(h), 1, 'last' );
               m =  find(h < max(h)-1, 1, 'first' );
               a(k) = (m-j) + (h(j)-h(m)) - 1;
               h(j) = h(j) - 1; h(m) = h(m) + 1;
               k = k+1;
            end
        end
    end % Thomas Scheuerle, Mar 27 2023

A113240 Expansion of (1/(1-x))*sum(k>=2,x^k/(1-2x^k)).

Original entry on oeis.org

1, 2, 5, 6, 13, 14, 25, 30, 49, 50, 97, 98, 165, 186, 325, 326, 621, 622, 1161, 1230, 2257, 2258, 4481, 4498, 8597, 8858, 17125, 17126, 34077, 34078, 66985, 68014, 133553, 133634, 267057, 267058, 529205, 533306, 1058261, 1058262, 2115133
Offset: 0

Views

Author

Paul Barry, Oct 19 2005

Keywords

Crossrefs

Cf. A002541.

Formula

a(n)=sum{k=0..floor(n/2), floor((n-k+1)/(k+1))*2^k}.
Previous Showing 31-40 of 42 results. Next