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-10 of 11 results. Next

A262512 Sequence gives the unique x for each term of A262511 which contains those numbers n that have exactly one solution to x - d(x) = n, where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

6, 5, 8, 7, 11, 14, 18, 20, 17, 24, 22, 23, 27, 32, 34, 35, 40, 43, 46, 50, 47, 51, 57, 58, 61, 72, 65, 73, 84, 77, 81, 79, 88, 86, 87, 96, 92, 93, 94, 98, 99, 102, 97, 105, 101, 103, 120, 107, 114, 116, 119, 123, 125, 130, 135, 137, 143, 154, 160, 151, 155, 158, 164, 163, 175, 173, 177, 184, 179, 187, 198, 200, 191, 194, 193, 204, 210, 197, 203, 216, 206, 209, 212
Offset: 1

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Sequence is sorted by the magnitude of terms in A262511. Cf. also A262513.

Crossrefs

Cf. A262513 (same sequence sorted into ascending order).

Programs

  • Scheme
    (define (A262512 n) (let ((s (A262511 n))) (let loop ((k s)) (if (= s (A049820 k)) k (loop (+ 1 k))))))

Formula

a(n) = the least (and the only) such number k > A262511(n) that A049820(k) = A262511(n).
a(n) = A082284(A262511(n)).
a(n) = A262686(A262511(n)).

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

A060990 Number of solutions to x - d(x) = n, where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

2, 2, 1, 1, 1, 1, 3, 0, 0, 1, 1, 3, 1, 0, 1, 1, 1, 2, 1, 0, 0, 1, 4, 1, 0, 0, 1, 2, 0, 2, 1, 1, 1, 0, 2, 2, 0, 0, 2, 2, 0, 1, 1, 0, 1, 1, 3, 1, 2, 0, 0, 2, 0, 1, 1, 0, 0, 3, 2, 1, 1, 1, 2, 0, 0, 2, 0, 0, 0, 2, 4, 1, 1, 1, 0, 0, 1, 1, 2, 0, 1, 2, 1, 1, 1, 0, 1, 2, 0, 1, 1, 2, 1, 1, 1, 1, 2, 1, 0, 1, 0, 1, 3, 0, 1, 1
Offset: 0

Views

Author

Labos Elemer, May 11 2001

Keywords

Comments

If x-d(x) is never equal to n, then n is in A045765 and a(n) = 0.
Number of solutions to A049820(x) = n. - Jaroslav Krizek, Feb 09 2014

Examples

			a(11) = 3 because three numbers satisfy equation x-d(x)=11, namely {13,15,16} with {2,4,5} divisors respectively.
		

Crossrefs

Cf. A045765 (positions of zeros), A236562 (positions of nonzeros), A262511 (positions of ones).
Cf. A263087 (computed for squares).

Programs

  • Mathematica
    lim = 105; s = Table[n - DivisorSigma[0, n], {n, 2 lim + 3}]; Length@ Position[s, #] & /@ Range[0, lim] (* Michael De Vlieger, Sep 29 2015, after Wesley Ivan Hurt at A049820 *)
  • PARI
    allocatemem(123456789);
    uplim = 2162160; \\ = A002182(41).
    v060990 = vector(uplim);
    for(n=3, uplim, v060990[n-numdiv(n)]++);
    A060990 = n -> if(!n,2,v060990[n]);
    uplim2 = 110880; \\ = A002182(30).
    for(n=0, uplim2, write("b060990.txt", n, " ", A060990(n)));
    \\ Antti Karttunen, Sep 25 2015
    
  • Scheme
    (define (A060990 n) (if (zero? n) 2 (add (lambda (k) (if (= (A049820 k) n) 1 0)) n (+ n (A002183 (+ 2 (A261100 n)))))))
    ;; Auxiliary function add implements sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
    ;; Proof-of-concept code for the given formula, by Antti Karttunen, Sep 25 2015

Formula

a(0) = 2; for n >= 1, a(n) = Sum_{k = n .. n+A002183(2+A261100(n))} [A049820(k) = n]. (Here [...] denotes the Iverson bracket, resulting 1 when A049820(k) is n and 0 otherwise.) - Antti Karttunen, Sep 25 2015, corrected Oct 12 2015.
a(n) = Sum_{k = A082284(n) .. A262686(n)} [A049820(k) = n] (when tacitly assuming that A049820(0) = 0.) - Antti Karttunen, Oct 12 2015
Other identities and observations. For all n >= 0:
a(A045765(n)) = 0. a(A236562(n)) > 0. - Jaroslav Krizek, Feb 09 2014

Extensions

Offset corrected by Jaroslav Krizek, Feb 09 2014

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

A082284 a(n) = smallest number k such that k - tau(k) = n, or 0 if no such number exists, where tau(n) = the number of divisors of n (A000005).

Original entry on oeis.org

1, 3, 6, 5, 8, 7, 9, 0, 0, 11, 14, 13, 18, 0, 20, 17, 24, 19, 22, 0, 0, 23, 25, 27, 0, 0, 32, 29, 0, 31, 34, 35, 40, 0, 38, 37, 0, 0, 44, 41, 0, 43, 46, 0, 50, 47, 49, 51, 56, 0, 0, 53, 0, 57, 58, 0, 0, 59, 62, 61, 72, 65, 68, 0, 0, 67, 0, 0, 0, 71, 74, 73, 84, 77, 0, 0, 81, 79, 82, 0, 88
Offset: 0

Views

Author

Amarnath Murthy, Apr 14 2003

Keywords

Comments

a(p-2) = p for odd primes p.

Crossrefs

Column 1 of A265751.
Cf. A262686 (the largest such number), A262511 (positions where these are equal and nonzero).
Cf. A266114 (same sequence sorted into ascending order, with zeros removed).
Cf. A266115 (positive numbers missing from this sequence).
Cf. A266110 (number of iterations before zero is reached), A266116 (final nonzero value reached).
Cf. also tree A263267 and its illustration.

Programs

  • Maple
    N:= 1000: # to get a(0) .. a(N)
    V:= Array(0..N):
    for k from 1 to 2*(N+1) do
      v:= k - numtheory:-tau(k);
      if v <= N and V[v] = 0 then V[v]:= k fi
    od:
    seq(V[n],n=0..N); # Robert Israel, Dec 21 2015
  • Mathematica
    Table[k = 1; While[k - DivisorSigma[0, k] != n && k <= 2 (n + 1), k++]; If[k > 2 (n + 1), 0, k], {n, 0, 80}] (* Michael De Vlieger, Dec 22 2015 *)
  • PARI
    allocatemem(123456789);
    uplim1 = 2162160 + 320; \\ = A002182(41) + A002183(41).
    uplim2 = 2162160;
    v082284 = vector(uplim1);
    A082284 = n -> if(!n,1,v082284[n]);
    for(n=1, uplim1, k = n-numdiv(n); if((0 == A082284(k)), v082284[k] = n));
    for(n=0, 124340, write("b082284.txt", n, " ", A082284(n)));
    \\ Antti Karttunen, Dec 21 2015
    
  • Scheme
    (define (A082284 n) (if (zero? n) 1 (let ((u (+ n (A002183 (+ 2 (A261100 n)))))) (let loop ((k n)) (cond ((= (A049820 k) n) k) ((> k u) 0) (else (loop (+ 1 k))))))))
    ;; Antti Karttunen, Dec 21 2015

Formula

Other identities and observations. For all n >= 0:
a(n) <= A262686(n).

Extensions

More terms from David Wasserman, Aug 31 2004

A262686 a(n) = largest number k such that k - d(k) = n, or 0 if no such number exists, where d(n) = the number of divisors of n (A000005).

Original entry on oeis.org

2, 4, 6, 5, 8, 7, 12, 0, 0, 11, 14, 16, 18, 0, 20, 17, 24, 21, 22, 0, 0, 23, 30, 27, 0, 0, 32, 36, 0, 33, 34, 35, 40, 0, 42, 39, 0, 0, 48, 45, 0, 43, 46, 0, 50, 47, 54, 51, 60, 0, 0, 55, 0, 57, 58, 0, 0, 64, 66, 61, 72, 65, 70, 0, 0, 69, 0, 0, 0, 75, 80, 73, 84, 77, 0, 0, 81, 79, 90, 0, 88, 85, 86, 87, 96, 0, 92, 91, 0, 93, 94, 100, 98, 99, 102, 97, 108, 105, 0, 101
Offset: 0

Views

Author

Antti Karttunen, Sep 28 2015

Keywords

Crossrefs

Cf. also A082284 (the smallest such number), A262511 (positions where these are equal and nonzero).

Programs

  • Mathematica
    Table[k = 2 n + 3; While[Nor[k - DivisorSigma[0, k] == n, k == 0], k--]; k, {n, 0, 99}] (* Michael De Vlieger, Sep 29 2015 *)
  • Scheme
    (definec (A262686 n) (if (zero? n) 2 (let ((u (+ n (A002183 (+ 2 (A261100 n)))))) (let loop ((k u)) (cond ((= (A049820 k) n) k) ((< k n) 0) (else (loop (- k 1))))))))

A262522 a(n)=0 if n is in A259934, otherwise the largest term in A045765 from which one can reach n by iterating A049820 zero or more times.

Original entry on oeis.org

0, 8, 0, 7, 8, 7, 0, 7, 8, 79, 20, 79, 0, 13, 20, 79, 24, 79, 0, 19, 20, 79, 0, 79, 24, 25, 40, 79, 28, 79, 0, 79, 40, 33, 0, 79, 36, 37, 140, 79, 40, 43, 0, 43, 50, 79, 0, 79, 140, 49, 50, 79, 52, 79, 0, 55, 56, 79, 0, 79, 140, 79, 0, 63, 64, 79, 66, 67, 68, 79, 0, 79, 140, 79, 74, 75, 123, 79, 0, 79, 88, 123, 98, 123, 140, 85, 98, 123, 88, 103, 0, 123, 98, 103, 0, 123
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2015

Keywords

Comments

If n is itself in A045765, we iterate 0 times, and thus a(n) = n.

Examples

			For n=1, its transitive closure (as defined by edge-relation A049820(child) = parent) is the union of {1} itself together with all its descendants: {1, 3, 4, 5, 7, 8}. We see that there are no other nodes in a subtree whose root is 1, because A049820(3) = 3 - d(3) = 1, A049820(4) = 1, A049820(5) = 3, A049820(7) = 5, A049820(8) = 4 and of these only 7 and 8 are terms of A045765. The largest term (which by necessity is always a term of A045765) is here 8, thus a(1) = 8. Note however that it is not always the largest leaf from which starts the longest path leading back to n. (In this case it is 7 instead of 8, see the example in A262695).
For n=9, its transitive closure is {9, 11, 13, 15, 16, 17, 19, 21, 23, 24, 27, 29, 31, 33, 35, 36, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 79}. The largest term is 79, thus a(9) = 79.
		

Crossrefs

Formula

If A262693(n) = 1 [when n is in A259934],
then a(n) = 0,
otherwise, if A060990(n) = 0 [when n is one of the leaves, A045765],
then a(n) = n,
otherwise:
a(n) = Max_{k = A082284(n) .. A262686(n)} [A049820(k) = n] * a(k).
(In the last clause [ ] stands for Iverson bracket, giving as its result 1 only when A049820(k) = n, and 0 otherwise).
Other identities. For all n >= 1:
a(A262511(n)) = a(A262512(n)) = a(A082284(A262511(n))).

A262510 Parent nodes of nonzero terms of A262509: a(n) = A049820(A262509(n)).

Original entry on oeis.org

119139, 119143, 119147, 119213, 119225, 119919, 119921, 120073, 120091, 120095, 120097, 120277, 120291, 120347, 120391, 120703, 120739, 120883, 120891, 120895, 120915, 120917, 121435, 121543, 121819, 122075, 122257, 122261, 122271, 122273, 122809, 122953, 123197, 123205, 123219, 123231, 123251, 123749, 24660527, 24660543, 24662309, 24662321, 24663755, 24664989, 24665019, 24665347, 24665929, 24665977, 24669139, 24669833
Offset: 1

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

These numbers are one step nearer (than those of A262509) to the root (zero) of the tree where the parent-child relation is given by A049820(child) = parent. Like the terms of A262509, they are also vertices in the infinite trunk of that tree. Cf. A259934.

Crossrefs

Subsequence of A259934 and A262511.
Also a subsequence of A262517 (provided all terms are odd).

Programs

Formula

a(n) = A049820(A262509(n)).
a(n) = A259934(A262508(n)-1).

A262696 a(n)=0 if n is in A259934, otherwise number of terminal nodes (including n itself if it is a leaf) in that finite subtree whose root is n and whose edge-relation is defined by A049820(child) = parent.

Original entry on oeis.org

0, 2, 0, 1, 1, 1, 0, 1, 1, 13, 1, 13, 0, 1, 1, 11, 1, 11, 0, 1, 1, 10, 0, 10, 1, 1, 1, 10, 1, 9, 0, 8, 1, 1, 0, 8, 1, 1, 6, 7, 1, 1, 0, 1, 1, 6, 0, 6, 5, 1, 1, 6, 1, 5, 0, 1, 1, 5, 0, 3, 4, 3, 0, 1, 1, 3, 1, 1, 1, 2, 0, 1, 4, 1, 1, 1, 7, 1, 0, 1, 1, 7, 1, 6, 4, 1, 1, 6, 1, 1, 0, 5, 1, 1, 0, 4, 4, 4, 1, 1, 1, 1, 0, 1, 3, 4, 0, 4, 1, 1, 1, 3, 1, 1, 0, 1, 1, 1, 0, 1, 3, 0, 4, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 04 2015

Keywords

Examples

			For n=1, its transitive closure (as defined by edge-relation A049820(child) = parent) is the union of {1} itself together with all its descendants: {1, 3, 4, 5, 7, 8}. We see that there are no other nodes in a subtree whose root is 1, because A049820(3) = 3 - d(3) = 1, A049820(4) = 1, A049820(5) = 3, A049820(7) = 5, A049820(8) = 4 and of these only 7 and 8 are terms of A045765. Thus a(1) = 2.
For n=9, its transitive closure is {9, 11, 13, 15, 16, 17, 19, 21, 23, 24, 27, 29, 31, 33, 35, 36, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 79}, of which only thirteen members: {13, 19, 24, 33, 36, 37, 43, 55, 63, 64, 67, 75, 79} are leaves (in A045765), thus a(9) = 13.
		

Crossrefs

Formula

If A262693(n) = 1 [when n is in A259934],
then a(n) = 0,
otherwise, if A060990(n) = 0 [when n is one of the leaves, A045765],
then a(n) = 1,
otherwise:
a(n) = Sum_{k = A082284(n) .. A262686(n)} [A049820(k) = n] * a(k).
(In the last clause [ ] stands for Iverson bracket, giving as its result 1 only when A049820(k) = n, and 0 otherwise).
Other identities:
For any n in A262511 but not in A259934, a(n) = a(A082284(n)).

A262897 Nonbranching nodes in the infinite trunk (A259934) of the tree generated by edge-relation A049820(child) = parent: a(n) = A259934(A262892(n)).

Original entry on oeis.org

2, 12, 18, 30, 42, 54, 90, 94, 106, 121, 190, 194, 210, 236, 242, 254, 298, 302, 342, 346, 354, 366, 374, 390, 410, 426, 442, 466, 494, 530, 546, 558, 562, 566, 574, 606, 650, 658, 710, 716, 730, 746, 914, 942, 986, 1030, 1038, 1042, 1052, 1058, 1090, 1114, 1134, 1146, 1240, 1250, 1266, 1278, 1286, 1310, 1354, 1370, 1378, 1418, 1426, 1450, 1454, 1490, 1562, 1650, 1662, 1670, 1676, 1694, 1706
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2015

Keywords

Comments

Equally, numbers n for which A060990(n)*A262693(n) = 1, thus an intersection of A262511 and A259934.
The next odd term after a(10) = 121 occurs at a(3372) = 113569.

Crossrefs

Formula

a(n) = A259934(A262892(n)).
Showing 1-10 of 11 results. Next