login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080339 Characteristic function of {1} union {primes}: 1 if n is 1 or a prime, else 0. 6
1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

Partial sums of a(n) in A036234. [From Jaroslav Krizek (jaroslav.krizek(AT)atlas.cz), Mar 23 2009]

LINKS

Index entries for characteristic functions

Eric Weisstein's World of Mathematics, Prime Formulas

FORMULA

a(n)=Sum_digits{binomial(n! mod (n+1),n)}, with n>=0 - Paolo P. Lava (paoloplava(AT)gmail.com), Apr 24 2007

MAPLE

P:=proc(n) local i, k, w; for i from 0 by 1 to n do w:=0; k:=binomial(i! mod (i+1), i); while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; print(w); od; end: P(1000); - Paolo P. Lava (paoloplava(AT)gmail.com), Apr 24 2007

MATHEMATICA

Table[Which[n==1, 1, PrimeQ[n], 1, True, 0], {n, 110}] (* From Harvey P. Dale, Oct 03 2011 *)

CROSSREFS

Cf. A010051, A080355.

Cf. A036234. [From Jaroslav Krizek (jaroslav.krizek(AT)atlas.cz), Mar 23 2009]

Sequence in context: A082416 A093996 A083187 * A167752 A100923 A050073

Adjacent sequences:  A080336 A080337 A080338 * A080340 A080341 A080342

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Mar 21 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 21:13 EST 2012. Contains 206085 sequences.