login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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). 177

%I #106 Jan 28 2024 07:58:27

%S 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,

%T 22,27,22,29,26,29,30,31,27,35,34,35,32,39,34,41,38,39,42,45,38,46,44,

%U 47,46,51,46,51,48,53,54,57,48,59,58,57,57,61,58,65

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

%C a(n) is the number of non-divisors of n in 1..n. - _Jaroslav Krizek_, Nov 14 2009

%C 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

%C Number of positive numbers in n-th row of array T given by A049816.

%C Number of proper non-divisors of n. - _Omar E. Pol_, May 25 2010

%C a(n+2) is the sum of the n-th antidiagonal of A225145. - _Richard R. Forberg_, May 02 2013

%C For n > 2, number of nonzero terms in n-th row of triangle A051778. - _Reinhard Zumkeller_, Dec 03 2014

%C 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

%H Reinhard Zumkeller, <a href="/A049820/b049820.txt">Table of n, a(n) for n = 1..10000</a>

%H G. E. Andrews, M. Beck, N. Robbins, <a href="http://arxiv.org/abs/1406.3374">Partitions with fixed differences between largest and smallest parts</a>, arXiv preprint arXiv:1406.3374 [math.NT], 2014-2015.

%F a(n) = Sum_{k=1..n} ceiling(n/k)-floor(n/k). - _Benoit Cloitre_, May 11 2003

%F G.f.: Sum_{k>0} x^(2*k+1)/(1-x^k)/(1-x^(k+1)). - _Emeric Deutsch_, Mar 01 2006

%F a(n) = A006590(n) - A006218(n) = A161886(n) - A000005(n) - A006218(n) + 1 for n >= 1. - _Jaroslav Krizek_, Nov 14 2009

%F a(n) = Sum_{k=1..n} A000007(A051731(n,k)). - _Reinhard Zumkeller_, Mar 09 2010

%F a(n) = A076627(n) / A000005(n). - _Reinhard Zumkeller_, Feb 06 2012

%F For n >= 2, a(n) = A094181(n) / A051953(n). - _Antti Karttunen_, Nov 27 2015

%F a(n) = Sum_{k=1..n} ((n mod k) + (-n mod k))/k. - _Wesley Ivan Hurt_, Dec 28 2015

%F G.f.: Sum_{j>=2} (x^(j+1)*(1-x^(j-1))/(1-x^j))/(1-x). - _Emeric Deutsch_, Sep 22 2016

%F Dirichlet g.f.: zeta(s-1)- zeta(s)^2. - _Ilya Gutkovskiy_, Apr 12 2017

%F a(n) = Sum_{i=1..n-1} sign(i mod n-i). - _Wesley Ivan Hurt_, Sep 27 2018

%e a(7) = 5; the 5 non-divisors of 7 in 1..7 are 2, 3, 4, 5, and 6.

%e 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

%p A049820 := n->n-numtheory[tau](n):

%p seq(A049820(n), n=1..100);

%t Table[n - DivisorSigma[0, n], {n, 100}] (* _Wesley Ivan Hurt_, Nov 19 2014 *)

%t Array[(# - DivisorSigma[0, #])&, 70] (* _Vincenzo Librandi_, Dec 29 2015 *)

%o (PARI) a(n)=n-numdiv(n)

%o (Haskell)

%o a049820 n = n - a000005 n -- _Reinhard Zumkeller_, Feb 06 2012

%o (Scheme) (define (A049820 n) (- n (A000005 n))) ;; _Antti Karttunen_, Nov 27 2015

%o (GAP) List([1..80],n->n-Tau(n)); # _Muniru A Asiru_, Sep 28 2018

%Y Cf. A000005.

%Y One less than A062968, two less than A059292.

%Y Cf. A161664 (partial sums).

%Y Cf. A060990 (number of solutions to a(x) = n).

%Y Cf. A045765 (numbers not occurring in this sequence).

%Y Cf. A236561 (same sequence sorted into ascending order), A236562 (with also duplicates removed), A236565, A262901 and A262903.

%Y Cf. A262511 (numbers that occur only once).

%Y Cf. A055927 (positions of repeated terms).

%Y Cf. A245388 (positions of squares).

%Y Cf. A155043 (number of steps needed to reach zero when iterating a(n)), A262680 (number of nonzero squares encountered).

%Y Cf. A259934 (an infinite trunk of the tree defined by edge-relation a(child) = parent, conjectured to be unique).

%Y Cf. tables and arrays A047916, A051731, A051778, A173540, A173541.

%Y Cf. also arrays A225145, A262898, A263255 and tables A263265, A263267.

%Y 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.

%K nonn,easy

%O 1,5

%A _Clark Kimberling_

%E Edited by _Franklin T. Adams-Watters_, Jan 30 2012

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)