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

A262905 a(n) = number of steps needed to reach zero when starting with k = n, and repeatedly replacing k with A262904(k).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 07 2015

Keywords

Crossrefs

Formula

a(0) = 0; and for n >= 1, a(n) = 1 + a(A262904(n)).

A262906 a(n) = n - A262904(n).

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 4, 7, 8, 7, 8, 9, 9, 11, 12, 13, 14, 15, 14, 17, 18, 19, 17, 21, 22, 20, 21, 25, 23, 27, 24, 29, 27, 31, 27, 33, 34, 35, 31, 37, 35, 39, 34, 41, 37, 43, 37, 45, 41, 40, 43, 49, 43, 51, 44, 53, 49, 55, 47, 57, 53, 59, 50, 61, 62, 63, 55, 65, 56, 67, 57, 69, 65, 71, 61, 73, 63, 75, 64, 77, 67, 68, 68, 70, 77, 72, 72, 74, 75, 76, 75, 78, 78, 80, 78, 82, 89
Offset: 0

Views

Author

Antti Karttunen, Oct 07 2015

Keywords

Comments

Numbers that do not occur in this sequence: 2, 6, 10, 16, 26, 28, 30, 32, 36, 38, 42, 46, 48, 52, 54, 58, 60, 66, 79, 81, 83, 91, 109, 111, 112, 116, 124, 147, 152, 156, ...

Crossrefs

Cf. A262904.

Programs

Formula

a(n) = n - A262904(n).

A262907 a(n) = number of steps needed to reach a fixed point when starting with k = n, and repeatedly replacing k with k - A262904(k).

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 4, 6, 5, 7, 6, 8, 7, 6, 8, 7, 9, 8, 8, 9, 8, 10, 8, 11, 9, 12, 10, 13, 12, 14, 9, 15, 13, 16, 13, 17, 15, 13, 16, 14, 16, 15, 14, 16, 14, 17, 18, 18, 16, 19, 17, 20, 18, 21, 17, 22, 15, 23, 18, 24, 22, 25, 20, 26, 21, 27, 19, 28, 23, 16, 16, 19, 28, 23, 23, 21, 27, 22, 27, 20, 20, 24, 20, 17, 23, 29, 29, 24, 22, 28, 24, 28, 30, 21
Offset: 0

Views

Author

Antti Karttunen, Oct 07 2015

Keywords

Crossrefs

Formula

If A262904(n) = 0 then a(n) = 0, otherwise a(n) = 1 + a(A262906(n)).

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)

A155043 a(0)=0; for n >= 1, a(n) = 1 + a(n-d(n)), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 4, 3, 3, 3, 4, 3, 5, 4, 5, 5, 6, 4, 7, 5, 7, 5, 8, 6, 6, 6, 9, 6, 10, 6, 11, 7, 11, 7, 12, 10, 13, 8, 13, 8, 14, 8, 15, 9, 14, 9, 15, 9, 10, 10, 16, 10, 17, 10, 17, 10, 18, 11, 19, 10, 20, 12, 19, 19, 21, 12, 22, 13, 22, 13, 23, 11, 24, 14, 23, 14, 25, 14, 26, 14, 15, 15
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 19 2009

Keywords

Comments

From Antti Karttunen, Sep 23 2015: (Start)
Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005).
The original name was: a(n) = 1 + a(n-sigma_0(n)), a(0)=0, sigma_0(n) number of divisors of n.
(End)

Crossrefs

Sum of A262676 and A262677.
Cf. A261089 (positions of records, i.e., the first occurrence of n), A262503 (the last occurrence), A262505 (their difference), A263082.
Cf. A262518, A262519 (bisections, compare their scatter plots), A262521 (where the latter is less than the former).
Cf. A261085 (computed for primes), A261088 (for squares).
Cf. A262507 (number of times n occurs in total), A262508 (values occurring only once), A262509 (their indices).
Cf. A263265 (nonnegative integers arranged by the magnitude of a(n)).
Cf. also A004001, A005185.
Cf. A264893 (first differences), A264898 (where repeating values occur).

Programs

  • Haskell
    import Data.List (genericIndex)
    a155043 n = genericIndex a155043_list n
    a155043_list = 0 : map ((+ 1) . a155043) a049820_list
    -- Reinhard Zumkeller, Nov 27 2015
    
  • Maple
    with(numtheory): a := proc (n) if n = 0 then 0 else 1+a(n-tau(n)) end if end proc: seq(a(n), n = 0 .. 90); # Emeric Deutsch, Jan 26 2009
  • Mathematica
    a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; Table[a@n, {n, 0, 82}] (* Michael De Vlieger, Sep 24 2015 *)
  • PARI
    uplim = 110880; \\ = A002182(30).
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    for(n=0, uplim, write("b155043.txt", n, " ", A155043(n)));
    \\ Antti Karttunen, Sep 23 2015
    
  • Python
    from sympy import divisor_count as d
    def a(n): return 0 if n==0 else 1 + a(n - d(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 03 2017
  • Scheme
    (definec (A155043 n) (if (zero? n) n (+ 1 (A155043 (A049820 n)))))
    ;; Antti Karttunen, Sep 23 2015
    

Formula

From Antti Karttunen, Sep 23 2015 & Nov 26 2015: (Start)
a(0) = 0; for n >= 1, a(n) = 1 + a(A049820(n)).
a(n) = A262676(n) + A262677(n). - Oct 03 2015.
Other identities. For all n >= 0:
a(A259934(n)) = a(A261089(n)) = a(A262503(n)) = n. [The sequence works as a left inverse for sequences A259934, A261089 and A262503.]
a(n) = A262904(n) + A263254(n).
a(n) = A263270(A263266(n)).
A263265(a(n), A263259(n)) = n.
(End)

Extensions

Extended by Emeric Deutsch, Jan 26 2009
Name edited by Antti Karttunen, Sep 23 2015

A263254 If A262693(n) = 1, then a(n) = 0, otherwise a(n) = 1 + a(A049820(n)).

Original entry on oeis.org

0, 1, 0, 2, 2, 3, 0, 4, 3, 1, 1, 2, 0, 3, 2, 3, 3, 4, 0, 5, 3, 5, 0, 6, 4, 1, 1, 7, 1, 8, 0, 9, 2, 9, 0, 10, 8, 11, 1, 11, 3, 12, 0, 13, 2, 12, 0, 13, 2, 1, 3, 14, 1, 15, 0, 15, 3, 16, 0, 17, 3, 18, 0, 17, 17, 19, 1, 20, 1, 20, 0, 21, 4, 22, 1, 21, 1, 23, 0, 24, 1, 2, 1, 3, 5, 3, 2, 4, 2, 5, 0, 5, 3, 6, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 07 2015

Keywords

Comments

Distance of node n from the infinite trunk (A259934) of the tree defined by edge-relation A049820(child) = parent.
Zero-based row index to array A263255.

Crossrefs

One less than A263275.
Cf. A263257 (positions of records, where each n first occurs).

Formula

If A262693(n) = 1 [when n is in A259934], then a(n) = 0, otherwise a(n) = 1 + a(A049820(n)).
a(n) = A155043(n) - A262904(n).
a(n) = A263275(n) - 1.

A262896 If n is in A262892, a(n) = A259934(n), otherwise the largest term in A045765 from which A259934(n) can be reached by iterating A049820, without visiting any other (larger) term of A259934.

Original entry on oeis.org

8, 2, 79, 12, 18, 40, 30, 140, 42, 52, 54, 66, 68, 123, 98, 90, 94, 116, 106, 126, 164, 121, 369, 133, 156, 168, 180, 184, 280, 229, 190, 194, 210, 218, 252, 246, 236, 242, 272, 254, 312, 324, 300, 364, 298, 302, 372, 356, 334, 342, 346, 354, 439, 366, 374, 390, 672, 414, 410, 438, 426, 460, 442, 452, 470, 466, 564, 496, 494, 524, 627, 530, 546, 558, 562, 566, 574, 592, 859, 660, 606, 642, 708, 650
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2015

Keywords

Comments

a(n) is the largest leaf-node among the finite subtrees branching from node n in the infinite trunk (A259934) of the tree generated by edge-relation A049820(child) = parent, and A259934(n) itself if it is one of the nonbranching nodes (A262897).
Note that without (so far undetected) regularity in A262509, there is no a priori upper bound for the value of a(n), and for some n this might not even be finite, if it happens that contrary to its conjectured nature, A259934 is not the unique infinite component, but just the lexicographically earliest instance of multiple infinite branches of the tree. In that case we might consider this sequence to be well-defined only up to the least such node branching to multiple infinite components, or alternatively, we might mark the nonfinite values at those points with -1.

Crossrefs

Programs

  • Scheme
    (define (A262896 n) (let ((t (A259934 n))) (let loop ((m t) (k (A262686 t))) (cond ((<= k t) m) ((= t (A049820 k)) (loop (max m (A262522 k)) (- k 1))) (else (loop m (- k 1)))))))

Formula

a(n) = max(A259934(n), Max_{k = A082284(A259934(n)) .. A262686(A259934(n))} [A049820(k) = A259934(n)] * A262522(k)).
(Here [ ] stands for Iverson bracket, giving as its result 1 only when A049820(k) = A259934(n), and 0 otherwise).
Other identities. For all n >= 0:
A262904(a(n)) = n. [A262904 works as a left inverse for this sequence.]
A259934(n) = A262679(a(n)).
For all n >= 1:
a(A262892(n)) = A259934(A262892(n)) = A262897(n).
Showing 1-7 of 7 results.