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.

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

This page as a plain text file.
%I A345109 #16 Jun 09 2021 10:37:21
%S A345109 1,-1,9,-11,41,-87,241,-367,1185,-2207,5441,-10431,24961,-46207,
%T A345109 124161,-218879,503297,-1028607,2319361,-4275199,10434561,-19826687,
%U A345109 43847681,-85651455,191225857,-365699071,849625089,-1588051967,3444539393,-7070580735,15214903297
%N A345109 a(n) = Sum_{k=1..n} (-2)^(n - floor(n/k)).
%H A345109 Seiichi Manyama, <a href="/A345109/b345109.txt">Table of n, a(n) for n = 1..3000</a>
%F A345109 G.f.: (1/(1 + 2*x)) * Sum_{k>=1} (-2)^(k-1)*x^k * (1 - (-2*x)^k)/(1 - (-2)^(k-1)*x^k).
%t A345109 a[n_] := Sum[(-2)^(n - Floor[n/k]), {k, 1, n}]; Array[a, 30] (* _Amiram Eldar_, Jun 08 2021 *)
%o A345109 (PARI) a(n) = sum(k=1, n, (-2)^(n-n\k));
%o A345109 (PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (-2)^(k-1)*x^k*(1-(-2*x)^k)/(1-(-2)^(k-1)*x^k))/(1+2*x))
%Y A345109 Cf. A345034, A345108.
%K A345109 sign
%O A345109 1,3
%A A345109 _Seiichi Manyama_, Jun 08 2021