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.

A342403 a(1) = 1; a(n) = -Sum_{d|n, d < n} d * a(d).

This page as a plain text file.
%I A342403 #15 Jan 22 2025 15:48:07
%S A342403 1,-1,-1,1,-1,4,-1,-3,2,6,-1,-24,-1,8,7,21,-1,-38,-1,-58,9,12,-1,288,
%T A342403 4,14,-16,-108,-1,-180,-1,-315,13,18,11,930,-1,20,15,1126,-1,-314,-1,
%U A342403 -256,-116,24,-1,-6960,6,-154,19,-354,-1,1078,15,2940,21,30,-1,6664,-1,32,-198,9765,17
%N A342403 a(1) = 1; a(n) = -Sum_{d|n, d < n} d * a(d).
%H A342403 Antti Karttunen, <a href="/A342403/b342403.txt">Table of n, a(n) for n = 1..20000</a>
%t A342403 a[1] = 1; a[n_] := a[n] = -Sum[d a[d], {d, Most @ Divisors[n]}]; Table[a[n], {n, 1, 65}]
%o A342403 (PARI) a(n) = if (n==1, 1, -sumdiv(n, d, if (d<n, d*a(d)))); \\ _Michel Marcus_, Mar 11 2021
%o A342403 (PARI)
%o A342403 up_to = 20000;
%o A342403 A342403list(n) = { my(v=vector(n)); v[1] = 1; for(n=2, #v, v[n] = -sumdiv(n, d, if(d==n, 0, v[d]*d))); (v); };
%o A342403 v342403 = A342403list(up_to);
%o A342403 A342403(n) = v342403[n]; \\ _Antti Karttunen_, Jan 22 2025
%o A342403 (Python)
%o A342403 from sympy import divisors
%o A342403 def A342403(n): return 1 if n == 1 else -sum(d*A342403(d) for d in divisors(n) if d < n) # _Chai Wah Wu_, Mar 11 2021
%Y A342403 Cf. A008683, A055615, A165552, A321384.
%K A342403 sign
%O A342403 1,6
%A A342403 _Ilya Gutkovskiy_, Mar 10 2021