OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = n^2 - A261929(n).
EXAMPLE
a(2) = 3 because there exist only the pairs (0,0), (0,1) and (1,0) as results from (x*y,x+y) mod n. There are no x,y with (x*y,x+y)=(1,1) mod 2.
PROG
(PARI) a(n)={my(v=vector(n)); for(i=1, n, for(j=1, n, v[j]=bitor(v[j], 1<<(i*(j-i)%n)))); sum(j=1, n, hammingweight(v[j]))} \\ Andrew Howroyd, Aug 01 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Thomas Kerscher, Sep 06 2015
EXTENSIONS
Keyword:mult added by Andrew Howroyd, Aug 01 2018
STATUS
approved