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-10 of 14 results. Next

A262508 Numbers that occur only once in A155043; positions of zeros in A262505, ones in A262507.

Original entry on oeis.org

0, 9236, 9237, 9238, 9247, 9248, 9330, 9331, 9353, 9356, 9357, 9358, 9385, 9388, 9399, 9407, 9446, 9453, 9476, 9477, 9478, 9480, 9481, 9547, 9561, 9590, 9626, 9652, 9653, 9655, 9656, 9722, 9743, 9775, 9776, 9778, 9781, 9786, 9844, 1308289, 1308290, 1308465, 1308468, 1308592, 1308713, 1308717, 1308750, 1308809, 1308815, 1309104, 1309162, 1309214, 1309299, 1309397, 1309464, 1309465, 1309536, 1309537, 1309640, 1309641, 1309642, 1309648, 1309675, 1309714, 1309751, 1309879, 1309883, 1310010, 1310011
Offset: 0

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Numbers n for which there exists exactly one natural number x from which one can reach zero in n steps by setting first k = x and then repeatedly applying the map where k is replaced with k - A000005(k). See A262509 for the corresponding x's and implications concerning A259934.
Starting offset is zero, because a(0) = 0 is a special case in this sequence.

Crossrefs

Programs

  • PARI
    \\ See the Pari-program given in A262509, which also computes the terms of this sequence at the same time.

A263265 Irregular triangle T(n,k), n >= 0, k = 1 .. A262507(n), read by rows, where each row n lists in ascending order all integers x for which A155043(x) = n.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 5, 8, 9, 10, 12, 7, 11, 14, 18, 13, 15, 16, 20, 22, 17, 24, 25, 26, 28, 30, 19, 21, 32, 34, 23, 38, 40, 42, 27, 44, 46, 48, 29, 36, 49, 50, 52, 54, 56, 60, 31, 33, 58, 72, 35, 62, 66, 84, 37, 39, 68, 70, 96, 41, 45, 74, 76, 78, 80, 104, 108, 43, 47, 81, 82, 88, 90, 120, 51, 83, 85, 86, 94, 128, 132, 53, 55, 87, 92, 102, 136, 140
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Examples

			Rows 0 - 8 of the triangle:
0;
1, 2;
3, 4, 6;
5, 8, 9, 10, 12;
7, 11, 14, 18;
13, 15, 16, 20, 22;
17, 24, 25, 26, 28, 30;
19, 21, 32, 34;
23, 38, 40, 42;
Row n contains A262507(n) terms, the first of which is A261089(n) and the last of which is A262503(n). For all terms on row n, A155043(n) = n.
		

Crossrefs

Inverse: A263266.
Cf. A261089 (left edge), A262503 (right edge), A262507 (number of terms on each row).
Cf. A263279 (gives the positions of terms of A259934 on each row), A263280 (and their distance from the right edge).
Cf. also permutations A263267 & A263268 and A263255 & A263256.
Differs from A263267 for the first time at n=31, where a(31) = 38, while A263267(31) = 40.

Formula

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

A263260 a(n) = number of nonnegative integers k for which A155043(k) <= n; partial sums of A262507.

Original entry on oeis.org

1, 3, 6, 11, 15, 20, 26, 30, 34, 38, 46, 50, 54, 59, 67, 74, 81, 88, 95, 103, 108, 114, 120, 128, 138, 145, 153, 160, 167, 172, 177, 183, 189, 197, 203, 210, 217, 224, 228, 233, 238, 244, 250, 258, 265, 270, 275, 281, 288, 299, 304, 308, 313, 321, 333, 340, 349, 354, 362, 370, 379, 389, 403
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Crossrefs

Formula

a(0) = 1; for n >= 1, a(n) = A262507(n) + a(n-1).

A263270 Each n occurs A262507(n) times.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18
Offset: 0

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Crossrefs

Formula

Other identities. For all n >= 0:
a(n) = A155043(A263265(n)).
a(A263260(n)) = n+1. [The sequence is one more than the least monotonic left inverse of A263260.]

A263280 a(n) = A262507(n) - A263279(n); number of integers k > A259934(n) for which A155043(k) = n = A155043(A259934(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 24 2015

Keywords

Comments

a(n) gives the distance of position of A259934(n) at row n of table A263265 from its right edge.

Crossrefs

Programs

Formula

a(n) = A262507(n) - A263279(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

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

A263267 Breadth-first traversal of the tree defined by the edge-relation A049820(child) = parent.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 5, 8, 9, 10, 12, 7, 11, 14, 18, 13, 15, 16, 20, 22, 17, 24, 25, 26, 28, 30, 19, 21, 32, 34, 23, 40, 38, 42, 27, 44, 48, 46, 29, 36, 50, 56, 60, 49, 52, 54, 31, 33, 72, 58, 35, 84, 62, 66, 37, 39, 96, 68, 70, 41, 45, 104, 108, 74, 76, 78, 80, 43, 47, 120, 81, 82, 90, 88, 51, 128, 132, 83, 85, 86, 94, 53, 55, 136, 140, 87, 92, 102
Offset: 0

Views

Author

Antti Karttunen, Nov 27 2015

Keywords

Comments

It is conjectured that the terms of A259934 trace the only infinite path in this tree.
After the root (0), the tree narrows next time to the width of just one node at level A262508(1) = 9236, with vertex 119143.

Examples

			Rows 0 - 21 of the table. The lines show the nodes of the tree connected by the edge-relation A049820(child) = parent:
0;
| \
1, 2;
| \  \
3, 4, 6;____
|  |  | \   \
5, 8, 9, 10, 12;
|     |   |   |
7, _ 11, 14, 18;
  /  | \   \   \
13, 15, 16, 20, 22;____
     |  |      / | \   \
    17, 24, 25, 26, 28, 30;
     | \         |      |
    19, 21,     32,     34;
         |       |      | \
        23,     40,    38, 42;____
         |              | \       \
        27,            44, 48,     46;____
         | \            |   | \    |  \   \
        29, 36,        50, 56, 60, 49, 52, 54;
         | \                   |           |
        31, 33,                72,         58;
         |                     |           |  \
        35,                    84,         62, 66;
         | \                   |           |  \
        37, 39,                96,         68, 70;_______
            |  \               |  \           / |  \     \
            41, 45,           104, 108,     74, 76, 78,   80;
            |   |              |                |   |  \    \
            43, 47,           120,             _81, 82, 90, 88;
                |              |  \           / |   |   |
                51,           128, 132,     83, 85, 86, 94;
                 | \            | \          |       |   |
                53, 55        136, 140      87,     92, 102;______
                 |                           | \     |    |  \    \
                57,_                        89, 91, 98, 106,  110, 112;
               / |  \                       /   / \       |     |
             59, 63, 64,                  93, 95, 100,   114,   116;
              |                            |   |          |  \
             61,                          99, 97,       _118, 126;
              |                            |   |       /  |  \
             65,                         101, 105,  121, 122, 124;
(See also _Michael De Vlieger_'s poster in the Links section.)
		

Crossrefs

Inverse permutation: A263268.
Cf. A262507 (number of terms on row/level n), A263260 (total number of terms in levels 0 .. n).
Cf. A264988 (the left edge), this differs from A261089 (the least term on each level) for the first time at level 69.
Cf. A263269 (the right edge).
Cf. A262686 (maximum term on the level n).
Cf. A045765 (the leaves of the tree).
Cf. also permutations A263265 (obtained from this table by sorting each row into ascending order), A263266.
Cf. also arrays A265751 and A263271.
Differs from A263265 for the first time at n=31, where a(31) = 40, while A263265(31) = 38.
Cf. also A088975.

Programs

  • PARI
    uplim = 125753; \\ = A263260(10001).
    checklimit = 1440; \\ Hard limit 1440 good for at least up to A002182(67) = 1102701600 as A002183(67) = 1440.
    v263267 = vector(uplim);
    A263267 = n -> if(!n,n,v263267[n]);
    z = 0; for(n=0, uplim, t = A263267(n); write("b263267.txt", n, " ", t); for(k=t+1, t+checklimit, if((k-numdiv(k)) == t, z++; if(z <= uplim, v263267[z] = k))));
    
  • Sage
    # After David Eppstein's Python-code for A088975.
    def A263267():
      '''Breadth-first reading of irregular tree defined by the edge-relation A049820(child) = parent'''
      yield 0
      for x in A263267():
        for k in [x+1 .. 2*(x+1)]:
          if ((k - sloane.A000005(k)) == x): yield k
    def take(n,g):
      '''Returns a list composed of the next n elements returned by generator g.'''
      return [next(g) for _ in range(n)]
    take(120, A263267())
    
  • Scheme
    ;; This version creates the list of terms incrementally, using append! function that physically modifies the list at the same time as it is traversed. Otherwise the idea is essentially the same as with Python/Sage-program above:
    (define (A263267list_up_to_n_terms_at_least n) (let ((terms-produced (list 0))) (let loop ((startp terms-produced) (endp terms-produced) (k (- n 1))) (cond ((<= k 0) terms-produced) (else (let ((children (children-of-n-in-A049820-tree (car startp)))) (cond ((null? children) (loop (cdr startp) endp k)) (else (begin (append! endp children) (loop (cdr startp) children (- k (length children))))))))))))
    (define (children-of-n-in-A049820-tree n) (let loop ((k (A262686 n)) (children (list))) (cond ((<= k n) children) ((= (A049820 k) n) (loop (- k 1) (cons k children))) (else (loop (- k 1) children)))))

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.

A262503 a(n) = largest k such that A155043(k) = n.

Original entry on oeis.org

0, 2, 6, 12, 18, 22, 30, 34, 42, 48, 60, 72, 84, 96, 108, 120, 132, 140, 112, 116, 126, 124, 130, 138, 150, 156, 168, 180, 176, 184, 192, 204, 216, 228, 240, 248, 264, 280, 250, 258, 270, 288, 296, 312, 306, 320, 328, 340, 352, 364, 372, 354, 358, 368, 384, 396, 420, 402, 414, 418, 432, 450, 468, 480, 504, 520, 540, 560, 572, 580, 594, 612, 610, 618, 622, 628, 648, 672, 592
Offset: 0

Views

Author

Antti Karttunen, Sep 24 2015

Keywords

Comments

The first odd terms occur as a(121) = 1089, a(123) = 1093, a(349) = 3253, a(717) = 7581, a(807) = 8685, a(1225) = 13689, etc.

Crossrefs

Cf. A261089 (gives the first occurrence of n in A155043).
Cf. A262507 (gives the number of times n occurs in A155043).

Programs

  • Mathematica
    lim = 80; a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; t = Table[a@ n, {n, 0, 12 lim}]; Last@ Flatten@ Position[t, #] - 1 & /@ Range[0, lim] (* Uses the product of a limit and an arbitrary coefficient (12) based on observation of output for low values (n < 500). This might need to be adjusted for large n to give correct values of a(n). - Michael De Vlieger, Sep 29 2015 *) (* Note: one really should use a general safe limit, like A262502(n+2) I use in my Scheme-program. - Antti Karttunen, 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]);
    uplim2 = 110880; \\ = A002182(30).
    v262503 = vector(uplim2);
    for(i=1, uplim, if(v155043[i] <= uplim2, v262503[v155043[i]] = i));
    A262503 = n -> if(!n,n,v262503[n]);
    for(n=0, uplim2, write("b262503.txt", n, " ", A262503(n)));
    
  • Scheme
    (define (A262503 n) (let loop ((k (A262502 (+ 2 n)))) (if (= (A155043 k) n) k (loop (- k 1)))))

Formula

Other identities and observations. For all n >= 0:
A262502(n+2) > a(n). [Not rigorously proved, but empirical evidence and common sense agrees.]
Showing 1-10 of 14 results. Next