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

A263078 a(n) = greatest k for which A155043(n+k) < A155043(n); a(n) = A263077(n)-n.

Original entry on oeis.org

-1, -2, -1, -2, 1, -4, 5, -2, -3, -4, 1, -6, 5, -2, 3, 2, 5, -6, 11, -2, 9, -4, 11, -2, -3, -4, 15, -6, 19, -8, 29, -2, 27, -4, 37, 12, 47, -4, 45, -6, 55, -8, 65, -2, 51, -4, 61, -6, -1, -2, 69, -4, 79, -6, 77, -8, 83, 2, 81, -12, 79, 10, 77, 76, 75, 6, 73, 16, 71, 14, 69, -12, 67, 22, 65, 20, 73, 18, 77, 16, 27, 26, 37, -12, 35, 34, 45, 20, 51, 18, 49, 40, 47, 26, 45, -12, 43, 42, 41, 40, 39, 30
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Examples

			For n=1 we have A049820(1) = 0, thus A155043(1) = 1, and 0 is the only (and thus the largest) number from which zero can be reached with less steps (namely in zero steps, A155043(0) = 0), thus a(1) = 0 - 1 = -1.
For n=7, we have A155043(7) = 4 [as A049820(7) = 5, A049820(5) = 3, A049820(3) = 1, A049820(1) = 0], but there exists x=12 for which we have A049820(12) = 6, A049820(6) = 2, A049820(2) = 0, and this is the largest x such that A155043(x) < A155043(7), thus a(7) = 12 - 7 = 5.
		

Crossrefs

Cf. A263079 (indices of the negative terms), A263080 (of the positive terms).

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; Table[k = 3 n;
    While[a@ k >= a@ n, k--]; k - n, {n, 102}] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    A263078 = n -> A263077(n) - n;
    for(n=1,124340,write("b263078.txt",n," ",A263078(n)));
    \\ Other code as in A263077

Formula

a(n) = A263077(n)-n.

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

A263079 Numbers n for which there does not exist any x > n such that A155043(x) < A155043(n).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 18, 20, 22, 24, 25, 26, 28, 30, 32, 34, 38, 40, 42, 44, 46, 48, 49, 50, 52, 54, 56, 60, 72, 84, 96, 104, 108, 120, 128, 132, 136, 140, 142, 144, 150, 152, 156, 160, 162, 168, 170, 180, 182, 184, 186, 188, 190, 192, 194, 198, 200, 204, 208, 210, 216, 220, 225, 228, 240, 248, 252, 260, 264, 276, 280, 288, 296, 300, 308, 312, 320, 328, 340, 352, 360
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Comments

Numbers n for which A263077(n) < n.
Numbers n for which A263078(n) is negative.
Numbers n at which point A155043(n) is the greatest lower bound for the rest of its terms from A155043(n) onward.

Examples

			1 is present because A049820(1) = 0, thus A155043(1) = 1, while all the larger numbers require at least the same number of steps to reach zero.
		

Crossrefs

Programs

A263080 Numbers n for which there exists x > n such that A155043(x) < A155043(n); numbers n for which A263078(n) is positive.

Original entry on oeis.org

5, 7, 11, 13, 15, 16, 17, 19, 21, 23, 27, 29, 31, 33, 35, 36, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 121
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Examples

			5 is present, because if we start iterating A049820 from it as: A049820(5) = 3, A049820(3) = 1, A049820(1) = 0, we get a path of length 3 to reach zero, thus A155043(5) = 3. On the other hand, if we start from 6, the path is one step shorter: A049820(6) = 2, A049820(2) = 0 [i.e., A155043(6) = 2], thus there exists a number larger than 5 which results a shorter path to zero.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; Position[Table[k = 3 n; While[a@ k >= a@ n, k--]; k - n, {n, 121}], Integer?Positive] // Flatten (* _Michael De Vlieger, Oct 13 2015 *)
  • PARI
    n=0; i=0; while(i < 10000, n++; if((A263077(n) > n), i++; write("b263080.txt",i," ",n)));
    \\ Other code as in A263077.
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A263080 (MATCHING-POS 1 1 (COMPOSE positive? A263078)))

A263081 a(n) = largest k for which A155043(k) < A262508(n); a(n) = A262509(n) + A262909(n).

Original entry on oeis.org

124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 124340, 24684000, 24684000, 24684000, 24684000, 24684000, 24684000, 24684000
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Comments

a(n) = largest k for which A155043(k) < A155043(A262509(n)).
If a(n) > A262509(n) then it must be a leaf (see comments in A262909 for why). Particularly, we have A045765(40722) = 124340, A045765(8191770) = 24684000.
Terms of sequence (together with the corresponding values in A262508) give particularly clean values for the boundaries that are used for example in the C++-program which computes A262896.

Crossrefs

Programs

Formula

a(n) = A263077(A262509(n)).
a(n) = A262509(n) + A262909(n).

A263082 a(n) = Max( A262503(k) : k=0,1,2,3,...,n ), where A262503(k) = largest x such that A155043(x) = k.

Original entry on oeis.org

0, 2, 6, 12, 18, 22, 30, 34, 42, 48, 60, 72, 84, 96, 108, 120, 132, 140, 140, 140, 140, 140, 140, 140, 150, 156, 168, 180, 180, 184, 192, 204, 216, 228, 240, 248, 264, 280, 280, 280, 280, 288, 296, 312, 312, 320, 328, 340, 352, 364, 372, 372, 372, 372, 384, 396, 420, 420, 420, 420, 432, 450, 468, 480, 504, 520, 540, 560, 572, 580, 594, 612, 612, 618, 622, 628, 648, 672, 672, 672, 672, 672
Offset: 0

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Comments

From position a(n)+1 onward only terms > n will occur in A155043.

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = max(A262503(n),a(n-1)).
Other identities and observations:
For all n >= 0 and for any k > a(n): A155043(k) > n. [See the comment above.]
For all n >= 0: A155043(a(n)) <= n.
Showing 1-6 of 6 results.