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

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

A259934 Infinite sequence starting with a(0)=0 such that A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n - (number of divisors of n).

Original entry on oeis.org

0, 2, 6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 62, 70, 78, 90, 94, 102, 106, 114, 118, 121, 125, 129, 144, 152, 162, 166, 174, 182, 190, 194, 210, 214, 222, 230, 236, 242, 250, 254, 270, 274, 282, 294, 298, 302, 310, 314, 330, 342, 346, 354, 358, 366, 374, 390, 394, 402, 410, 418, 426, 434, 442, 446, 462, 466, 474, 486, 494, 510, 522, 530, 546, 558, 562, 566, 574, 582, 590
Offset: 0

Views

Author

Max Alekseyev, Jul 09 2015

Keywords

Comments

Equivalently, satisfies the property: A000005(a(n)) = a(n)-a(n-1). The first differences a(n)-a(n-1) are given in A259935.
V. S. Guba (2015) proved that such an infinite sequence exists. Numerical evidence suggests that it may also be unique -- is it? All terms below 10^10 are defined uniquely.
If the current definition does not uniquely define the sequence, the "lexicographically earliest" condition may be added to make the sequence well-defined.
From Vladimir Shevelev, Jul 21 2015: (Start)
If a(k), a(k+1), a(k+2) is an arithmetic progression, then a(k+1) is in A175304.
Indeed, by the definition of this sequence, a(n)-a(n-1) = d(a(n)), for all n>=1, where d(n) = A000005(n). Hence, have a(k+1) - a(k) = a(k+2) - a(k+1) = d(a(k+1)) = d(a(k+2)). So a(k+1) + d(a(k+2)) = a(k+2) and a(k+1) + d(a(k+1)) = a(k+2).
Therefore, d(a(k+1) + d(a(k+1))) = d(a(k+2))= d(a(k+1)), i.e., a(k+1) is in A175304. Thus, if there are infinitely many pairs of the same consecutive terms of A259935, then A175304 is infinite (see there my conjecture). (End)
From Antti Karttunen, Nov 27 2015: (Start)
If multiple apparently infinite branches would occur at some point of computing, then even if the "lexicographically earliest" condition were then added to the definition, it would not help us much (when computing the sequence), as we would still not know which of the said branches were truly infinite. [See also Max Alekseyev's latter Jul 9 2015 posting on SeqFan-list, where he notes the same thing.] Note that many of the derived sequences tacitly assume that the uniqueness-conjecture is true. See also comments at A262693 and A262896.
One sufficient (but not a necessary) condition for the uniqueness of this sequence is that the sequence A262509 has infinite number of terms. Please see further comments there.
The graph of sequence exhibits two markedly different slopes, depending on whether it is on the "fast lane" of A049820 (even numbers) or the "slow lane" [odd numbers, for example when traversing the 1356 odd terms from 123871 to 113569 at range a(9859) .. a(8504)]. See A263086/A263085 for the "average cumulative speed difference" between the lanes. In general, slow and fast lane stay separate, except when they terminate into one of the squares (A262514) that work as "exchange ramps", forcing the parity (and thus the speed) to change. In average, the odd squares are slightly better than the even squares in attracting lanes going towards smaller numbers (compare A263253 to A263252). The cumulative effect of this bias is that the odd terms are much rarer in this sequence than the even terms (compare A263278 to A262516).
(End)

Crossrefs

Cf. A000005, A049820, A060990, A259935 (first differences).
Topmost row of A263255. Cf. also irregular tables A263267 & A263265 and array A262898.
Cf. A262693 (characteristic function).
Cf. A155043, A262694, A262904 (left inverses).
Cf. A262514 (squares present), A263276 (their positions), A263277.
Cf. A262517 (odd terms).
Cf. A262509, A262510, A262897 (other subsequences).
Cf. also A175304, A260257, A262680.
Cf. also A262679, A262896 (see the C++ program there).
No common terms with A045765 or A262903.
Positions of zeros in A262522, A262695, A262696, A262697, A263254.
Various metrics concerning finite side-trees: A262888, A262889, A262890.
Cf. also A262891, A262892 and A262895 (cf. its graph).
Cf. A260084, A260124 (variants).
Cf. also A179016 (a similar "beanstalk trunk sequence" but with more tractable and regular behavior).

Programs

Formula

From Antti Karttunen, Nov 27 2015: (Start)
Other identities and observations. For all n >= 0:
a(n) = A262679(A262896(n)).
A155043(a(n)) = A262694(a(n)) = A262904(a(n)) = n.
A261089(n) <= a(n) <= A262503(n). [A261103 and A262506 give the distances of a(n) to these bounds.]
(End)

A059851 a(n) = n - floor(n/2) + floor(n/3) - floor(n/4) + ... (this is a finite sum).

Original entry on oeis.org

0, 1, 1, 3, 2, 4, 4, 6, 4, 7, 7, 9, 7, 9, 9, 13, 10, 12, 12, 14, 12, 16, 16, 18, 14, 17, 17, 21, 19, 21, 21, 23, 19, 23, 23, 27, 24, 26, 26, 30, 26, 28, 28, 30, 28, 34, 34, 36, 30, 33, 33, 37, 35, 37, 37, 41, 37, 41, 41, 43, 39, 41, 41, 47, 42, 46, 46, 48, 46, 50, 50, 52, 46, 48, 48
Offset: 0

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Feb 27 2001

Keywords

Comments

As n goes to infinity we have the asymptotic formula: a(n) ~ n * log(2).
More precisely, a(n) = n * log(2) + O(n^(131/416) * (log n)^(26947/8320)). - V Sai Prabhav, Jun 02 2025

Examples

			a(5) = 4 because floor(5) - floor(5/2) + floor(5/3) - floor(5/4) + floor(5/5) - floor(5/6) + ... = 5 - 2 + 1 - 1 + 1 - 0 + 0 - 0 + ... = 4.
		

Crossrefs

Partial sums of A048272.
Sums of the form Sum_{k=1..n} q^(k-1)*floor(n/k): A344820 (q=-n), A344819 (q=-4), A344818 (q=-3), A344817 (q=-2), this sequence (q=-1), A006218 (q=1), A268235 (q=2), A344814 (q=3), A344815 (q=4), A344816 (q=5), A332533 (q=n).

Programs

  • Magma
    A059851:= func< n | (&+[Floor(n/j)*(-1)^(j-1): j in [1..n]]) >;
    [A059851(n): n in [1..80]]; // G. C. Greubel, Jun 27 2024
    
  • Maple
    for n from 0 to 200 do printf(`%d,`, sum((-1)^(i+1)*floor(n/i), i=1..n)) od:
  • Mathematica
    f[list_, i_] := list[[i]]; nn = 200; a = Table[1, {n, 1, nn}]; b =
    Table[If[OddQ[n], 1, -1], {n, 1, nn}];Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] // Accumulate (* Geoffrey Critzer, Mar 29 2015 *)
    Table[Sum[Floor[n/k] - 2*Floor[n/(2*k)], {k, 1, n}], {n, 0, 100}] (* Vaclav Kotesovec, Dec 23 2020 *)
  • PARI
    { for (n=0, 10000, s=1; d=2; a=n; while ((f=floor(n/d)) > 0, a-=s*f; s=-s; d++); write("b059851.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 29 2009
    
  • Python
    from math import isqrt
    def A059851(n): return ((t:=isqrt(m:=n>>1))**2<<1)-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))-(sum(m//k for k in range(1,t+1))<<1)<<1) # Chai Wah Wu, Oct 23 2023
    
  • SageMath
    def A059851(n): return sum((n//j)*(-1)^(j-1) for j in range(1,n+1))
    [A059851(n) for n in range(81)] # G. C. Greubel, Jun 27 2024

Formula

From Vladeta Jovovic, Oct 15 2002: (Start)
a(n) = A006218(n) - 2*A006218(floor(n/2)).
G.f.: 1/(1-x)*Sum_{n>=1} x^n/(1+x^n). (End)
a(n) = Sum_{n/2 < k < =n} d(k) - Sum_{1 < =k <= n/2} d(k), where d(k) = A000005(k). Also, a(n) = number of terms among {floor(n/k)}, 1<=k<=n, that are odd. - Leroy Quet, Jan 19 2006
From Ridouane Oudra, Aug 15 2019: (Start)
a(n) = Sum_{k=1..n} (floor(n/k) mod 2).
a(n) = (1/2)*(n + A271860(n)).
a(n) = Sum_{k=1..n} round(n/(2*k)) - floor(n/(2*k)), where round(1/2) = 1. (End)
a(n) = 2*A263086(n) - 3*A006218(n). - Ridouane Oudra, Aug 17 2024

Extensions

More terms from James Sellers and Larry Reeves (larryr(AT)acm.org), Feb 27 2001

A263085 Partial sums of A099774 (A099774(n) = number of divisors of n-th odd number).

Original entry on oeis.org

1, 3, 5, 7, 10, 12, 14, 18, 20, 22, 26, 28, 31, 35, 37, 39, 43, 47, 49, 53, 55, 57, 63, 65, 68, 72, 74, 78, 82, 84, 86, 92, 96, 98, 102, 104, 106, 112, 116, 118, 123, 125, 129, 133, 135, 139, 143, 147, 149, 155, 157, 159, 167, 169, 171, 175, 177, 181, 187, 191, 194, 198
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2015

Keywords

Crossrefs

Programs

  • Mathematica
    FoldList[DivisorSigma[0,2*#2-1]+#1&,1,Range[2,62]] (* Ivan N. Ianakiev, Oct 24 2015 *)
    Accumulate[Table[DivisorSigma[0, 2*n-1], {n, 1, 100}]] (* Vaclav Kotesovec, Jan 14 2019 *)
  • PARI
    lista(nn) = {s = 0; forstep (n=1, nn, 2, s += numdiv(n); print1(s, ", "););} \\ Michel Marcus, Oct 12 2015

Formula

a(1) = 1; for n > 1, a(n) = A000005(2*n-1) + a(n-1).
a(n) = A263086(n) - A263084(n).
a(n) ~ n * (log(n) + 2*gamma + 3*log(2) - 1)/2, where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024

A263252 Partial sums of A263250.

Original entry on oeis.org

2, 3, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 9, 10, 10, 12, 13, 14, 15, 16, 16, 18, 18, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 26, 27, 28, 28, 29, 29, 30, 31, 32, 32, 33, 33, 35, 35, 35, 36, 36, 36, 37, 37, 38, 38, 38, 38, 40, 40, 40, 40, 40, 40, 43, 44, 45, 46, 46, 46, 47
Offset: 0

Views

Author

Antti Karttunen, Nov 07 2015

Keywords

Crossrefs

Cf. also A263086.

Programs

Formula

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

A372674 a(n) = Sum_{j=1..n} Sum_{k=1..n} tau(j*k).

Original entry on oeis.org

1, 8, 23, 54, 89, 162, 221, 326, 439, 596, 707, 964, 1107, 1352, 1645, 1976, 2179, 2630, 2865, 3390, 3859, 4316, 4615, 5406, 5883, 6444, 7059, 7892, 8299, 9430, 9877, 10794, 11635, 12424, 13361, 14852, 15415, 16324, 17349, 18952, 19587, 21342, 22017, 23486, 25177
Offset: 1

Views

Author

Vaclav Kotesovec, May 10 2024

Keywords

Comments

For m>=1, Sum_{j=1..n} tau(m*j) = A018804(m) * n * log(n) + O(n).
If p is prime, then Sum_{j=1..n} tau(p*j) ~ (2*p - 1) * n * (log(n) - 1 + 2*gamma)/p + n*log(p)/p, where gamma is the Euler-Mascheroni constant A001620.

Crossrefs

Programs

  • Mathematica
    Table[Sum[DivisorSigma[0, j*k], {j, 1, n}, {k, 1, n}], {n, 1, 50}]
    s = 1; Join[{1}, Table[s += DivisorSigma[0, n^2] + 2*Sum[DivisorSigma[0, j*n], {j, 1, n - 1}], {n, 2, 50}]]

A372709 a(n) = Sum_{k=1..n} tau(n*k), where tau(n) = number of divisors of n, cf. A000005.

Original entry on oeis.org

1, 5, 9, 18, 19, 41, 31, 56, 59, 83, 57, 136, 73, 127, 151, 170, 103, 233, 119, 270, 239, 233, 151, 406, 241, 285, 311, 424, 205, 579, 225, 464, 425, 399, 473, 758, 283, 459, 517, 812, 319, 891, 339, 742, 853, 587, 375, 1138, 571, 893, 731, 920, 437, 1157, 847, 1250
Offset: 1

Views

Author

Seiichi Manyama, May 11 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[DivisorSigma[0, k*n], {k, 1, n}], {n, 1, 50}] (* Vaclav Kotesovec, May 13 2024 *)
  • PARI
    a(n) = sum(k=1, n, numdiv(n*k));

Formula

Conjecture: a(n) ~ A372674(n) / 2. - Vaclav Kotesovec, May 13 2024
Showing 1-7 of 7 results.