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.

A262520 a(n) = A262519(n) - A262518(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2015

Keywords

Comments

a(n) = How many steps more are needed to reach zero when starting from k = 2*n + 1 than when starting from k = 2*n and repeatedly applying the map that replaces k by k - d(k)? [Here d(k) is the number of divisors of k (A000005)]. If it takes more steps when starting from 2n than from 2n+1, then a(n) is negative.

Crossrefs

Cf. A000005, A049820, A155043, A262518, A262519, A262521 (positions of negative values).

Programs

Formula

a(n) = A262519(n) - A262518(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

A263086 Partial sums of A099777, where A099777(n) gives the number of divisors of n-th even number.

Original entry on oeis.org

2, 5, 9, 13, 17, 23, 27, 32, 38, 44, 48, 56, 60, 66, 74, 80, 84, 93, 97, 105, 113, 119, 123, 133, 139, 145, 153, 161, 165, 177, 181, 188, 196, 202, 210, 222, 226, 232, 240, 250, 254, 266, 270, 278, 290, 296, 300, 312, 318, 327, 335, 343, 347, 359, 367, 377, 385, 391, 395, 411, 415, 421, 433, 441, 449, 461, 465, 473, 481
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2015

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(tau(2*k), k=1..n), n= 1..60); # Ridouane Oudra, Aug 24 2019
  • Mathematica
    Accumulate[DivisorSigma[0, 2 Range@ 69]] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    a(n) = sum(k=1, n, numdiv(2*k)); \\ Michel Marcus, Aug 25 2019
    
  • Python
    from math import isqrt
    def A263086(n): return (t:=isqrt(m:=n>>1))**2-((s:=isqrt(n))**2<<1)+((sum(n//k for k in range(1,s+1))<<1)-sum(m//k for k in range(1,t+1))<<1) # Chai Wah Wu, Oct 23 2023

Formula

a(1) = 2; for n > 1, a(n) = A000005(2*n) + a(n-1) [where A000005(k) gives the number of divisors of k].
Other identities. For all n >= 1:
a(n) = A263084(n) + A263085(n).
a(n) ~ n/2 * (3*log(n) + log(2) + 6*gamma - 3), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 13 2019
From Ridouane Oudra, Aug 24 2019: (Start)
a(n) = Sum_{k=1..n} A000005(2*k)
a(n) = A006218(n) + A060831(n). (End)

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

A262521 Numbers where A262520 takes a negative value; numbers n for which A155043(2n) > A155043(2n + 1).

Original entry on oeis.org

112, 113, 544, 545, 684, 760, 930, 1306, 1514, 1522, 1624, 1625, 2048, 2386, 2389, 2393, 2399, 2402, 2818, 2827, 2966, 2969, 3280, 3281, 3791, 3797, 3878, 4324, 4326, 4328, 4330, 4331, 4333, 4334, 4336, 4340, 4342, 4346, 4352, 5513, 5515, 5519, 5521, 5527, 5531, 5724, 5726, 6050, 6161, 6165, 6167, 6168, 6169, 6172, 6173, 6176, 6177, 6179, 6181, 6183, 6184, 6185, 6272
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2015

Keywords

Crossrefs

A263084 a(n) = A263086(n) - A263085(n).

Original entry on oeis.org

1, 2, 4, 6, 7, 11, 13, 14, 18, 22, 22, 28, 29, 31, 37, 41, 41, 46, 48, 52, 58, 62, 60, 68, 71, 73, 79, 83, 83, 93, 95, 96, 100, 104, 108, 118, 120, 120, 124, 132, 131, 141, 141, 145, 155, 157, 157, 165, 169, 172, 178, 184, 180, 190, 196, 202, 208, 210, 208, 220, 221, 223, 231, 237, 241, 251, 251, 251, 257, 267, 267, 278
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2015

Keywords

Comments

See also the Plot2-link at A263086.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Subtract @@ DivisorSigma[0, 2*n - {0, 1}], {n, 1, 100}]] (* Amiram Eldar, Jan 25 2025 *)
  • PARI
    list(lim) = {my(s = 0); for(n = 1, lim, s += numdiv(2*n) - numdiv(2*n-1); print1(s, ", "));} \\ Amiram Eldar, Jan 25 2025
  • Scheme
    (define (A263084 n) (- (A263086 n) (A263085 n)))
    

Formula

a(n) = A263086(n) - A263085(n).
a(n) ~ n * (log(n) + 2*gamma - log(2) - 1), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 25 2025
Showing 1-6 of 6 results.