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.
%I A126592 #31 Aug 10 2023 07:14:41 %S A126592 0,0,3,3,8,14,14,14,23,33,33,45,45,45,60,60,60,78,78,98,119,119,119, %T A126592 143,168,168,195,195,195,225,225,225,258,258,293,329,329,329,368,408, %U A126592 408,450,450,450,495,495,495,543,543,593,644,644,644,698,753,753,810,810 %N A126592 Sum of numbers less than or equal to n which are multiples of 3 or 5. %C A126592 Sum of numbers m <= n such that (m mod 3) * (m mod 5) = 0. %H A126592 Harvey P. Dale, <a href="/A126592/b126592.txt">Table of n, a(n) for n = 1..1000</a> %H A126592 Project Euler, <a href="https://projecteuler.net/problem=1">Problem 1: Multiples of 3 and 5</a> %H A126592 <a href="/index/Rec#order_31">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1). %F A126592 an(n, d) = d * floor(n/d), sn(n, d) = (an(n, d) * (an(n, d) + d))/(2*d), a(n) = sn(n, 3) + sn(n, 5) - sn(n, 15). %t A126592 an[n_, d_] := d * Floor[n/d]; sn[n_, d_] := (an[n, d] * (an[n, d] + d))/(2 * d); Table[sn[n, 3] + sn[n, 5] - sn[n, 15], {n, 1000}] %t A126592 Accumulate[Table[If[Divisible[n, 3] || Divisible[n, 5], n, 0], {n, 60}]] (* _Harvey P. Dale_, Jun 09 2016 *) %t A126592 Accumulate[Table[n Boole[GCD[n, 15] > 1], {n, 50}]] (* _Alonso del Arte_, Dec 23 2018 *) %o A126592 (PARI) {b(n,x)=floor(n/x)*(1 + floor(n/x))}; %o A126592 for(n=1,30, print1((3*b(n,3) + 5*b(n,5) - 15*b(n,15))/2, ", ")) \\ _G. C. Greubel_, Mar 06 2018 %o A126592 (Magma) [(3*Floor(n/3)*(1 + Floor(n/3)) + 5*Floor(n/5)*(1 + Floor(n/5)) - 15*Floor(n/15)*(1 + Floor(n/15)))/2: n in [1..30]]; // _G. C. Greubel_, Mar 06 2018 %o A126592 (Scala) (for (n <- 2 to 50) yield if ((n % 3) * (n % 5) == 0) { n } else { 0 }).scanLeft(0)(_ + _) // _Alonso del Arte_, Dec 23 2018 %Y A126592 Cf. A126073, A126590. %K A126592 nonn,easy %O A126592 1,3 %A A126592 _Zak Seidov_, Mar 13 2007