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 41-50 of 78 results. Next

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

Original entry on oeis.org

1, 1, 2, 4, 5, 9, 10, 16, 19, 26, 27, 44, 45, 57, 65, 87, 88, 120, 121, 158, 171, 200, 201, 278, 284, 331, 353, 426, 427, 536, 537, 646, 676, 766, 782, 982, 983, 1106, 1154, 1365, 1366, 1617, 1618, 1851, 1943, 2146, 2147, 2589, 2600, 2917, 3008, 3390, 3391
Offset: 1

Views

Author

Gus Wiseman, Oct 07 2018

Keywords

Crossrefs

Programs

  • Mathematica
    sau[n_]:=If[n==1,1,Sum[sau[d],{k,n},{d,Most[Divisors[k]]}]];
    Table[sau[n],{n,30}]
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A320225(n): return 1 if n == 1 else sum(A320225(d)*(n//d-1) for d in range(1,n)) # Chai Wah Wu, Jun 08 2022

Formula

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

A123707 a(n) = Sum_{k=1..n} A123706(n,k)*2^(k-1).

Original entry on oeis.org

1, 0, 1, 3, 7, 14, 31, 60, 126, 248, 511, 1005, 2047, 4064, 8183, 16320, 32767, 65394, 131071, 261885, 524255, 1048064, 2097151, 4193220, 8388600, 16775168, 33554304, 67104765, 134217727, 268427002, 536870911, 1073725440, 2147483135
Offset: 1

Views

Author

Paul D. Hanna, Oct 09 2006

Keywords

Comments

Triangle A123706 is the matrix inverse of triangle A010766(n,k) = [n/k].

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k], 0] - If[Divisible[n, k + 1], MoebiusMu[n/(k + 1)], 0]; Table[Sum[t[n, k]*2^(k - 1), {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Oct 26 2017 *)
  • PARI
    {a(n)=sum(k=1,n,(matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1)[n,k]*2^(k-1))}

Formula

G.f.: Sum_{k>=1} mu(k) * x^k * (1 - x^k) / (1 - 2*x^k). - Ilya Gutkovskiy, Feb 06 2020
a(n) ~ 2^(n-2). - Vaclav Kotesovec, May 03 2025

A242114 Triangle read by rows: T(n,k) = number of pairs (x,y) in {1..n}X{1..n} with gcd(x,y) = k.

Original entry on oeis.org

1, 3, 1, 7, 1, 1, 11, 3, 1, 1, 19, 3, 1, 1, 1, 23, 7, 3, 1, 1, 1, 35, 7, 3, 1, 1, 1, 1, 43, 11, 3, 3, 1, 1, 1, 1, 55, 11, 7, 3, 1, 1, 1, 1, 1, 63, 19, 7, 3, 3, 1, 1, 1, 1, 1, 83, 19, 7, 3, 3, 1, 1, 1, 1, 1, 1, 91, 23, 11, 7, 3, 3, 1, 1, 1, 1, 1, 1, 115, 23
Offset: 1

Views

Author

Reinhard Zumkeller, May 04 2014

Keywords

Comments

T(n,1) = A018805(n);
sum(T(n,k): k = 1..n) = A000290(n);
sum(T(n,k): k = 2..n) = A100613(n);
T(floor(n/k),1) = A018805(n).

Examples

			T(4,1) = #{(1,1), (1,2), (1,3), (1,4), (2,1), (2,3), (3,1), (3,2), (3,4), (4,1), (4,3)} = 11;
T(4,2) = #{(2,2), (2,4), (4,2)} = 3;
T(4,3) = #{(3,3)} = 1;
T(4,4) = #{(4,4)} = 1.
The triangle begins:                                            row sums
.   1:    1                                                            1
.   2:    3   1                                                        4
.   3:    7   1   1                                                    9
.   4:   11   3   1   1                                               16
.   5:   19   3   1   1  1                                            25
.   6:   23   7   3   1  1  1                                         36
.   7:   35   7   3   1  1  1  1                                      49
.   8:   43  11   3   3  1  1  1  1                                   64
.   9:   55  11   7   3  1  1  1  1  1                                81
.  10:   63  19   7   3  3  1  1  1  1  1                            100
.  11:   83  19   7   3  3  1  1  1  1  1  1                         121
.  12:   91  23  11   7  3  3  1  1  1  1  1  1                      144
.  13:  115  23  11   7  3  3  1  1  1  1  1  1  1                   169
.  14:  127  35  11   7  3  3  3  1  1  1  1  1  1  1                196
.  15:  143  35  19   7  7  3  3  1  1  1  1  1  1  1  1             225
.  16:  159  43  19  11  7  3  3  3  1  1  1  1  1  1  1  1          256
.  17:  191  43  19  11  7  3  3  3  1  1  1  1  1  1  1  1  1       289
.  18:  203  55  23  11  7  7  3  3  3  1  1  1  1  1  1  1  1  1    324 .
		

Programs

  • Haskell
    a242114 n k = a242114_tabl !! (n-1) !! (k-1)
    a242114_row n = a242114_tabl !! (n-1)
    a242114_tabl = map (map a018805) a010766_tabl
  • Mathematica
    T[n_, k_] := 2 Total[EulerPhi[Range[Quotient[n, k]]]] - 1;
    Table[T[n, k], {n, 1, 18}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 20 2021 *)

Formula

T(n,k) = A018805(A010766(n,k));

A350103 Triangle read by rows. Number of self-measuring subsets of the initial segment of the natural numbers strictly below n and cardinality k. Number of subsets S of [n] with S = distset(S) and |S| = k.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Dec 14 2021

Keywords

Comments

We use the notation [n] = {0, 1, ..., n-1}. If S is a subset of [n] then we define the distset of S (set of distances of S) as {|x - y|: x, y in S}. We call a subset S of the natural numbers self-measuring if and only if S = distset(S).

Examples

			Triangle starts:
[ 0] [1]
[ 1] [1, 1]
[ 2] [1, 1,  1]
[ 3] [1, 1,  2, 1]
[ 4] [1, 1,  3, 1, 1]
[ 5] [1, 1,  4, 2, 1, 1]
[ 6] [1, 1,  5, 2, 1, 1, 1]
[ 7] [1, 1,  6, 3, 2, 1, 1, 1]
[ 8] [1, 1,  7, 3, 2, 1, 1, 1, 1]
[ 9] [1, 1,  8, 4, 2, 2, 1, 1, 1, 1]
[10] [1, 1,  9, 4, 3, 2, 1, 1, 1, 1, 1]
[11] [1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1]
[12] [1, 1, 11, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1]
.
The first  column is 1,1,...  because {} = distset({}) and |{}| = 0.
The second column is 1,1,... because {0} = distset({0}) and |{0}| = 1.
The third  column is n-1  because {0, j} = distset({0, j}) and |{0, j}| = 2 for j = 1..n - 1.
The main diagonal is 1,1,... because [n] = distset([n]) and |[n]| = n (these are the complete rulers A103295).
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> ifelse(k < 2, 1, floor((n - 1) / (k - 1))):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..12);
  • Mathematica
    distSet[s_] := Union[Map[Abs[Differences[#][[1]]] &, Union[Sort /@ Tuples[s, 2]]]]; T[n_, k_] := Count[Subsets[Range[0, n - 1]], ?((ds = distSet[#]) == # && Length[ds] == k &)]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Amiram Eldar, Dec 16 2021 *)
  • PARI
    T(n, k) = if(k<=1, 1, (n - 1) \ (k - 1)) \\ Winston de Greef, Jan 31 2024
  • SageMath
    # generating and counting (slow)
    def isSelfMeasuring(R):
        S, L = Set([]), len(R)
        R = Set([r - 1 for r in R])
        for i in range(L):
            for j in (0..i):
                S = S.union(Set([abs(R[i] - R[i - j])]))
        return R == S
    def A349976row(n):
        counter = [0] * (n + 1)
        for S in Subsets(n):
            if isSelfMeasuring(S): counter[len(S)] += 1
        return counter
    for n in range(10): print(A349976row(n))
    

Formula

T(n, k) = floor((n - 1) / (k - 1)) for k >= 2.
T(n, k) = 1 if k = 0 or k = 1 or n >= k >= floor((n + 1)/2).

A010783 Triangle of numbers floor(n/(n-k)).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A010766 (mirrored).

Programs

  • Haskell
    a010783 n k = (n + 1 - k) `div` k
    a010783_row n = a010783_tabl !! (n-1)
    a010783_tabl = map reverse a010766_tabl
    -- Reinhard Zumkeller, Apr 29 2015
  • Maple
    T:= (n,k)-> floor(n/(n-k)):
    seq (seq (T(n, k), k=0..n-1), n=1..15); # Alois P. Heinz, Jul 15 2011

A033330 a(n) = floor(10/n).

Original entry on oeis.org

10, 5, 3, 2, 2, 1, 1, 1, 1, 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
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A010766.

Programs

A075993 Triangle read by rows: T(n,m) is the number of integers k such that floor(n/k) = m, n >= 1, k = 1..n.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Sep 28 2002

Keywords

Comments

The sum of numbers in row n is n.
Number of terms > 0 per row: Sum_{k=1..n} A057427(T(n,k)) = A055086(n). - Reinhard Zumkeller, Apr 06 2006

Examples

			T(5, 1) = 3 counts k such that floor(5/k) = 1, namely k = 5, 4, 3.
First 10 rows:
  1
  1 1
  2 0 1
  2 1 0 1
  3 1 0 0 1
  3 1 1 0 0 1
  4 1 1 0 0 0 1
  4 2 0 1 0 0 0 1
  5 1 1 1 0 0 0 0 1
  5 2 1 0 1 0 0 0 0 1
		

Crossrefs

Columns 1, 2, 3 are essentially A004526, A008615, A008679.
Cf. A010766.

Programs

  • Mathematica
    Table[Floor[n/m] - Floor[n/(m + 1)], {n, 14}, {m, n}] // Flatten (* Michael De Vlieger, Jan 14 2022 *)

Formula

T(n, m) = floor(n/m) - floor(n/(m+1)).

A106633 Number of ways to express n as k+l*m, with k, l, m all in the range [0..n].

Original entry on oeis.org

1, 4, 8, 12, 17, 21, 27, 31, 37, 42, 48, 52, 60, 64, 70, 76, 83, 87, 95, 99, 107, 113, 119, 123, 133, 138, 144, 150, 158, 162, 172, 176, 184, 190, 196, 202, 213, 217, 223, 229, 239, 243, 253, 257, 265, 273, 279, 283, 295, 300, 308, 314, 322, 326, 336, 342, 352
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Comments

Number of ordered triples [k,l,m] with n = k+l*m and k, l, m all in the range [0..n].
From R. J. Mathar, Jun 30 2013: (Start)
A010766 is the following array A read by antidiagonals:
1, 1, 1, 1, 1, 1, ...
2, 1, 1, 1, 1, 1, ...
3, 2, 1, 1, 1, 1, ...
4, 2, 2, 1, 1, 1, ...
5, 3, 2, 2, 1, 1, ...
6, 3, 2, 2, 2, 1, ...
and apparently a(n) is the hook sum Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). (End)

Examples

			0+1*2 = 0+2*1 = 1+1*1 = 2+0*0 = 2+0*1 = 2+0*2 = 2+1*0 = 2+2*0 = 2, so a(2)=8.
a(3)=12: 3+0*0, 3+0*m (6), 2+1*1, 1+2*1 (2), 0+3*1 (2).
		

Crossrefs

Programs

  • Maple
    A106633 := proc(n)
        local a, k, l, m ;
        a := 0 ;
        for k from 0 to n do
            for l from 0 to n do
                if l = 0 then
                    if k = n then
                        a := a+n+1 ;
                    end if;
                else
                    m := (n-k)/l ;
                    if type(m,'integer') then
                        a := a+1 ;
                    end if;
                end if;
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    A106633[n_] := Module[{a, m}, a = 0; Do[If[l == 0, If[k == n, a = a + n + 1], m = (n - k)/l; If[IntegerQ[m], a = a + 1]], {k, 0, n}, {l, 0, n}]; a];
    Table[A106633[n], {n, 0, 56}] (* Jean-François Alcover, Jun 10 2023, after R. J. Mathar *)
  • PARI
    list(n)={
        my(v=vector(n),t);
        for(i=2,n,for(j=1,min(n\i,i-1),v[i*j]+=2));
        for(i=1,sqrtint(n),v[i^2]++);
        concat(1,vector(n,k,2*k+1+t+=v[k]))
    }; \\ Charles R Greathouse IV, Oct 17 2012

Formula

From Ridouane Oudra, Apr 22 2024: (Start)
a(n) = 2*n + 1 + Sum_{k=1..n} floor(n/k);
a(n) = 2*n + 1 + Sum_{k=1..n} tau(k);
a(n) = A005408(n) + A006218(n). (End)

Extensions

Definition clarified by N. J. A. Sloane, Jul 07 2012

A115725 Number of partitions with maximum rectangle <= n.

Original entry on oeis.org

1, 2, 5, 10, 26, 42, 118, 171, 389, 692, 1442, 1854, 5534, 6895, 11910, 21116, 44278, 52568, 118734, 138670, 300326, 492507, 728514, 829244, 2167430, 2987124, 4167602, 6092588, 11308432, 12554900, 29925267, 33023589, 57950313, 81424281, 106214784, 148101088
Offset: 0

Views

Author

Keywords

Comments

A partition has maximum rectangle <= n iff it is a subpartition of row n of A010766.

Examples

			The 10 partitions with maximum rectangle <= 3: 0: []; 1: [1]; 2: [2], [1^2], [2,1]; 3: [3], [1^3], [3,1], [2,1^2], [3,1^2].
		

Crossrefs

Formula

a(n) = subpart([A115728 (or A115729), [] is row n of A010766.
a(n) = Sum_{k>=0} A182114(k,n). - Alois P. Heinz, Nov 02 2012

A123708 a(n) = sum of unsigned elements in row n of triangle A123706.

Original entry on oeis.org

1, 3, 3, 4, 3, 5, 3, 4, 4, 7, 3, 8, 3, 7, 7, 4, 3, 8, 3, 8, 7, 7, 3, 8, 4, 7, 4, 8, 3, 13, 3, 4, 7, 7, 7, 8, 3, 7, 7, 8, 3, 13, 3, 8, 8, 7, 3, 8, 4, 8, 7, 8, 3, 8, 7, 8, 7, 7, 3, 16, 3, 7, 8, 4, 7, 13, 3, 8, 7, 15, 3, 8, 3, 7, 8, 8, 7, 13, 3, 8, 4, 7, 3, 16, 7, 7, 7, 8, 3, 16, 7, 8, 7, 7, 7, 8, 3, 8, 8, 8, 3, 13
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].

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := If[Divisible[n, k], MoebiusMu[n/k], 0] - If[Divisible[n, k + 1], MoebiusMu[n/(k + 1)], 0]; Table[Sum[Abs[t[n, k]], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Oct 26 2017 *)
  • PARI
    {a(n)=local(M=matrix(n,n,r,c,if(r>=c,floor(r/c)))^-1);sum(k=1,n,abs(M[n,k]))}
Previous Showing 41-50 of 78 results. Next