|
Search: id:A010052
|
|
|
| A010052 |
|
Characteristic function of squares: 1 if n is a square else 0. |
|
+0 28
|
|
| 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; listen)
|
|
|
OFFSET
|
0,1
|
|
|
COMMENT
|
For n >= 1 another formula for a(n) is: a(n) = d(n) mod 2 where d(n) is the number of divisors of n, A000005. - 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)
(End)
=(1/(10^n))^n [From Eric Desbiaux (moongerms(AT)wanadoo.fr), Mar 15 2009]
|
|
REFERENCES
|
J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 4.
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, Problem 20.
|
|
LINKS
|
Index entries for characteristic functions
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
|
|
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]
|
|
MAPLE
|
readlib(issqr): f := i->if issqr(i) then 1 else 0; fi; [ seq(f(i), i=0..100) ];
|
|
PROGRAM
|
(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]
|
|
CROSSREFS
|
Cf. A008836.
Sequence in context: A127692 A014305 A023533 this_sequence A039985 A127239 A129186
Adjacent sequences: A010049 A010050 A010051 this_sequence A010053 A010054 A010055
|
|
KEYWORD
|
nonn,nice,easy,mult
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com).
|
|
EXTENSIONS
|
More terms from Frank Adams-Watters (FrankTAW(AT)Netscape.net), Jun 19 2006
|
|
|
Search completed in 0.003 seconds
|