login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A141030
a(n)=If[Prime[n + 1]^2 - Prime[n]*Prime[n + 2] > 0, If[Mod[Prime[n]*Sqrt[5], 1] >= 0.5, 0, 1], If[Mod[Prime[n]*Sqrt[7], 1] >= 0.5, 2, 3]].
0
3, 0, 3, 0, 3, 1, 2, 3, 1, 2, 1, 0, 3, 2, 1, 0, 3, 1, 0, 2, 1, 3, 2, 1, 0, 3, 1, 3, 3, 0, 3, 0, 3, 0, 3, 0, 1, 3, 1, 0, 2, 0, 3, 0, 3, 0, 0, 0, 2, 2, 1, 3, 0, 1, 0, 1, 2, 0, 1, 3, 2, 1, 1, 2, 3, 0, 2, 0, 3, 3, 2, 0, 0, 1, 2, 3, 0, 3, 2, 0, 2, 1, 3, 1, 3, 3, 0, 0, 2, 2, 1, 1, 3, 0, 3, 2, 1, 3, 1, 3
OFFSET
1,1
MATHEMATICA
f[n_] = If[Prime[n + 1]^2 - Prime[n]*Prime[n + 2] > 0, If[Mod[Prime[n]*Sqrt[5], 1] >= 0.5, 0, 1], If[Mod[Prime[n]*Sqrt[7], 1] >= 0.5, 2, 3]];
Table[f[n], {n, 1, 100}]
CROSSREFS
Sequence in context: A053387 A221170 A307199 * A221168 A194084 A262281
KEYWORD
nonn,uned,less
AUTHOR
Roger L. Bagula, Jul 30 2008
STATUS
approved