login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277097 a(n) = 5 - (prime(n) mod 10). 0
3, 2, 0, -2, 4, 2, -2, -4, 2, -4, 4, -2, 4, 2, -2, 2, -4, 4, -2, 4, 2, -4, 2, -4, -2, 4, 2, -2, -4, 2, -2, 4, -2, -4, -4, 4, -2, 2, -2, 2, -4, 4, 4, 2, -2, -4, 4, 2, -2, -4, 2, -4, 4, 4, -2, 2, -4, 4, -2, 4, 2, 2, -2, 4, 2, -2, 4, -2, -2, -4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Except for a(1)=3 and a(3)=5 the entries are either {-4, -2, 2, 4} and occur in roughly equal ratios. - Robert G. Wilson v, Nov 04 2016
LINKS
FORMULA
a(n) = 5 - A007652(n). - Robert G. Wilson v, Nov 04 2016
EXAMPLE
For n = 10 and prime(10) = 29, so a(10) = 5 - 9 = -4.
MATHEMATICA
f[n_] := 5 - Mod[Prime[n], 10]; Array[f, 71] (* Robert G. Wilson v, Nov 04 2016 *)
PROG
(PARI) a(n) = my(p=prime(n)); (10*(p\10)+5) - p; \\ Michel Marcus, Sep 30 2016
CROSSREFS
Sequence in context: A129576 A122861 A326045 * A077814 A131728 A075115
KEYWORD
sign,easy
AUTHOR
Dimitris Valianatos, Sep 29 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)