login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106634 Number of ways to express n as i*j+k*l, with i,j,k,l in the range [0..n]. 5
1, 6, 21, 32, 62, 58, 124, 88, 173, 158, 226, 156, 380, 194, 340, 356, 466, 274, 613, 316, 690, 536, 596, 404, 1060, 552, 734, 728, 1032, 546, 1376, 596, 1213, 932, 1026, 976, 1858, 750, 1180, 1144, 1910, 854, 2048, 908, 1784, 1730, 1500, 1016, 2800 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Number of ordered 4-tuples [i,j,k,l] with n=i*j+k*l and i,j,k,l in the range [0..n].
a(n) is odd iff n is in A001105.
LINKS
R. J. Mathar and Charles R Greathouse IV, Table of n, a(n) for n = 0..10000 (terms through 780 from Mathar)
EXAMPLE
a(1)=6: the 4-tuples ijkl are 1100, 1101, 1110, 0011, 0111, 1011.
a(2)=21: 1111, 2100, 210x, 21x0, 1200, 120x, 12x0, where x = 1 or 2, and ten more with the two halves swapped.
MAPLE
A106634 := proc(n)
local a, i, j, k, l ;
a := 0 ;
for i from 0 to n do
for j from 0 to n do
if i*j > n then
break;
end if;
for k from 0 to n do
if i*j = n then
# treat l=0 separately
a := a+1 ;
end if;
# l=1..n
if k =0 then
if i*j=n then
a := a+n ;
end if;
else
l := (n-i*j)/k ;
if l >=1 and l <=n and type(l, 'integer') then
a := a+1 ;
end if;
end if;
end do:
end do:
end do:
a ;
end proc: # R. J. Mathar, Oct 17 2012
MATHEMATICA
list[n_] := Module[{v, i, j}, v[_] = 0;
For[i = 2, i <= n, i++, For[j = 1, j <= Min[Quotient[n, i], i-1], j++, v[i*j]+= 2]];
For[i = 1, i <= Floor@Sqrt[n], i++, v[i^2]++];
Join[{1}, Table[2 Sum[v[j] v[i-j], {j, Quotient[i, 2]+1, i-1}]+If[OddQ[i], 0, v[i/2]^2]+(4i+2) v[i], {i, 1, n}]]];
list[48] (* Jean-François Alcover, Jun 04 2023, after Charles R Greathouse IV *)
PROG
(PARI) list(n)={
my(v=vector(n));
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, i, 2*sum(j=i\2+1, i-1, v[j]*v[i-j])+if(i%2, , v[i/2]^2)+(4*i+2)*v[i]))
}; \\ Charles R Greathouse IV, Oct 17 2012
CROSSREFS
Sequence in context: A173622 A302868 A064440 * A261077 A063126 A256866
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, May 06 2005
EXTENSIONS
Definition clarified by N. J. A. Sloane, Jul 07 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)