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.

Showing 1-1 of 1 results.

A261928 a(n) is the number of different pairs (x*y,x+y) mod n.

Original entry on oeis.org

1, 3, 6, 8, 15, 18, 28, 28, 36, 45, 66, 48, 91, 84, 90, 96, 153, 108, 190, 120, 168, 198, 276, 168, 275, 273, 297, 224, 435, 270, 496, 368, 396, 459, 420, 288, 703, 570, 546, 420, 861, 504, 946, 528, 540, 828, 1128, 576, 1078, 825, 918, 728, 1431, 891, 990, 784, 1140, 1305, 1770, 720, 1891, 1488, 1008, 1408, 1365, 1188, 2278
Offset: 1

Views

Author

Thomas Kerscher, Sep 06 2015

Keywords

Examples

			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.
		

Crossrefs

Cf. A261929 (number of other pairs).

Programs

  • 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

Formula

a(n) = n^2 - A261929(n).

Extensions

Keyword:mult added by Andrew Howroyd, Aug 01 2018
Showing 1-1 of 1 results.