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.

A231122 Numbers k >= 0 such that 2^k is number of ways to write n as n = x*y, where x, y = squarefree numbers, 1 <= x <= n, 1 <= y <= n, or -1 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, -1, 0, 1, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 1, 1, 0, -1, 0, 1, -1, 0, 0, 2, 0, -1, 1, 1, 1, 0, 0, 1, 1, -1, 0, 2, 0, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, -1, 1, -1, 1, 1, 0, 1, 0, 1, 0, -1, 1, 2, 0, 0, 1, 2, 0, -1, 0, 1, 0, 0, 1, 2, 0, -1, -1, 1, 0, 1, 1
Offset: 1

Views

Author

Gerasimov Sergey, Nov 04 2013

Keywords

Examples

			1(1*1), 2(1*2), 3(1*3), 4(2*2), 5(1*5), 6(1*6, 2*3), 7(1*7), 8(-), 9(3*3), 10(1*10, 2*5), 11(1*11), 12(2*6), 13(1*13), 14(1*14, 2*7), 15(1*15, 3*5), 16(-), 17(1*17), 18(3*6), 19(1*19), 20(2*10), 21(1*21, 3*7), 22(1*22, 2*11), 23(1*23), 24(-), 25(5*5), 26(1*26, 2*13), 27(-).
		

Crossrefs

Cf. A046099(k<0), A130091(k<=0), A004709(k>=0), A230843(k=0), (A006881 U A085987 U ...)(k=1).

Programs

  • PARI
    a(n)=if(n==1,return(0)); my(f=factor(n)[,2]); if(vecmax(f)>2, return(-1)); max(sum(i=1,#f,2-f[i])-1, 0) \\ Charles R Greathouse IV, Nov 04 2013

Extensions

a(80) corrected by Charles R Greathouse IV, Nov 04 2013