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.

A106633 Number of ways to express n as k+l*m, with k, l, m all in the range [0..n].

Original entry on oeis.org

1, 4, 8, 12, 17, 21, 27, 31, 37, 42, 48, 52, 60, 64, 70, 76, 83, 87, 95, 99, 107, 113, 119, 123, 133, 138, 144, 150, 158, 162, 172, 176, 184, 190, 196, 202, 213, 217, 223, 229, 239, 243, 253, 257, 265, 273, 279, 283, 295, 300, 308, 314, 322, 326, 336, 342, 352
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Comments

Number of ordered triples [k,l,m] with n = k+l*m and k, l, m all in the range [0..n].
From R. J. Mathar, Jun 30 2013: (Start)
A010766 is the following array A read by antidiagonals:
1, 1, 1, 1, 1, 1, ...
2, 1, 1, 1, 1, 1, ...
3, 2, 1, 1, 1, 1, ...
4, 2, 2, 1, 1, 1, ...
5, 3, 2, 2, 1, 1, ...
6, 3, 2, 2, 2, 1, ...
and apparently a(n) is the hook sum Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). (End)

Examples

			0+1*2 = 0+2*1 = 1+1*1 = 2+0*0 = 2+0*1 = 2+0*2 = 2+1*0 = 2+2*0 = 2, so a(2)=8.
a(3)=12: 3+0*0, 3+0*m (6), 2+1*1, 1+2*1 (2), 0+3*1 (2).
		

Crossrefs

Programs

  • Maple
    A106633 := proc(n)
        local a, k, l, m ;
        a := 0 ;
        for k from 0 to n do
            for l from 0 to n do
                if l = 0 then
                    if k = n then
                        a := a+n+1 ;
                    end if;
                else
                    m := (n-k)/l ;
                    if type(m,'integer') then
                        a := a+1 ;
                    end if;
                end if;
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    A106633[n_] := Module[{a, m}, a = 0; Do[If[l == 0, If[k == n, a = a + n + 1], m = (n - k)/l; If[IntegerQ[m], a = a + 1]], {k, 0, n}, {l, 0, n}]; a];
    Table[A106633[n], {n, 0, 56}] (* Jean-François Alcover, Jun 10 2023, after R. J. Mathar *)
  • PARI
    list(n)={
        my(v=vector(n),t);
        for(i=2,n,for(j=1,min(n\i,i-1),v[i*j]+=2));
        for(i=1,sqrtint(n),v[i^2]++);
        concat(1,vector(n,k,2*k+1+t+=v[k]))
    }; \\ Charles R Greathouse IV, Oct 17 2012

Formula

From Ridouane Oudra, Apr 22 2024: (Start)
a(n) = 2*n + 1 + Sum_{k=1..n} floor(n/k);
a(n) = 2*n + 1 + Sum_{k=1..n} tau(k);
a(n) = A005408(n) + A006218(n). (End)

Extensions

Definition clarified by N. J. A. Sloane, Jul 07 2012