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 54 results. Next

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.]

A262509 Numbers n such that there is no other number k for which A155043(k) = A155043(n).

Original entry on oeis.org

0, 119143, 119147, 119163, 119225, 119227, 119921, 119923, 120081, 120095, 120097, 120101, 120281, 120293, 120349, 120399, 120707, 120747, 120891, 120895, 120903, 120917, 120919, 121443, 121551, 121823, 122079, 122261, 122263, 122273, 122277, 122813, 122961, 123205, 123213, 123223, 123237, 123257, 123765, 24660543, 24660549, 24662311, 24662329, 24663759, 24664997, 24665023, 24665351
Offset: 0

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Starting offset is zero, because a(0) = 0 is a special case in this sequence.
Numbers where A155043 takes a unique value. (Those values are given by A262508.)
Numbers n such that there does not exist any other number h from which one could reach zero in exactly the same number of steps as from n by repeatedly applying the map where k is replaced by k - A000005(k) = A049820(k). Thus in the tree where zero is the root and parent-child relation is given by A049820(child) = parent, all the numbers > n+t (where t is a small value depending on n) have n as their common ancestor. As it is guaranteed that there is at least one infinite path in such a tree, any n in this sequence can be neither a leaf nor any other vertex in a finite side-tree, as then at least one node in the infinite part would have the same distance to the root, thus it must be that n itself is in the infinite part and thus has an infinite number of descendant vertices. Also, for the same reason, the tree cannot branch to two infinite parts from any ancestor of n (which are nodes nearer to the root of the tree, zero).
From the above it follows that if this sequence is infinite, then A259934 is guaranteed to be the only infinite sequence which starts with a(0)=0 and satisfies the condition A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n-d(n) and d(n) is the number of divisors of n (A000005). This is a sufficient condition for the uniqueness of A259934, although not necessary. See e.g. A179016 which is the unique infinite solution to a similar problem, even though A086876 contains no ones after its two initial terms.
Is it possible for any even terms to occur after zero? If not, then apart from zero, this would be a subsequence of A262517.

Crossrefs

Subsequence of A259934, A261089, A262503 and A262513.
Cf. A262510 (gives the parent nodes for the terms a(1) onward), A262514, A262516, A262517.
Cf. also A086876, A179016.

Programs

  • PARI
    \\ Compute A262508 and A262509 at the same time:
    allocatemem((2^31)+(2^30));
    \\ The limits used are quite ad hoc. Beware of the horizon-effect if you change these.
    \\ As a post-check, test that A262509(n) = A259934(A262508(n)) for all the terms produced by this program.
    uplim1 = 43243200 + 672; \\ = A002182(54) + A002183(54).
    uplim2 = 36756720; \\ = A002182(53).
    uplim3 = 10810800; \\
    v155043 = vector(uplim1);
    v262503 = vector(uplim3);
    v262507 = vector(uplim3);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim1, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    for(i=1, uplim1, v262503[v155043[i]] = i; v262507[v155043[i]]++; if(!(i%1048576),print1(i,", ")));
    A262503 = n -> if(!n,n,v262503[n]);
    A262507 = n -> if(!n,1,v262507[n]);
    k=0; for(n=0, uplim3, if((1==A262507(n)) && (A262503(n) <= uplim2), write("b262508.txt", k, " ", n); write("b262509.txt", k, " ", A262503(n)); k++));
    
  • Scheme
    (define (A262509 n) (A261089 (A262508 n)))

Formula

a(n) = A261089(A262508(n)) = A262503(A262508(n)) = A259934(A262508(n)).

A262507 a(n) = number of times n occurs in A155043.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Records are: 1, 2, 3, 5, 6, 8, 10, 11, 12, 14, 16, 17, 19, 21, 22, 24, 25, 26, 27, 31, 35, 39, 44, ... and they occur at positions: 0, 1, 2, 3, 6, 10, 24, 49, 54, 62, 117, 236, 445, 484, 892, 893, 1022, 1784, 1911, 1912, 1913, 20600, 50822, ...
a(n) gives the length of each row of irregular table A263265.

Crossrefs

Cf. A262508 (positions of ones).
Cf. A263260 (partial sums).

Programs

  • 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)]);
    uplim2 = 110880; \\ = A002182(30).
    v262507 = vector(uplim2);
    for(i=1, uplim, if(v155043[i] <= uplim2, v262507[v155043[i]]++));
    A262507 = n -> if(!n,1,v262507[n]);
    for(n=0, uplim2, write("b262507.txt", n, " ", A262507(n)));
    
  • Scheme
    (define (A262507 n) (add (lambda (k) (if (= (A155043 k) n) 1 0)) n (A262502 (+ 2 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)))))))

Formula

a(n) = Sum_{k=n..A262502(2+n)} [A155043(k) == n]. (Here [...] denotes the Iverson bracket, resulting 1 when A155043(k) is n and 0 otherwise.)
Other identities. For all n >= 0:
a(n) = A263279(n) + A263280(n).

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).

A262518 Even bisection of A155043.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2015

Keywords

Comments

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

Crossrefs

Programs

Formula

a(n) = A155043(2*n).

A262519 Odd bisection of A155043.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2015

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Table[Length[NestWhileList[#-DivisorSigma[0,#]&,n,#!=0&]]-1,{n,1,200,2}] (* Harvey P. Dale, Aug 31 2017 *)
  • Scheme
    (define (A262519 n) (A155043 (+ n n 1)))

Formula

a(n) = A155043(2*n + 1).

A263077 a(n) = greatest k where A155043(k) < A155043(n).

Original entry on oeis.org

0, 0, 2, 2, 6, 2, 12, 6, 6, 6, 12, 6, 18, 12, 18, 18, 22, 12, 30, 18, 30, 18, 34, 22, 22, 22, 42, 22, 48, 22, 60, 30, 60, 30, 72, 48, 84, 34, 84, 34, 96, 34, 108, 42, 96, 42, 108, 42, 48, 48, 120, 48, 132, 48, 132, 48, 140, 60, 140, 48, 140, 72, 140, 140, 140, 72, 140, 84, 140, 84, 140, 60, 140, 96, 140, 96, 150, 96, 156, 96, 108, 108, 120, 72, 120, 120, 132, 108, 140, 108, 140, 132, 140, 120, 140, 84
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2015

Keywords

Crossrefs

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, 96}] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim1 = 36756720 + 640; \\ = A002182(53) + A002183(53).
    uplim2 = 36756720; \\ = A002182(53).
    uplim3 = 32432400; \\ = A002182(52). Really just some Ad Hoc value smaller than above.
    v155043 = vector(uplim1);
    vother = vector(uplim3); \\ Contains A262503 and A263082 in succession.
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim1, v155043[i] = 1 + v155043[i-numdiv(i)]; if(!(i%1048576),print1(i,", ")));
    A155043 = n -> if(!n,n,v155043[n]);
    maxlen = 0; for(i=1, uplim2, len = v155043[i]; vother[len] = i; maxlen = max(maxlen,len); if(!(i%1048576),print1(i,", "))); \\ First it will be A262503.
    print("uplim2=", uplim2, " uplim3=", uplim3, " maxlen=", maxlen);
    \\ Then we convert it to A263082:
    m = 0; for(i=1, maxlen, m = max(m, vother[i]); vother[i] = m; if(!(i%1048576),print1(i,", ")));
    A263082 = n -> if(!n,n,vother[n]);
    A263077 = n -> A263082(A155043(n)-1);
    \\ Finally we can compute A263077:
    for(i=1, uplim3, write("b263077.txt", i, " ", A263077(i)); );

Formula

a(n) = A263082(A155043(n)-1).
Showing 1-10 of 54 results. Next