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.

A261086 Numbers n > 1 for which A261085(n) < A261085(n-1).

Original entry on oeis.org

23, 31, 49, 60, 63, 73, 86, 100, 115, 123, 147, 150, 163, 182, 199, 225, 230, 236, 241, 262, 277, 284, 302, 307, 325, 329, 342, 346, 358, 367, 372, 392, 395, 412, 421, 427, 442, 458, 466, 468, 486, 494, 503, 514, 519, 528, 536, 542, 550, 553, 555, 563, 584, 604, 610, 627, 630, 642, 643, 646, 653, 660, 680, 685, 719, 723, 736, 738, 740, 745, 767
Offset: 1

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Cf. A261085, A261087 (the corresponding primes).

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

A261089 a(n) = least k such that A155043(k) = n; positions of records in A155043.

Original entry on oeis.org

0, 1, 3, 5, 7, 13, 17, 19, 23, 27, 29, 31, 35, 37, 41, 43, 51, 53, 57, 59, 61, 65, 67, 71, 73, 77, 79, 143, 149, 151, 155, 157, 161, 163, 173, 177, 179, 181, 185, 191, 193, 199, 203, 209, 211, 215, 219, 223, 231, 233, 237, 239, 241, 249, 251, 263, 267, 269, 271, 277, 285, 291, 293, 299, 303, 315, 317, 321, 327, 331, 335, 337, 341, 347, 349, 357, 359, 369, 515
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Comments

Note that there are even terms besides 0, and they all seem to be squares: a(915) = 7744 (= 88^2), a(41844) = 611524 (= 782^2), a(58264) = 872356 (= 934^2), a(66936) = 1020100 (= 1010^2), a(95309) = 1503076 (= 1226^2), a(105456) = 1653796 (= 1286^2), ...

Crossrefs

Cf. A262503 (the last occurrence of n in A155043).
Cf. A262505 (difference between the last and the first occurrence).
Cf. A262507 (the number of occurrences of n in A155043).
Cf also A261085, A261088.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a261089 = fromJust . (`elemIndex` a155043_list)
    -- Reinhard Zumkeller, Nov 27 2015
  • Mathematica
    lim = 80; a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; t = Table[a@ n, {n, 0, 12 lim}]; Table[First@ Flatten@ Position[t, n] - 1, {n, 0, lim}] (* Michael De Vlieger, Sep 29 2015 *)
  • PARI
    allocatemem(123456789);
    uplim = 2162160; \\ = A002182(41).
    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]);
    n=0; k=0; while(k <= 10000, if(A155043(n)==k, write("b261089.txt", k, " ", n); k++); n++;);
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library, two variants.
    (definec (A261089 n) (let loop ((k 0)) (if (= n (A155043 k)) k (loop (+ 1 k)))))
    (define A261089 (RECORD-POS 0 0 A155043))
    

Formula

Other identities. For all n >= 0:
A155043(a(n)) = n.

A261088 Number of steps needed to reach zero when starting from k = n^2 and repeatedly applying the map that replaces k with k - d(k), where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 10, 10, 19, 15, 19, 21, 24, 28, 39, 33, 53, 44, 49, 53, 60, 61, 69, 72, 79, 82, 92, 93, 117, 108, 115, 115, 140, 121, 174, 146, 205, 155, 233, 217, 267, 192, 295, 209, 225, 222, 238, 249, 267, 270, 299, 290, 336, 313, 373, 328, 411, 347, 451, 380, 486, 400, 534, 422, 447, 441, 460, 460, 511, 479, 496, 504, 545, 529, 602, 553, 579, 577, 626, 612, 681, 632, 747, 665, 796, 695
Offset: 0

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Length[NestWhileList[#-DivisorSigma[0,#]&,n^2,#!= 0&]]-1;f/@Range[0,85] (* Ivan N. Ianakiev, Sep 25 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 2^25;
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%65536),print1(i,", ")););
    A155043 = n -> if(!n,n,v155043[n]);
    A261088 = n -> A155043(n^2);
    for(n=0, 5792, write("b261088.txt", n, " ", A261088(n)));
    
  • Scheme
    (define (A261088 n) (A155043 (A000290 n)))

Formula

a(n) = A155043(A000290(n)) = A155043(n^2).

A261087 Primes p for which A155043(p) < A155043(prevprime(p)), where A155043 gives the number of steps needed to reach zero when repeatedly applying the map that replaces k with k - A000005(k).

Original entry on oeis.org

83, 127, 227, 281, 307, 367, 443, 541, 631, 677, 853, 863, 967, 1091, 1217, 1427, 1451, 1487, 1523, 1667, 1787, 1861, 1997, 2027, 2153, 2207, 2297, 2339, 2411, 2477, 2543, 2693, 2711, 2837, 2909, 2963, 3089, 3251, 3313, 3323, 3467, 3533, 3593, 3677, 3719, 3797, 3863, 3917, 3989, 4007, 4019, 4091, 4259, 4447, 4493, 4643, 4657, 4783, 4787, 4799, 4877, 4937, 5087, 5119, 5441
Offset: 1

Views

Author

Antti Karttunen, Sep 23 2015

Keywords

Examples

			A155043(83) = 16 although A155043(79) = 26, thus 83 is included in this sequence.
		

Crossrefs

Programs

Formula

a(n) = A000040(A261086(n)).

A330877 Number of steps needed to reach zero or a cycle when starting from k = n and repeatedly applying the map that replaces k by k - d(k) if k is even, by k + d(k) if k is odd, where d(k) is the number of divisors of k (A000005).

Original entry on oeis.org

0, 2, 1, 7, 3, 6, 2, 5, 4, 4, 3, 12, 3, 11, 4, 10, 13, 10, 4, 9, 5, 8, 5, 8, 14, 7, 6, 32, 6, 32, 6, 31, 7, 30, 7, 29, 33, 29, 8, 28, 8, 28, 8, 27, 9, 26, 9, 12, 9, 11, 10, 25, 10, 25, 10, 24, 10, 23, 11, 23, 10, 22, 12, 21, 24, 21, 12, 21, 13
Offset: 0

Views

Author

Ctibor O. Zizka, Apr 29 2020

Keywords

Comments

First cycle we see for n = 83. The length of the cycle is 38 steps. To reach a cycle means the time to first step into the loop.

Examples

			n = 1, mapping steps are 1 + 1 = 2, 2 - 2 = 0, a(1) = 2;
n = 2, mapping steps are 2 - 2 = 0, a(2) = 1;
n = 3, mapping steps are 3 + 2 = 5, 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(3) = 7;
n = 4, mapping steps are 4 - 3 = 1, 1 + 1 = 2, 2 - 2 = 0, a(4) = 3;
n = 5, mapping steps are 5 + 2 = 7, 7 + 2 = 9, 9 + 3 = 12, 12 - 6 = 6, 6 - 4 = 2, 2 - 2 = 0, a(5) = 6.
		

Crossrefs

Showing 1-6 of 6 results.