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

A161886 Number of nonzero elements in the n X n Redheffer matrix.

Original entry on oeis.org

1, 4, 7, 11, 14, 19, 22, 27, 31, 36, 39, 46, 49, 54, 59, 65, 68, 75, 78, 85, 90, 95, 98, 107, 111, 116, 121, 128, 131, 140, 143, 150, 155, 160, 165, 175, 178, 183, 188, 197, 200, 209, 212, 219, 226, 231, 234, 245, 249, 256, 261, 268, 271, 280, 285, 294, 299, 304
Offset: 1

Views

Author

Mats Granvik, Jun 21 2009

Keywords

Examples

			The 4x4 Redheffer matrix:
  1,1,1,1
  1,1,0,0
  1,0,1,0
  1,1,0,1
contains 11 nonzero elements.
		

Crossrefs

Programs

Formula

a(n) = A006590(n)+A000005(n)-1. [Enrique Pérez Herrero, Sep 28 2009]
a(n) = A006218(n)+n-1. [Enrique Pérez Herrero, Sep 25 2009]
a(1) = 1, a(n) = a(n-1) + A000005(n) + 1 for n > 1. a(1) = 1, a(n) = A006218(n+1) - A000005(n+1) + n - 1 = A006218(n+1) + A049820(n+1) - 2 = A006590(n+1) - 2 for n > 1. [Jaroslav Krizek, Nov 08 2009]

Extensions

Edited by N. J. A. Sloane, Jun 26 2009

A092494 a(n) = Sum_{p prime and p<=n} ceiling(n/p).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 10, 11, 12, 13, 16, 17, 20, 21, 23, 25, 27, 28, 31, 32, 34, 36, 39, 40, 42, 43, 45, 46, 49, 50, 54, 55, 56, 58, 60, 62, 65, 66, 68, 70, 73, 74, 78, 79, 81, 83, 86, 87, 89, 90, 92, 94, 97, 98, 100, 102, 104, 106, 109, 110, 114, 115, 117, 119, 120, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 05 2004

Keywords

Comments

a(n) = A013939(n) + A048865(n).

Crossrefs

Cf. A006590.

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N):
    p:= 0:
    do
      p:= nextprime(p);
      if p > N then break fi;
      V[p]:= V[p]+1;
      for k from 2 to floor(N/p) do
        V[(k-1)*p+1 .. k*p]:= V[(k-1)*p+1 .. k*p] +~ k;
      od;
      if (k-1)*p+1<=N then V[(k-1)*p+1..N]:= V[(k-1)*p+1..N]+~ k fi
    od:
    convert(V,list); # Robert Israel, Jun 19 2019
  • PARI
    a(n) = sum(k=1, n, isprime(k)*ceil(n/k)); \\ Michel Marcus, Jun 19 2019

A309097 Number of partitions of n avoiding the partition (4,2,1).

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 14, 20, 25, 32, 39, 49, 56, 68, 79, 91, 103, 119, 132, 150, 165, 183, 202, 224, 241, 264, 287, 311, 334, 362, 385, 415, 442, 472, 503, 535, 563, 599, 634, 670, 703, 743, 778, 820, 859, 899, 942, 988, 1027, 1074, 1119, 1167, 1214, 1266
Offset: 0

Views

Author

Jonathan S. Bloom, Jul 12 2019

Keywords

Comments

We say a partition alpha contains mu provided that one can delete rows and columns from (the Ferrers board of) alpha and then top/right justify to obtain mu. If this is not possible then we say alpha avoids mu. For example, the only partitions avoiding (2,1) are those whose Ferrers boards are rectangles.
Conjecture: for n > 0, a(n) is the number of ordered pairs (r, l) such that there exists a nilpotent matrix of order n whose rank is r and nilpotent index is l. Actually, such a matrix exists if and only if ceiling(n/(n-r)) <= l <= r+1, see my proof below. If this conjecture is true, then a(n) = (n^2 + 3n)/2 - A006590(n) for n > 0. - Jianing Song, Nov 04 2019

Crossrefs

Programs

  • PARI
    lista(n)=my(b(k)=x^k/(1-x^k)+O(x*x^n));Vec(1+sum(i=1,n,b(i)*(1+sum(j=i+1,n,b(j)*(1+b(j+1)))))) \\ Christian Sievers, Sep 01 2025

Formula

G.f.: 1 + Sum_{i>=1} b(i) * ( 1 + Sum_{j>i} b(j) * ( 1 + b(j+1) ) ) where b(k)=x^k/(1-x^k). - Christian Sievers, Sep 01 2025

Extensions

More terms from Alois P. Heinz, Jul 12 2019

A332682 a(n) = Sum_{k=1..n} (-1)^(k+1) * ceiling(n/k).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 6, 5, 7, 8, 9, 8, 9, 10, 13, 11, 12, 13, 14, 13, 16, 17, 18, 15, 17, 18, 21, 20, 21, 22, 23, 20, 23, 24, 27, 25, 26, 27, 30, 27, 28, 29, 30, 29, 34, 35, 36, 31, 33, 34, 37, 36, 37, 38, 41, 38, 41, 42, 43, 40, 41, 42, 47, 43, 46, 47, 48, 47, 50
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 19 2020

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local k; add((-1)^(k+1)*ceil(n/k),k=1..n) end proc:
    map(f, [$1..100]); # Robert Israel, Nov 25 2024
  • Mathematica
    Table[Sum[(-1)^(k + 1) Ceiling[n/k], {k, 1, n}], {n, 1, 70}]
    nmax = 70; CoefficientList[Series[(x/(1 - x)) (1 + Sum[x^k/(1 + x^k), {k, 2, nmax}]), {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*ceil(n/k)); \\ Michel Marcus, Feb 21 2020

Formula

G.f.: (x/(1 - x)) * (1 + Sum_{k>=2} x^k / (1 + x^k)).
G.f.: (x/(1 - x)) * (1 + Sum_{k>=1} (-1)^(k+1) * x^(2*k) / (1 - x^k)).
a(n) = (n mod 2) + Sum_{k=1..n-1} A048272(k).
a(n) = 1 + Sum_{k<=n-1} A325937(k). - Robert Israel, Nov 25 2024

A332623 a(n) = Sum_{k=1..n} ceiling(n/k)^2.

Original entry on oeis.org

1, 5, 14, 25, 43, 58, 87, 106, 141, 171, 212, 239, 302, 333, 386, 439, 507, 546, 631, 674, 765, 834, 911, 962, 1091, 1157, 1246, 1331, 1450, 1513, 1666, 1733, 1866, 1967, 2080, 2181, 2373, 2452, 2577, 2694, 2883, 2970, 3171, 3262, 3437, 3600, 3749, 3848, 4107, 4225
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[Ceiling(n/k)^2:k in [1..n]]:n in [1..50]]; // Marius A. Burtea, Feb 17 2020
    
  • Mathematica
    Table[Sum[Ceiling[n/k]^2, {k, 1, n}], {n, 1, 50}]
    Table[n + Sum[2 DivisorSigma[1, k] + DivisorSigma[0, k], {k, 1, n - 1}], {n, 1, 50}]
    nmax = 50; CoefficientList[Series[x/(1 - x)^2 + x/(1 - x) Sum[(2 k + 1) x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • Python
    from math import isqrt
    def A332623(n): return n-(s:=isqrt(n-1))**2*(s+2)+sum((q:=(n-1)//k)*((k<<1)+q+3) for k in range(1,s+1)) # Chai Wah Wu, Oct 24 2023

Formula

G.f.: x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} (2*k + 1) * x^k / (1 - x^k).
a(n) = n + Sum_{k=1..n-1} (2*sigma(k) + d(k)).
a(n) ~ n^2 * Pi^2 / 6. - Vaclav Kotesovec, Feb 20 2020

A332569 a(n) = Sum_{k=1..n} floor(n/k) * ceiling(n/k).

Original entry on oeis.org

1, 5, 12, 23, 36, 54, 74, 97, 125, 156, 186, 226, 268, 306, 354, 409, 458, 515, 574, 636, 710, 778, 838, 922, 1013, 1086, 1168, 1264, 1350, 1452, 1556, 1651, 1762, 1864, 1966, 2105, 2234, 2332, 2448, 2594, 2726, 2864, 3004, 3132, 3294, 3444, 3564, 3736, 3917, 4067
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 16 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[Floor(n/k)*Ceiling(n/k):k in [1..n]]:n in [1..50]]; // Marius A. Burtea, Feb 16 2020
    
  • Mathematica
    Table[Sum[Ceiling[n/k] Floor[n/k], {k, 1, n}], {n, 1, 50}]
    Table[1 + Sum[DivisorSigma[1, k] + DivisorSigma[1, k + 1], {k, 1, n - 1}], {n, 1, 50}]
    nmax = 50; CoefficientList[Series[((1 + x)/(1 - x)) Sum[x^k/(1 - x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sum(k=1, n, my(q=n/k); floor(q) * ceil(q)); \\ Michel Marcus, Feb 17 2020
    
  • Python
    from math import isqrt
    from sympy import divisor_sigma
    def A332569(n): return -(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))-divisor_sigma(n) # Chai Wah Wu, Oct 23 2023

Formula

G.f.: ((1 + x) / (1 - x)) * Sum_{k>=1} x^k / (1 - x^k)^2.
a(n) = 1 + Sum_{k=1..n-1} (sigma(k) + sigma(k+1)) for n > 0.
a(n) ~ (Pi*n)^2/6. - Vaclav Kotesovec, Jun 24 2021

A333465 a(n) = Sum_{k=1..n} ceiling(n/k) * gcd(n,k).

Original entry on oeis.org

1, 4, 8, 14, 17, 30, 27, 43, 47, 62, 48, 97, 60, 96, 114, 123, 83, 167, 95, 195, 177, 170, 119, 283, 181, 209, 230, 300, 158, 401, 172, 330, 308, 288, 348, 517, 213, 329, 377, 560, 239, 613, 253, 522, 599, 413, 279, 776, 415, 624, 520, 640, 322, 793, 604, 854, 594, 543, 364, 1220
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 22 2020

Keywords

Crossrefs

Programs

  • Maple
    f:= n -> add(ceil(n/k)*igcd(n,k),k=1..n):
    map(f, [$1..100]); # Robert Israel, Mar 24 2020
  • Mathematica
    Table[Sum[Ceiling[n/k] GCD[n, k], {k, n}], {n, 60}]
    Table[Sum[EulerPhi[n/d] (d + Sum[DivisorSigma[0, k], {k, d - 1}]), {d, Divisors[n]}], {n, 60}]
  • PARI
    a(n) = sum(k=1, n, ceil(n/k)*gcd(n, k)); \\ Michel Marcus, Mar 23 2020

Formula

a(n) = Sum_{d|n} phi(n/d) * A006590(d).
a(n) = A018804(n) + Sum_{k=1..n-1} Sum_{d|k} gcd(n,d).

A332624 a(n) = Sum_{k=1..n} ceiling(n/k)^n.

Original entry on oeis.org

1, 5, 36, 289, 3433, 47578, 842499, 16850338, 389415029, 10010878371, 285679026506, 8918295095267, 302973286652448, 11112691430262573, 437929106387544254, 18447028378472722051, 827256956775203666857, 39346558275376372606086, 1978429667078835508142129
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[Ceiling(n/k)^n:k in [1..n]]:n in [1..20]]; // Marius A. Burtea, Feb 17 2020
  • Mathematica
    Table[Sum[Ceiling[n/k]^n, {k, 1, n}], {n, 1, 19}]
    Table[n + Sum[Sum[(d + 1)^n - d^n, {d, Divisors[k]}], {k, 1, n - 1}], {n, 1, 19}]
    Table[SeriesCoefficient[x/(1 - x)^2 + x/(1 - x) Sum[((k + 1)^n - k^n) x^k/(1 - x^k), {k, 1, n}], {x, 0, n}], {n, 1, 19}]

Formula

a(n) = [x^n] x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} ((k + 1)^n - k^n) * x^k / (1 - x^k).
a(n) = n + Sum_{k=1..n-1} Sum_{d|k} ((d + 1)^n - d^n).

A332846 a(1) = 1; a(n+1) = Sum_{k=1..n} a(k) * ceiling(n/k).

Original entry on oeis.org

1, 1, 3, 8, 20, 50, 121, 297, 716, 1739, 4198, 10157, 24513, 59246, 143006, 345381, 833792, 2013272, 4860337, 11734717, 28329772, 68396030, 165121957, 398644144, 962410246, 2323475153, 5609360573, 13542220814, 32693802921, 78929886033, 190553574988, 460037180829, 1110627936647
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 26 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[a[k] Ceiling[(n - 1)/k], {k, 1, n - 1}]; Table[a[n], {n, 1, 33}]
    a[1] = 1; a[n_] := a[n] = a[n - 1] + Sum[a[k] + Sum[a[d], {d, Divisors[k]}], {k, 1, n - 2}]; Table[a[n], {n, 1, 33}]
    terms = 33; A[] = 0; Do[A[x] = x (1 + (1/(1 - x)) (A[x] + x Sum[A[x^k], {k, 1, terms}])) + O[x]^(terms + 1) // Normal, terms + 1]; CoefficientList[A[x], x] // Rest

Formula

G.f. A(x) satisfies: A(x) = x * (1 + (1/(1 - x)) * (A(x) + x * Sum_{k>=1} A(x^k))).
a(1) = 1; a(n) = a(n-1) + Sum_{k=1..n-2} (a(k) + Sum_{d|k} a(d)).
a(n) ~ c * (1 + sqrt(2))^n, where c = 0.2594006517235012546870541901936538347053403598092060748627156661727... - Vaclav Kotesovec, Mar 10 2020

A333505 a(n) = Sum_{k=1..n} (-1)^(k+1) * k * ceiling(n/k).

Original entry on oeis.org

1, 0, 2, 2, 2, 2, 5, 5, 1, 4, 9, 9, 2, 2, 9, 17, 5, 5, 11, 11, 2, 12, 23, 23, -4, 1, 14, 26, 15, 15, 22, 22, -6, 8, 25, 37, 9, 9, 28, 44, 7, 7, 18, 18, 3, 35, 58, 58, -9, -2, 18, 38, 21, 21, 36, 52, 5, 27, 56, 56, -3, -3, 28, 68, 8, 26, 45, 45, 24, 50, 73, 73, -23, -23, 14
Offset: 1

Views

Author

Ilya Gutkovskiy, May 25 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(k + 1) k Ceiling[n/k], {k, 1, n}], {n, 1, 75}]
    Table[(-1)^(n + 1) Ceiling[n/2] + Sum[DivisorSum[k, (-1)^(# + 1) # &], {k, 1, n - 1}], {n, 1, 75}]
    nmax = 75; CoefficientList[Series[x/(1 - x) (1/(1 + x)^2 + Sum[(-1)^(k + 1) k x^k/(1 - x^k), {k, 1, nmax}]), {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*k*ceil(n/k)); \\ Michel Marcus, May 26 2020
    
  • Python
    from math import isqrt
    def A333505(n): return ((s:=isqrt(m:=n-1>>1))**2*(s+1)-sum((q:=m//k)*((k<<1)+q+1) for k in range(1,s+1))<<1)-((t:=isqrt(n-1))**2*(t+1)-sum((q:=(n-1)//k)*((k<<1)+q+1) for k in range(1,t+1))>>1) + (m+1 if n&1 else -m-1) # Chai Wah Wu, Oct 30 2023

Formula

G.f.: (x/(1 - x)) * (1/(1 + x)^2 + Sum_{k>=1} (-1)^(k+1) * k * x^k / (1 - x^k)).
a(n) = (-1)^(n+1) * ceiling(n/2) + Sum_{k=1..n-1} A002129(k).
a(n) = A001057(n) - A024919(n-1).
Previous Showing 11-20 of 24 results. Next