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.

A243017 Least number k > 0 such that k*n/(k+n) and k*n/(k-n) are integers or 0 if no such k exists.

Original entry on oeis.org

0, 0, 6, 12, 0, 3, 0, 24, 18, 15, 0, 4, 0, 0, 10, 48, 0, 9, 0, 30, 28, 0, 0, 8, 0, 0, 54, 21, 0, 15, 0, 96, 66, 0, 210, 12, 0, 0, 78, 24, 0, 21, 0, 132, 30, 0, 0, 16, 0, 75, 102, 156, 0, 27, 66, 42, 114, 0, 0, 12, 0, 0, 84, 192, 0, 33, 0, 204, 138, 105, 0, 24, 0, 0, 50, 228
Offset: 1

Views

Author

Derek Orr, May 29 2014

Keywords

Examples

			3*6/(6+3) = 2 and 3*6/(6-3) = 9 are both integers. Thus a(3) = 6.
		

Crossrefs

Cf. A243045, A243046, A243047 (positions of 0's), A360120 (their characteristic function).

Programs

  • PARI
    a(n)=for(k=1,n*(n+1),if(k!=n,if((k*n)%(k+n)==0&&(k*n)%(k-n)==0,return(k))))
    n=1;while(n<100,print1(a(n),", ");n+=1)