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.

A106743 a(n) = -1 iff n is prime, a(n) = 1 iff n is not squarefree, otherwise (n is nonprime and squarefree) a(n) = 0.

Original entry on oeis.org

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

Views

Author

Giovanni Teofilatto, May 16 2005

Keywords

Crossrefs

Cf. A000040 (prime), A013929 (not squarefree), A000469 (nonprime and squarefree), A082926.

Programs

  • Mathematica
    Table[Which[PrimeQ[n],-1,SquareFreeQ[n],0,True,1],{n,110}] (* Harvey P. Dale, Aug 30 2015 *)
  • PARI
    for(n=1,105,print1(if(!issquarefree(n),1,if(isprime(n),-1,0)),","))

Formula

a(n) = 1 - 0^(A001222(n)-A001221(n)) - 0^(A001222(n)-1), for n>1. - Reinhard Zumkeller, May 23 2005

Extensions

Edited and extended by Klaus Brockhaus, May 16 2005
Showing 1-1 of 1 results.