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!)
A193773 Number of ways to write n as 2*x*y - x - y with 1 <= x <= y. 6

%I #17 Dec 23 2018 20:04:06

%S 1,1,1,1,2,1,1,2,1,1,2,1,2,2,1,1,2,2,1,2,1,1,3,1,2,2,1,2,2,1,1,3,2,1,

%T 2,1,1,3,2,1,3,1,2,2,1,2,2,2,1,3,1,1,4,1,1,2,1,2,3,2,2,2,2,1,2,1,2,4,

%U 1,1,2,2,2,3,1,1,3,2,1,2,2,1,4,1,2,3

%N Number of ways to write n as 2*x*y - x - y with 1 <= x <= y.

%C a(A005097(n)) = 1; for n > 1: a(A047845(n)) > 1. - _Reinhard Zumkeller_, Jan 02 2013

%C Number of ways to write 2*n+1 as a difference of two squares. Note that 2*(2*x*y - x - y) + 1 = (2*x - 1) * (2*y - 1) = (y + x - 1)^2 - (y - x)^2. - _Michael Somos_, Dec 23 2018

%H Reinhard Zumkeller, <a href="/A193773/b193773.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = ceiling(A000005(2*n+1) / 2). - _Michael Somos_, Dec 23 2018

%e G.f. = 1 + x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + 2*x^7 + x^8 + x^9 + 2*x^10 + ... - _Michael Somos_, Dec 23 2018

%t a[ n_] := If[ n < 0, 0, Ceiling[ DivisorSigma[0, 2 n + 1] / 2]]; (* _Michael Somos_, Dec 23 2018 *)

%o (Haskell)

%o a193773 n = length [() | x <- [1 .. n + 1],

%o let (y,m) = divMod (x + n) (2 * x - 1),

%o x <= y, m == 0]

%o (PARI) {a(n) = if(n < 0, 0, (numdiv(2*n+1) + 1)\2)}; /* _Michael Somos_, Dec 23 2018 */

%Y Cf. A000005, A005097, A047845, A125203.

%K nonn

%O 0,5

%A _Reinhard Zumkeller_, Jan 02 2013

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 24 14:23 EDT 2024. Contains 371960 sequences. (Running on oeis4.)