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-4 of 4 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

A259934 Infinite sequence starting with a(0)=0 such that A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n - (number of divisors of n).

Original entry on oeis.org

0, 2, 6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 62, 70, 78, 90, 94, 102, 106, 114, 118, 121, 125, 129, 144, 152, 162, 166, 174, 182, 190, 194, 210, 214, 222, 230, 236, 242, 250, 254, 270, 274, 282, 294, 298, 302, 310, 314, 330, 342, 346, 354, 358, 366, 374, 390, 394, 402, 410, 418, 426, 434, 442, 446, 462, 466, 474, 486, 494, 510, 522, 530, 546, 558, 562, 566, 574, 582, 590
Offset: 0

Views

Author

Max Alekseyev, Jul 09 2015

Keywords

Comments

Equivalently, satisfies the property: A000005(a(n)) = a(n)-a(n-1). The first differences a(n)-a(n-1) are given in A259935.
V. S. Guba (2015) proved that such an infinite sequence exists. Numerical evidence suggests that it may also be unique -- is it? All terms below 10^10 are defined uniquely.
If the current definition does not uniquely define the sequence, the "lexicographically earliest" condition may be added to make the sequence well-defined.
From Vladimir Shevelev, Jul 21 2015: (Start)
If a(k), a(k+1), a(k+2) is an arithmetic progression, then a(k+1) is in A175304.
Indeed, by the definition of this sequence, a(n)-a(n-1) = d(a(n)), for all n>=1, where d(n) = A000005(n). Hence, have a(k+1) - a(k) = a(k+2) - a(k+1) = d(a(k+1)) = d(a(k+2)). So a(k+1) + d(a(k+2)) = a(k+2) and a(k+1) + d(a(k+1)) = a(k+2).
Therefore, d(a(k+1) + d(a(k+1))) = d(a(k+2))= d(a(k+1)), i.e., a(k+1) is in A175304. Thus, if there are infinitely many pairs of the same consecutive terms of A259935, then A175304 is infinite (see there my conjecture). (End)
From Antti Karttunen, Nov 27 2015: (Start)
If multiple apparently infinite branches would occur at some point of computing, then even if the "lexicographically earliest" condition were then added to the definition, it would not help us much (when computing the sequence), as we would still not know which of the said branches were truly infinite. [See also Max Alekseyev's latter Jul 9 2015 posting on SeqFan-list, where he notes the same thing.] Note that many of the derived sequences tacitly assume that the uniqueness-conjecture is true. See also comments at A262693 and A262896.
One sufficient (but not a necessary) condition for the uniqueness of this sequence is that the sequence A262509 has infinite number of terms. Please see further comments there.
The graph of sequence exhibits two markedly different slopes, depending on whether it is on the "fast lane" of A049820 (even numbers) or the "slow lane" [odd numbers, for example when traversing the 1356 odd terms from 123871 to 113569 at range a(9859) .. a(8504)]. See A263086/A263085 for the "average cumulative speed difference" between the lanes. In general, slow and fast lane stay separate, except when they terminate into one of the squares (A262514) that work as "exchange ramps", forcing the parity (and thus the speed) to change. In average, the odd squares are slightly better than the even squares in attracting lanes going towards smaller numbers (compare A263253 to A263252). The cumulative effect of this bias is that the odd terms are much rarer in this sequence than the even terms (compare A263278 to A262516).
(End)

Crossrefs

Cf. A000005, A049820, A060990, A259935 (first differences).
Topmost row of A263255. Cf. also irregular tables A263267 & A263265 and array A262898.
Cf. A262693 (characteristic function).
Cf. A155043, A262694, A262904 (left inverses).
Cf. A262514 (squares present), A263276 (their positions), A263277.
Cf. A262517 (odd terms).
Cf. A262509, A262510, A262897 (other subsequences).
Cf. also A175304, A260257, A262680.
Cf. also A262679, A262896 (see the C++ program there).
No common terms with A045765 or A262903.
Positions of zeros in A262522, A262695, A262696, A262697, A263254.
Various metrics concerning finite side-trees: A262888, A262889, A262890.
Cf. also A262891, A262892 and A262895 (cf. its graph).
Cf. A260084, A260124 (variants).
Cf. also A179016 (a similar "beanstalk trunk sequence" but with more tractable and regular behavior).

Programs

Formula

From Antti Karttunen, Nov 27 2015: (Start)
Other identities and observations. For all n >= 0:
a(n) = A262679(A262896(n)).
A155043(a(n)) = A262694(a(n)) = A262904(a(n)) = n.
A261089(n) <= a(n) <= A262503(n). [A261103 and A262506 give the distances of a(n) to these bounds.]
(End)

A045765 k - d(k) never takes these values, where d(k) = A000005(k).

Original entry on oeis.org

7, 8, 13, 19, 20, 24, 25, 28, 33, 36, 37, 40, 43, 49, 50, 52, 55, 56, 63, 64, 66, 67, 68, 74, 75, 79, 85, 88, 98, 100, 103, 108, 109, 112, 113, 116, 117, 123, 124, 126, 131, 132, 133, 134, 136, 140, 143, 145, 150, 153, 156, 159, 160, 163, 164, 167, 168
Offset: 1

Views

Author

Keywords

Comments

Complement of A236562. - Jaroslav Krizek, Feb 09 2014
Positions of zeros in A060990, leaf-nodes in the tree generated by edge-relation A049820(child) = parent. - Antti Karttunen, Oct 06 2015
Since A000005(x) <= 1 + x/2, k is in the sequence if there are no x <= 2*(k+1) with k = x - d(x). - Robert Israel, Oct 12 2015
This can be improved as: k is in the sequence if there are no x <= k + A002183(2+A261100(k)) with k = x - d(x). Cf. also A070319, A262686. - Antti Karttunen, Oct 12 2015
Luca (2005) proved that this seqeunce is infinite. - Amiram Eldar, Jul 26 2025

Crossrefs

Top row of A262898.
Cf. A263091 (primes in this sequence), A263095 (squares).
Cf. A259934 (gives the infinite trunk of the same tree, conjectured to be unique).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    sort(convert({$1..N} minus {seq(x - numtheory:-tau(x), x=1..2*(1+N))},list)); # Robert Israel, Oct 12 2015
  • Mathematica
    lim = 10000; Take[Complement[Range@ lim, Sort@ DeleteDuplicates@ Table[n - DivisorSigma[0, n], {n, lim}]], 57] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 36756720 + 640; \\ = A002182(53) + A002183(53).
    v060990 = vector(uplim);
    for(n=3, uplim, v060990[n-numdiv(n)]++);
    A060990 = n -> if(!n,2,v060990[n]);
    uplim2 = 36756720;
    n=0; k=1; while(n <= uplim2, if(0==A060990(n), write("b045765_big.txt", k, " ", n); k++); n++;);
    \\ Antti Karttunen, Oct 09 2015
    
  • Scheme
    (define A045765 (ZERO-POS 1 1 A060990))
    ;; Using also IntSeq-library of Antti Karttunen, Oct 06 2015

A262901 Numbers that have at least one leaf-child in the tree generated by edge-relation A049820(child) = parent.

Original entry on oeis.org

4, 5, 11, 14, 16, 17, 22, 27, 29, 32, 35, 41, 44, 46, 48, 51, 57, 58, 62, 65, 69, 70, 77, 80, 81, 91, 92, 96, 101, 102, 107, 110, 111, 114, 118, 119, 120, 128, 129, 130, 138, 139, 141, 144, 147, 148, 152, 155, 158, 161, 162, 165, 166, 169, 176, 181, 187, 191, 192, 199, 201, 214, 215, 216, 222, 224, 227, 231, 234, 238, 239, 247, 248, 249, 255, 258, 262, 264, 269, 277, 278, 282, 286, 291, 294, 296
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2015

Keywords

Comments

Positions of nonzeros in A262900.
Numbers n such that there is at least one k such that k - d(k) = n [where d(k) is the number of divisors of k, A000005(k)], but there is no such x that x - d(x) = k, in other words, k is one of the terms of A045765.
Sequence A262902 sorted into ascending order, with duplicates removed.

Crossrefs

Cf. A262903 (a subsequence).
Subsequence of A236562.
Cf. also A257508.
Showing 1-4 of 4 results.