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!)
A255361 Number of ways n can be represented as x*y+x+y where x>=y>1. 7
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 3, 0, 0, 1, 2, 0, 2, 0, 1, 2, 0, 0, 3, 1, 1, 1, 1, 0, 2, 1, 2, 1, 0, 0, 4, 0, 0, 2, 2, 1, 2, 0, 1, 1, 2, 0, 4, 0, 0, 2, 1, 1, 2, 0, 3, 2, 0, 0, 4, 1, 0, 1, 2, 0, 4, 1, 1, 1, 0, 1, 4, 0, 1, 2, 3, 0, 2, 0, 2, 3, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,24
LINKS
FORMULA
Let d = A000005; then a(n) = floor((d(n+1) - 1)/2) for even n and a(n) = floor((d(n+1) - 3) / 2) for odd n>1. - Ivan Neretin, Sep 07 2015
EXAMPLE
8 = 2*2 + 2 + 2, this is the only representation, so a(8)=1.
23 = 2*7 + 2 + 7 = 3*5 + 3 + 5, two representations, so a(23)=2.
MATHEMATICA
a[n_] := (r = Reduce[x >= y > 1 && n == x*y + x + y, {x, y}, Integers]; Which[r[[0]] === And, 1, r[[0]] === Or, Length[r], True, 0]);
Table[a[n], {n, 0, 105}] (* Jean-François Alcover, Jan 23 2018 *)
PROG
(Python)
TOP = 1000
a = [0]*TOP
for y in range(2, TOP//2):
for x in range(y, TOP//2):
k = x*y + x + y
if k>=TOP: break
a[k]+=1
print(a)
(PARI) a(n) = {nb = 0; for (y=2, n\2, for (x=y, n\2, nb += ((x*y+x+y) == n); ); ); nb; } \\ Michel Marcus, Feb 22 2015
CROSSREFS
Sequence in context: A295343 A025915 A081285 * A341685 A069844 A233006
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Feb 21 2015
EXTENSIONS
More terms from Antti Karttunen, Sep 22 2017
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 26 05:19 EDT 2024. Contains 371989 sequences. (Running on oeis4.)