|
| |
|
|
A010052
|
|
Characteristic function of squares: 1 if n is a square else 0.
|
|
68
| |
|
|
1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,1
|
|
|
COMMENTS
| a(n) = A000005(n) mod 2, n>=1. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 19 2001
G.f. A(x) satisfies 0=f(A(x),A(x^2),A(x^4)) where f(u,v,w)=(u-w)^2-(v-w)(v+w-1) - Michael Somos, Jul 19 2004
Contribution from Eric Desbiaux (moongerms(AT)wanadoo.fr), Mar 15 2009: (Start)
=Decimal expansion of Sum(n=1...inf), 1/(2^n)^((i^4)*n) * 1/(5^n)^((i^4)*n)
= (1/(2^n)*1/(5^n))^(i^4*n) = (1/(10^n))^(i^4*n) =(1/(10^n))^n (End)
Also parity of the divisor function A000005 if n >= 1. - Omar E. Pol, Jan 14 2012
|
|
|
REFERENCES
| J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, pp. 3-4.
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, Problem 20.
|
|
|
LINKS
| Y. Puri and T. Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
Eric Weisstein's World of Mathematics, Jacobi Theta Functions
Index entries for characteristic functions
|
|
|
FORMULA
| a(n) = [sqrt(n)] - [sqrt(n-1)] (n>0).
Dirichlet generating function: zeta(2s). - Franklin T. Adams-Watters, Sep 11 2005.
G.f. (theta_3(0,x) + 1)/2, where theta_3 is a Jacobi theta function. - Frank Adams-Watters (FrankTAW(AT)Netscape.net), Jun 19 2006
a(n) = f(n,0) with f(x,y) = if x>0 then f(x-2*y-1,y+1) else 0^(-x). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Sep 26 2008]
For n>=1 a(n)=sumdiv(n,d,(-1)^bigomega(d)) [From Benoit Cloitre (benoit7848c(AT)orange.fr), Oct 25 2009]
a(n) <= A093709(n). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Nov 14 2009]
a(A000290(n)) = 1; a(A000037(n)) = 0. - Reinhard Zumkeller, Jun 20 2011
a(n) = 0 ^ A053186(n). [Reinhard Zumkeller, Feb 12 2012]
|
|
|
MAPLE
| readlib(issqr): f := i->if issqr(i) then 1 else 0; fi; [ seq(f(i), i=0..100) ];
|
|
|
MATHEMATICA
| lst = {}; Do[AppendTo[lst, 2*Sum[Floor[n/k] - Floor[(n - 1)/k], {k, Floor[Sqrt[n]]}] - DivisorSigma[0, n]], {n, 93}]; Prepend[lst, 1] (* Eric Desbiaux, Jan 29 2012 *)
|
|
|
PROG
| (PARI) a(n)=issquare(n)
(PARI) a(n)=if(n<1, 1, sumdiv(n, d, (-1)^bigomega(d))) [From Benoit Cloitre (benoit7848c(AT)orange.fr), Oct 25 2009]
(Haskell)
a010052 n = fromEnum $ a000196 n ^ 2 == n
-- Reinhard Zumkeller, Jan 26 2012, Feb 20 2011
|
|
|
CROSSREFS
| Cf. A008836.
Sequence in context: A127692 A014305 A023533 * A039985 A127239 A129186
Adjacent sequences: A010049 A010050 A010051 * A010053 A010054 A010055
|
|
|
KEYWORD
| nonn,nice,easy,mult,changed
|
|
|
AUTHOR
| N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
EXTENSIONS
| More terms from Frank Adams-Watters (FrankTAW(AT)Netscape.net), Jun 19 2006
|
| |
|
|