The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A049820 a(n) = n - d(n), where d(n) is the number of divisors of n (A000005). 158
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 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 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 G. E. Andrews, M. Beck, N. Robbins, Partitions with fixed differences between largest and smallest parts, arXiv preprint arXiv:1406.3374 [math.NT], 2014-2015. 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)^2 - zeta(s-1). - Ilya Gutkovskiy, Apr 12 2017 a(n) = Sum_{i=1..n-1} sign(i mod n-i). - Wesley Ivan Hurt, Sep 27 2018 EXAMPLE 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 MAPLE A049820 := n->n-numtheory[tau](n): seq(A049820(n), n=1..100); MATHEMATICA Table[n - DivisorSigma[0, n], {n, 100}] (* Wesley Ivan Hurt, Nov 19 2014 *) Array[(# - DivisorSigma[0, #])&, 70] (* Vincenzo Librandi, Dec 29 2015 *) PROG (PARI) a(n)=n-numdiv(n) (Haskell) a049820 n = n - a000005 n  -- Reinhard Zumkeller, Feb 06 2012 (Scheme) (define (A049820 n) (- n (A000005 n))) ;; Antti Karttunen, Nov 27 2015 (GAP) List([1..80], n->n-Tau(n)); # Muniru A Asiru, Sep 28 2018 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. Other related sequences: A006218, A006590, A051953, A070824, A094181, A062249, A067391, A076627, A128508, A131187, A134156, A140826, A161886, A177235, A177236, A227874, A228453, A230653, A230654, A231167, A245197, A253473. Sequence in context: A075491 A326730 A089279 * A109712 A095049 A118209 Adjacent sequences:  A049817 A049818 A049819 * A049821 A049822 A049823 KEYWORD nonn,easy AUTHOR EXTENSIONS Edited by Franklin T. Adams-Watters, Jan 30 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 21 06:11 EDT 2021. Contains 345358 sequences. (Running on oeis4.)