Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a266110 -id:a266110
     Sort: relevance | references | number | modified | created      Format: long | short | data
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).
+10
22
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,2
COMMENTS
a(p-2) = p for odd primes p.
LINKS
FORMULA
Other identities and observations. For all n >= 0:
a(n) <= A262686(n).
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 *)
PROG
(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
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.
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 14 2003
EXTENSIONS
More terms from David Wasserman, Aug 31 2004
STATUS
approved
The last nonzero term on each row of A265751.
+10
4
7, 7, 13, 7, 8, 7, 13, 7, 8, 13, 20, 13, 25, 13, 20, 19, 24, 19, 25, 19, 20, 37, 25, 37, 24, 25, 40, 37, 28, 37, 50, 37, 40, 33, 50, 37, 36, 37, 50, 43, 40, 43, 49, 43, 50, 67, 49, 67, 56, 49, 50, 67, 52, 67, 68, 55, 56, 67, 68, 67, 136, 67, 68, 63, 64, 67, 66, 67, 68, 79, 74, 79, 136, 79, 74, 75, 103, 79, 98, 79, 88, 103, 98, 103, 136, 85
OFFSET
0,1
COMMENTS
Starting from j = n, search for a smallest number k such that k - d(k) = j, and if found such a number, replace j with k and repeat the procedure. When eventually such k is no longer found, then the (last such) j must be one of the terms of A045765, and it is set as the value of a(n).
LINKS
FORMULA
a(n) = A265751(n, A266110(n)).
If A060990(n) = 0, a(n) = n, otherwise a(n) = a(A082284(n)), where A082284(n) = smallest number k such that k - d(k) = n, or 0 if no such number exists, and d(n) = the number of divisors of n (A000005).
Other identities and observations. For all n >= 0:
a(n) >= n.
A060990(a(n)) = 0. [All terms are in A045765.]
EXAMPLE
Starting from n = 21, we get the following chain: 21 -> 23 -> 27 -> 29 -> 31 -> 35 -> 37, with A082284 iterated 6 times before the final term 37 (for which A060990(37) = A082284(37) = 0) is encountered. Thus a(21) = 37.
PROG
(Scheme)
(definec (A266116 n) (cond ((A082284 n) => (lambda (lad) (if (zero? lad) n (A266116 lad))))))
;; Alternatively:
(define (A266116 n) (A265751bi n (A266110 n))) ;; Code for A265751bi given in A265751.
CROSSREFS
Cf. A266110 (gives the number of iterations of A082284 needed before a(n) is found).
Cf. also tree A263267 (and its illustration).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 21 2015
STATUS
approved
If A082284(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A082284(n)), where A082284(n) = smallest number k such that k - d(k) = n, or 0 if no such number exists, and d(n) = the number of divisors of n (A000005).
+10
3
5, 4, 5, 3, 2, 2, 4, 1, 1, 3, 3, 2, 4, 1, 2, 3, 2, 2, 3, 1, 1, 7, 2, 6, 1, 1, 3, 5, 1, 4, 5, 3, 2, 1, 4, 2, 1, 1, 3, 3, 1, 2, 3, 1, 2, 9, 2, 8, 2, 1, 1, 7, 1, 6, 4, 1, 1, 5, 3, 4, 8, 3, 2, 1, 1, 2, 1, 1, 1, 5, 2, 4, 7, 3, 1, 1, 9, 2, 5, 1, 2, 8, 4, 7, 6, 1, 3, 6, 1, 5, 13, 6, 2, 4, 12, 5, 5, 4, 1, 3, 1, 2, 11, 1, 4, 3, 10, 2, 1, 1, 2, 2, 1, 1, 9, 3, 1, 1, 8, 2, 3, 7
OFFSET
0,1
LINKS
FORMULA
If A060990(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A082284(n)).
Other identities. For all n >= 0:
a(n) = 1 + A266110(n).
EXAMPLE
Starting from n = 21, we get the following chain: 21 -> 23 -> 27 -> 29 -> 31 -> 35 -> 37, with A082284 iterated 6 times before the final term 37 (for which A060990(37) = A082284(37) = 0) is encountered. Here we count the terms (not steps) in whole chain, thus a(21) = 7.
PROG
(Scheme, with memoization-macro definec)
(definec (A266111 n) (cond ((A082284 n) => (lambda (lad) (if (zero? lad) 1 (+ 1 (A266111 lad)))))))
CROSSREFS
One more than A266110.
Number of significant terms on row n of A265751 (without its trailing zeros).
Cf. tree A263267 (and its illustration).
Cf. also A264971.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 21 2015
STATUS
approved

Search completed in 0.009 seconds