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-3 of 3 results.

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

A262509 Numbers n such that there is no other number k for which A155043(k) = A155043(n).

Original entry on oeis.org

0, 119143, 119147, 119163, 119225, 119227, 119921, 119923, 120081, 120095, 120097, 120101, 120281, 120293, 120349, 120399, 120707, 120747, 120891, 120895, 120903, 120917, 120919, 121443, 121551, 121823, 122079, 122261, 122263, 122273, 122277, 122813, 122961, 123205, 123213, 123223, 123237, 123257, 123765, 24660543, 24660549, 24662311, 24662329, 24663759, 24664997, 24665023, 24665351
Offset: 0

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Starting offset is zero, because a(0) = 0 is a special case in this sequence.
Numbers where A155043 takes a unique value. (Those values are given by A262508.)
Numbers n such that there does not exist any other number h from which one could reach zero in exactly the same number of steps as from n by repeatedly applying the map where k is replaced by k - A000005(k) = A049820(k). Thus in the tree where zero is the root and parent-child relation is given by A049820(child) = parent, all the numbers > n+t (where t is a small value depending on n) have n as their common ancestor. As it is guaranteed that there is at least one infinite path in such a tree, any n in this sequence can be neither a leaf nor any other vertex in a finite side-tree, as then at least one node in the infinite part would have the same distance to the root, thus it must be that n itself is in the infinite part and thus has an infinite number of descendant vertices. Also, for the same reason, the tree cannot branch to two infinite parts from any ancestor of n (which are nodes nearer to the root of the tree, zero).
From the above it follows that if this sequence is infinite, then A259934 is guaranteed to be the only infinite sequence which starts with a(0)=0 and satisfies the condition A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n-d(n) and d(n) is the number of divisors of n (A000005). This is a sufficient condition for the uniqueness of A259934, although not necessary. See e.g. A179016 which is the unique infinite solution to a similar problem, even though A086876 contains no ones after its two initial terms.
Is it possible for any even terms to occur after zero? If not, then apart from zero, this would be a subsequence of A262517.

Crossrefs

Subsequence of A259934, A261089, A262503 and A262513.
Cf. A262510 (gives the parent nodes for the terms a(1) onward), A262514, A262516, A262517.
Cf. also A086876, A179016.

Programs

  • PARI
    \\ Compute A262508 and A262509 at the same time:
    allocatemem((2^31)+(2^30));
    \\ The limits used are quite ad hoc. Beware of the horizon-effect if you change these.
    \\ As a post-check, test that A262509(n) = A259934(A262508(n)) for all the terms produced by this program.
    uplim1 = 43243200 + 672; \\ = A002182(54) + A002183(54).
    uplim2 = 36756720; \\ = A002182(53).
    uplim3 = 10810800; \\
    v155043 = vector(uplim1);
    v262503 = vector(uplim3);
    v262507 = vector(uplim3);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim1, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    for(i=1, uplim1, v262503[v155043[i]] = i; v262507[v155043[i]]++; if(!(i%1048576),print1(i,", ")));
    A262503 = n -> if(!n,n,v262503[n]);
    A262507 = n -> if(!n,1,v262507[n]);
    k=0; for(n=0, uplim3, if((1==A262507(n)) && (A262503(n) <= uplim2), write("b262508.txt", k, " ", n); write("b262509.txt", k, " ", A262503(n)); k++));
    
  • Scheme
    (define (A262509 n) (A261089 (A262508 n)))

Formula

a(n) = A261089(A262508(n)) = A262503(A262508(n)) = A259934(A262508(n)).

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)).
Showing 1-3 of 3 results.