Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A108154
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A108154 a(n) = n^2 - n + 1 if prime else 0. +0
1
0, 3, 7, 13, 0, 31, 43, 0, 73, 0, 0, 0, 157, 0, 211, 241, 0, 307, 0, 0, 421, 463, 0, 0, 601, 0, 0, 757, 0, 0, 0, 0, 0, 1123, 0, 0, 0, 0, 1483, 0, 0, 1723, 0, 0, 0, 0, 0, 0, 0, 0, 2551, 0, 0, 0, 2971, 0, 0, 3307, 0, 3541, 0, 0, 3907, 0, 0, 0, 4423, 0, 0, 4831, 0, 5113, 0, 0, 0, 5701, 0 (list; graph; listen)
OFFSET

1,2

EXAMPLE

1^2-1+1=1 not prime so a(1)=0

2^2-2+1=3 prime so a(2)=3

3^3-3+1=7 prime so a(3)=7

MATHEMATICA

f[n_] := Block[{p = n^2 - n + 1}, If[ PrimeQ[p], p, 0]]; Table[ f[n], {n, 77}] (from Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 07 2005)

CROSSREFS

Cf. A002383, A002384.

Sequence in context: A167490 A081533 A096856 this_sequence A010260 A128156 A108768

Adjacent sequences: A108151 A108152 A108153 this_sequence A108155 A108156 A108157

KEYWORD

easy,nonn

AUTHOR

Pierre CAMI (pierrecami(AT)tele2.fr), Jun 06 2005

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 07 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 23 10:40 EST 2009. Contains 167421 sequences.


AT&T Labs Research