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.

Showing 1-8 of 8 results.

A049820 a(n) = n - d(n), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 5, 4, 6, 6, 9, 6, 11, 10, 11, 11, 15, 12, 17, 14, 17, 18, 21, 16, 22, 22, 23, 22, 27, 22, 29, 26, 29, 30, 31, 27, 35, 34, 35, 32, 39, 34, 41, 38, 39, 42, 45, 38, 46, 44, 47, 46, 51, 46, 51, 48, 53, 54, 57, 48, 59, 58, 57, 57, 61, 58, 65
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of non-divisors of n in 1..n. - Jaroslav Krizek, Nov 14 2009
Also equal to the number of partitions p of n such that max(p)-min(p) = 1. The number of partitions of n with max(p)-min(p) <= 1 is n; there is one with k parts for each 1 <= k <= n. max(p)-min(p) = 0 iff k divides n, leaving n-d(n) with a difference of 1. It is easiest to see this by looking at fixed k with increasing n: for k=3, starting with n=3 the partitions are [1,1,1], [2,1,1], [2,2,1], [2,2,2], [3,2,2], etc. - Giovanni Resta, Feb 06 2006 and Franklin T. Adams-Watters, Jan 30 2011
Number of positive numbers in n-th row of array T given by A049816.
Number of proper non-divisors of n. - Omar E. Pol, May 25 2010
a(n+2) is the sum of the n-th antidiagonal of A225145. - Richard R. Forberg, May 02 2013
For n > 2, number of nonzero terms in n-th row of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
Number of partitions of n of the form [j,j,...,j,i] (j > i). Example: a(7)=5 because we have [6,1], [5,2], [4,3], [3,3,1], and [2,2,2,1]. - Emeric Deutsch, Sep 22 2016

Examples

			a(7) = 5; the 5 non-divisors of 7 in 1..7 are 2, 3, 4, 5, and 6.
The 5 partitions of 7 with max(p) - min(p) = 1 are [4,3], [3,2,2], [2,2,2,1], [2,2,1,1,1] and [2,1,1,1,1,1]. - _Emeric Deutsch_, Mar 01 2006
		

Crossrefs

Cf. A000005.
One less than A062968, two less than A059292.
Cf. A161664 (partial sums).
Cf. A060990 (number of solutions to a(x) = n).
Cf. A045765 (numbers not occurring in this sequence).
Cf. A236561 (same sequence sorted into ascending order), A236562 (with also duplicates removed), A236565, A262901 and A262903.
Cf. A262511 (numbers that occur only once).
Cf. A055927 (positions of repeated terms).
Cf. A245388 (positions of squares).
Cf. A155043 (number of steps needed to reach zero when iterating a(n)), A262680 (number of nonzero squares encountered).
Cf. A259934 (an infinite trunk of the tree defined by edge-relation a(child) = parent, conjectured to be unique).
Cf. tables and arrays A047916, A051731, A051778, A173540, A173541.
Cf. also arrays A225145, A262898, A263255 and tables A263265, A263267.

Programs

Formula

a(n) = Sum_{k=1..n} ceiling(n/k)-floor(n/k). - Benoit Cloitre, May 11 2003
G.f.: Sum_{k>0} x^(2*k+1)/(1-x^k)/(1-x^(k+1)). - Emeric Deutsch, Mar 01 2006
a(n) = A006590(n) - A006218(n) = A161886(n) - A000005(n) - A006218(n) + 1 for n >= 1. - Jaroslav Krizek, Nov 14 2009
a(n) = Sum_{k=1..n} A000007(A051731(n,k)). - Reinhard Zumkeller, Mar 09 2010
a(n) = A076627(n) / A000005(n). - Reinhard Zumkeller, Feb 06 2012
For n >= 2, a(n) = A094181(n) / A051953(n). - Antti Karttunen, Nov 27 2015
a(n) = Sum_{k=1..n} ((n mod k) + (-n mod k))/k. - Wesley Ivan Hurt, Dec 28 2015
G.f.: Sum_{j>=2} (x^(j+1)*(1-x^(j-1))/(1-x^j))/(1-x). - Emeric Deutsch, Sep 22 2016
Dirichlet g.f.: zeta(s-1)- zeta(s)^2. - Ilya Gutkovskiy, Apr 12 2017
a(n) = Sum_{i=1..n-1} sign(i mod n-i). - Wesley Ivan Hurt, Sep 27 2018

Extensions

Edited by Franklin T. Adams-Watters, Jan 30 2012

A212868 Rectangular array T(n,k) = number of nondecreasing sequences of n 1..k integers with no element dividing the sequence sum (for n, k >= 1), read by decreasing antidiagonals.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 5, 3, 1, 0, 0, 0, 7, 9, 5, 2, 0, 0, 0, 12, 16, 15, 6, 2, 0, 0, 0, 16, 29, 29, 22, 9, 2, 0, 0, 0, 22, 43, 59, 52, 32, 12, 3, 0, 0, 0, 28, 64, 103, 112, 82, 40, 15, 3, 0, 0, 0, 37, 92, 168, 212, 199, 122, 59, 17, 3, 0, 0, 0, 43, 127, 259, 376, 407
Offset: 1

Views

Author

R. H. Hardin, May 29 2012

Keywords

Comments

Table starts:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
0 0 1 2 5 7 12 16 22 28 37 43 54 64 75 86 ...
0 0 1 3 9 16 29 43 64 92 127 168 219 281 355 435 ...
0 0 1 5 15 29 59 103 168 259 386 553 772 1043 1401 1832 ...
0 0 2 6 22 52 112 212 376 640 1011 1560 2293 3328 4711 6524 ...
0 0 2 9 32 82 199 407 796 1424 2407 3948 6166 9456 14171 20556 ...
0 0 2 12 40 122 319 722 1503 2872 5159 9087 15030 24441 38349 58701 ...
0 0 3 15 59 182 503 1214 2693 5517 10574 19715 34318 58653 96517 154975 ...
0 0 3 17 74 259 733 1912 4560 10052 20363 39988 73196 131054 225666 378925 ...
0 0 3 22 97 363 1067 2960 7533 17497 37344 77105 148113 276174 498304 873878 ...
...

Examples

			All solutions for n=8 and k=4:
  2   2   2   3   3   2   2   2   2   3   2   2   2   3   2
  2   3   2   4   3   2   2   2   2   3   2   2   3   3   3
  2   3   3   4   3   2   3   2   2   3   2   2   3   3   4
  2   3   3   4   4   2   3   3   2   3   3   2   3   3   4
  2   3   3   4   4   2   3   3   2   3   4   3   3   3   4
  3   3   4   4   4   2   3   3   2   3   4   4   3   3   4
  3   3   4   4   4   2   3   4   3   4   4   4   4   3   4
  3   3   4   4   4   3   4   4   4   4   4   4   4   4   4
		

Crossrefs

Cf. A161664 (row 2, cicada cycles), A212870 (row 3), A212871 (row 4), A212872 (row 5), A212873 (row 6), A212874 (row 7).
Cf. A212864 (column 4), A212865 (column 5), A212866 (column 6), A212867 (column 7).
Cf. A212869 (superdiagonal 1).

A187489 Irregular triangle T(n,k), n>=0, 0<=k<=A068063(n), read by rows: T(n,k) is the number of k-element nondividing subsets of {1, 2, ..., n}.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 2, 1, 5, 5, 1, 6, 7, 1, 7, 12, 1, 1, 8, 16, 2, 1, 9, 22, 6, 1, 10, 28, 12, 1, 1, 11, 37, 22, 2, 1, 12, 43, 31, 3, 1, 13, 54, 49, 6, 1, 14, 64, 70, 10, 1, 15, 75, 99, 21, 1, 16, 86, 128, 32, 1, 17, 101, 176, 49, 1, 18, 113, 216, 65, 1, 19, 130, 284, 101
Offset: 0

Views

Author

Alois P. Heinz, Mar 10 2011

Keywords

Comments

A set is called nondividing if no element divides the sum of any nonempty subset of the other elements.
T(n,k) = 0 for k>A068063(n). The triangle contains all positive values of T.

Examples

			T(5,2) = 5, because there are 5 2-element nondividing subsets of {1,2,3,4,5}: {2,3}, {2,5}, {3,4}, {3,5}, {4,5}.  T(7,3) = 1: {4,6,7}.
Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2;
  1, 3, 1;
  1, 4, 2;
  1, 5, 5;
  1, 6, 7;
  1, 7, 12, 1;
  ...
		

Crossrefs

Row sums give: A051014.
Cf. A068063.

A355145 Triangle read by rows: T(n,k) is the number of primitive subsets of {1,...,n} of cardinality k; n>=0, 0<=k<=ceiling(n/2).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 2, 1, 5, 5, 2, 1, 6, 7, 3, 1, 7, 12, 10, 3, 1, 8, 16, 15, 5, 1, 9, 22, 26, 13, 2, 1, 10, 28, 38, 22, 4, 1, 11, 37, 66, 60, 26, 4, 1, 12, 43, 80, 76, 35, 6, 1, 13, 54, 123, 156, 111, 41, 6, 1, 14, 64, 161, 227, 180, 74, 12
Offset: 0

Views

Author

Marcel K. Goh, Jun 20 2022

Keywords

Comments

A set is primitive if it does not contain distinct i and j such that i divides j.
For n >= 2, the alternating row sums equal -1.

Examples

			Triangle T(n,k) begins:
   n/k 0  1  2  3  4  5  6  7  8  9 10 11 12
    0  1
    1  1  1
    2  1  2
    3  1  3  1
    4  1  4  2
    5  1  5  5  2
    6  1  6  7  3
    7  1  7 12 10  3
    8  1  8 16 15  5
    9  1  9 22 26 13  2
   10  1 10 28 38 22  4
   11  1 11 37 66 60 26  4
   12  1 12 43 80 76 35  6
   ...
For n=6 and k=3 the T(6,3) = 3 primitive sets are {2,3,5}, {3,4,5}, and {4,5,6}.
		

Crossrefs

Columns k=0..2 give: A000012, A000027, A161664.
Row sums give A051026.
T(2n,n) gives A174094.
T(2n-1,n) gives A192298 for n>=1.

Formula

Sum_{k=1..ceiling(n/2)} k * T(n,k) = A087077(n). - Alois P. Heinz, Jun 24 2022

A299251 a(n) = ((Sum_{k=1..floor((n+1)^2/4)} d(k)) - T(n)) / 2, where d(n) = number of divisors of n (A000005) and T(n) = the n-th triangular number (A000217).

Original entry on oeis.org

0, 0, 1, 2, 4, 7, 11, 15, 21, 28, 37, 45, 55, 67, 80, 95, 110, 127, 146, 164, 187, 209, 235, 260, 286, 315, 346, 380, 413, 449, 485, 522, 564, 605, 651, 695, 743, 792, 844, 898, 950, 1006, 1064, 1123, 1185, 1250, 1318, 1384, 1451, 1523, 1596, 1670, 1747, 1828
Offset: 1

Views

Author

Luc Rousseau, Feb 06 2018

Keywords

Comments

Twice this sequence is an attempt to find a counterpart to A161664: both compare triangular numbers T(n) and partial sums of numbers of divisors S(n). A161664 computes the excess of T(n) compared to S(n), whereas 2*a(n) computes the excess of S(n') compared to T(n), where n' is chosen equal to floor((n+1)^2/4). This choice appears structurally natural and economical when illustrated in a diagram. (See provided link.)

Crossrefs

Programs

  • Mathematica
    F[n_] := Floor[(1/4)*n^2]
    A[n_] := (Sum[DivisorSigma[0, k], {k, 1, F[n + 1]}] - n*(n + 1)/2)/2
    Table[A[n], {n, 1, 100}]
  • PARI
    f(n)=floor(n^2/4)
    a(n)=(sum(k=1,f(n+1),numdiv(k))-n*(n+1)/2)/2
    for(n=1,100,print1(a(n),", "))
    
  • Python
    from math import isqrt
    def A299251(n): return (-(s:=isqrt(m:=(n+1)**2>>2))**2-(n*(n+1)>>1)>>1)+sum(m//k for k in range(1,s+1)) # Chai Wah Wu, Oct 23 2023

Formula

a(n) = (A006218(A002620(n + 1)) - A000217(n)) / 2.

A362864 Numbers k that divide Sum_{i=1..k} (i - d(i)), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 26, 47, 121, 204, 347, 562, 4204, 6937, 6947, 31108, 379097, 379131, 379133, 2801205, 12554202, 20698345, 56264197, 13767391064, 37423648626, 37423648726, 61701166395, 276525443156, 276525443176, 455913379395, 455913379831, 751674084802
Offset: 1

Views

Author

Ctibor O. Zizka, May 06 2023

Keywords

Comments

Numbers k such that the mean number of nondivisors in the range 1..k is an integer.
Numbers k such that A161664(k) is divisible by k.
Numbers k such that (A000217(k) - A006218(k)) is divisible by k.
The subsequence of odd terms k equals the intersection of A050226 and this sequence.

Examples

			k = 5: Sum_{i=1..5} (i - d(i))/k = 5/5 = 1, so k = 5 is a term.
		

Crossrefs

Programs

  • Mathematica
    seq[kmax_] := Module[{sum = 0, s = {}}, Do[sum += k - DivisorSigma[0, k]; If[Divisible[sum, k], AppendTo[s, k]], {k, 1, kmax}]; s]; seq[10^6] (* Amiram Eldar, May 06 2023 *)
  • PARI
    isok(k) = !(sum(i=1, k, i - numdiv(i)) % k); \\ Michel Marcus, May 06 2023
    
  • Python
    from itertools import count, islice
    from sympy import divisor_count
    def A362864_gen(): # generator of terms
        c = 0
        for k in count(1):
            if not (c:=c+k-divisor_count(k))%k:
                yield k
    A362864_list = list(islice(A362864_gen(),15)) # Chai Wah Wu, May 20 2023

Extensions

More terms from Amiram Eldar, May 06 2023
a(24)-a(32) from Martin Ehrenstein, May 22 2023

A368592 a(n) = numerator of -(1/4)*n!*(2 + n!)*(-2 + 1/(1 + floor(n/2 - 1/2))) - n!*Sum_{m=1..1 + 2*floor(n/2 - 1/2)} 1/m.

Original entry on oeis.org

-1, 0, 7, 190, 5826, 214956, 11104542, 711175536, 59256152496, 5925678248160, 730285755406560, 105161159860398720, 18003044434808914560, 3528596711774282883840, 801568243461355261718400, 205201470326854119387494400, 59742508072063053997776844800
Offset: 1

Views

Author

Mats Granvik, Dec 31 2023

Keywords

Comments

In the sum formula below, changing n! to n in the outer summation yields A161664.

Examples

			The fractions, of which a(n) is the numerator, begin: -1/4, 0, 7, 190, 5826, ...
		

Crossrefs

Programs

  • Mathematica
    Numerator[Table[-1/4*n!*(2 + n!)*(-2 + 1/(1 + Floor[n/2 - 1/2])) - n!*Sum[1/m, {m, 1, 1 + 2*Floor[n/2 - 1/2]}], {n, 1, 17}]]

Formula

For n>1: a(n) = Sum_{h=1..n!} Sum_{m=1..1 + 2*floor(n/2 - 1/2)} Sum_{k=1 + floor(h/(m + 1))..floor(h/m - 1/m)} 1.

A280981 Partial products of A049820; a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 1, 3, 6, 30, 120, 720, 4320, 38880, 233280, 2566080, 25660800, 282268800, 3104956800, 46574352000, 558892224000, 9501167808000, 133016349312000, 2261277938304000, 40703002889472000, 854763060678912000, 13676208970862592000, 300876597358977024000
Offset: 1

Views

Author

Jaroslav Krizek, Jan 11 2017

Keywords

Crossrefs

Cf. A049820(n) = number of nondivisors of n.

Programs

  • Magma
    [1, 1] cat [&*[#[c: c in [1..k] | k mod c ne 0]: k in [3..n]]: n in [3..100]]
  • Mathematica
    FoldList[#1 #2 &, Table[Boole[n <= 2] + n - DivisorSigma[0, n], {n, 25}]] (* Michael De Vlieger, Jan 11 2017 *)

Formula

a(1) = a(2) = 1; for n>2, a(n) = Product_{i=3..n} A049820(i).
Showing 1-8 of 8 results.