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.

A123327 a(n) = A000203(n) + A004125(n).

This page as a plain text file.
%I A123327 #39 Nov 20 2024 14:11:31
%S A123327 1,3,5,8,10,15,16,23,25,31,34,45,42,55,60,67,69,86,84,103,102,113,122,
%T A123327 145,134,154,165,180,181,210,199,230,232,251,266,289,271,308,325,348,
%U A123327 339,380,369,412,417,430,451,498,471,513,521,552,559,612,601,640,633
%N A123327 a(n) = A000203(n) + A004125(n).
%C A123327 Another definition for this sequence: Let M be the matrix defined in A111490. Sequence gives M(1,1), M(1,2) + M(2,2), M(1,3) + M(2,3) + M(3,3), etc., i.e. a(n)= Sum_{i=1..n} M(i,n).
%C A123327 Proof from _Hartmut F. W. Hoft_, Feb 02 2014 that the two definitions agree: (Start)
%C A123327 For all n>=1 the following simplifications hold for the partial sums of the two sequences:
%C A123327 sum[1..n] a(k) = sum[1..n] A000203(k) + sum[1..n] A004125(k)
%C A123327                = A024916(n) + sum[1..n] A004125(k)
%C A123327                = n^2 + sum[1..n-1] A004125(k)
%C A123327                = sum[1..n] A123327(k).
%C A123327 An inductive argument then shows that the two definitions agree.
%C A123327 (End)
%F A123327 a(n) = A000290(n) - A024916(n-1), n > 1. - _Omar E. Pol_, Jan 29 2014
%e A123327 1(=1+0), 3(=3+0), 5(=4+1), 8(=7+1), 10(=6+4), 15(=12+3), 16(=8+8), etc.
%t A123327 Lim=57;s2=Table[Sum[Mod[n, k], {k, 2, n-1}], {n, Lim}];Table[DivisorSigma[1, n]+s2[[n]],{n,Lim}] (* _James C. McMahon_, Nov 20 2024 *)
%o A123327 (Python)
%o A123327 from math import isqrt
%o A123327 def A123327(n): return n**2+((s:=isqrt(n-1))**2*(s+1)-sum((q:=(n-1)//k)*((k<<1)+q+1) for k in range(1,s+1))>>1) # _Chai Wah Wu_, Oct 22 2023
%Y A123327 Cf. A000203, A004125, A024916, A111490.
%K A123327 easy,nonn
%O A123327 1,2
%A A123327 _Paolo P. Lava_ and _Giorgio Balzarotti_, Sep 26 2006; _Juri-Stepan Gerasimov_, Jul 02 2009
%E A123327 Corrected (83 replaced by 103) by _R. J. Mathar_, May 21 2010
%E A123327 Edited by _N. J. A. Sloane_, Feb 02 2014, merging A162383 from _Juri-Stepan Gerasimov_ with the present sequence. Thanks to _Omar E. Pol_ for noticing the duplication.