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.

A271860 a(n) = -Sum_{i=1..n} (-1)^floor(n/i).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 15 2016

Keywords

Crossrefs

Column k=1 of A345033.

Programs

  • Maple
    A271860:=n->-add((-1)^floor(n/i), i=1..n): seq(A271860(n), n=0..100);
  • Mathematica
    Table[-Sum[(-1)^Floor[n/i], {i, n}], {n, 0, 100}]
  • PARI
    a(n) = -sum(i=1, n, (-1)^(n\i)); \\ Michel Marcus, Apr 16 2016
    
  • PARI
    my(N=99, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, x^k*(1-x^k)/(1+x^k))/(1-x))) \\ Seiichi Manyama, Jun 06 2021
    
  • Python
    from math import isqrt
    def A271860(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)<<1)-n # Chai Wah Wu, Oct 23 2023

Formula

a(2n) = 2*A075989(n) for n>0.
a(n) mod 2 = A000035(n).
a(n) = Sum_{k=1..n} (-1)^floor((n-k)/k). - Wesley Ivan Hurt, May 09 2021
G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + x^k). - Seiichi Manyama, Jun 06 2021

A345032 Square array T(n,k), n >= 1, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=1..n} k^(floor(n/j) - 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 3, 2, 1, 4, 6, 4, 3, 1, 5, 11, 12, 5, 3, 1, 6, 18, 32, 21, 6, 4, 1, 7, 27, 70, 87, 41, 7, 4, 1, 8, 38, 132, 263, 258, 74, 8, 5, 1, 9, 51, 224, 633, 1047, 745, 144, 9, 5, 1, 10, 66, 352, 1305, 3158, 4120, 2224, 275, 10, 6, 1, 11, 83, 522, 2411, 7821, 15659, 16460, 6605, 541, 11, 6
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Examples

			Square array begins:
  1, 1,  1,   1,    1,    1,    1, ...
  1, 2,  3,   4,    5,    6,    7, ...
  2, 3,  6,  11,   18,   27,   38, ...
  2, 4, 12,  32,   70,  132,  224, ...
  3, 5, 21,  87,  263,  633, 1305, ...
  3, 6, 41, 258, 1047, 3158, 7821, ...
		

Crossrefs

Columns k=0..3 give A110654, A000027, A345028, A345029.
T(n,n) gives A345030.

Programs

  • Mathematica
    T[n_, 0] := Floor[(n + 1)/2]; T[n_, k_] := Sum[k^(Floor[n/j] - 1), {j, 1, n}]; Table[T[k, n - k], {n, 1, 12}, {k, 1, n}] // Flatten (* Amiram Eldar, Jun 06 2021 *)
  • PARI
    T(n, k) = sum(j=1, n, k^(n\j-1));

Formula

G.f. of column k: (1/(1 - x)) * Sum_{j>=1} x^j * (1 - x^j)/(1 - k*x^j).

A345034 a(n) = Sum_{k=1..n} (-2)^(floor(n/k) - 1).

Original entry on oeis.org

1, -1, 6, -8, 17, -27, 70, -136, 255, -491, 1046, -2082, 4063, -8131, 16476, -32882, 65423, -130845, 262372, -524818, 1048149, -2096045, 4195412, -8390820, 16775029, -33550477, 67113210, -134225588, 268427597, -536854983, 1073757754, -2147517076
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Column k=2 of A345033.

Programs

  • Mathematica
    a[n_] := Sum[(-2)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-2)^(n\k-1));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+2*x^k))/(1-x))

Formula

G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + 2*x^k).

A345036 a(n) = Sum_{k=1..n} (-n)^(floor(n/k) - 1).

Original entry on oeis.org

1, -1, 11, -66, 623, -7743, 117695, -2097676, 43046069, -999989915, 25937439347, -743008621122, 23298084749141, -793714765727191, 29192926036832303, -1152921504875220776, 48661191875256608663, -2185911559727678466189, 104127350297928222613599
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Diagonal of A345033.

Programs

  • Mathematica
    a[n_] := Sum[(-n)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Jun 06 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-n)^(n\k-1));

Formula

a(n) = [x^n] (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + n*x^k).

A345053 Positions of zeros in A345055, which is the Dirichlet inverse of A011772.

Original entry on oeis.org

8, 16, 32, 64, 98, 128, 147, 256, 512, 1024, 1552, 2048, 2597, 2752, 3088, 4064, 4096, 4112, 5648, 6112, 6176, 7184, 7399, 8128, 8192, 8224, 9232, 9344, 10256, 10768, 12256, 12304, 14368, 14864, 16384, 16448, 17003, 18448, 18464, 18688, 19472, 19984, 20512, 20992, 22544, 24512, 24608, 25616, 27152, 30224, 31409, 32272, 32768
Offset: 1

Views

Author

Antti Karttunen, Jul 01 2021

Keywords

Crossrefs

Programs

Formula

From Chai Wah Wu, Jul 05 2021: (Start)
Theorem: 2^i for i >= 3 are terms.
Proof: This can be shown by induction on i. For the inductive step, A345055(1)=1, A345055(2)=-3, A345055(3)=2, and A011772(2^i)=2^(i+1)-1.
So for the divisors 1,2,4 for 2^i, A011772(2^i)*A345055(1)+A011772(2^(i-1))*A345055(2)+A011772(2^(i-2))*A345055(4)=0.
A345055(d)=0 for the other proper divisors d of 2^i by the inductive hypothesis as d is a power of 2 and this implies A345033(2^i)=0 for i>=3.
(End)
Conjecture: all terms are of the form 2^i, 2^i*p, 2^i*p*q or 7^2*p for some primes p and q. - Chai Wah Wu, Jul 05 2021

A345035 a(n) = Sum_{k=1..n} (-3)^(floor(n/k) - 1).

Original entry on oeis.org

1, -2, 11, -28, 81, -234, 739, -2216, 6545, -19594, 59139, -177408, 531181, -1593614, 4783799, -14351032, 43044597, -129133854, 387426799, -1162281332, 3486765521, -10460293354, 31381119459, -94143358440, 282429356977, -847288080362, 2541866366171
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Column k=3 of A345033.

Programs

  • Mathematica
    a[n_] := Sum[(-3)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-3)^(n\k-1));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+3*x^k))/(1-x))

Formula

G.f.: (1/(1 - x)) * Sum_{k>=1} x^k * (1 - x^k)/(1 + 3*x^k).
Showing 1-6 of 6 results.