[go: up one dir, main page]

login
A226534
a(n) = (p(n+1) + p(n) - 1) mod (p(n+1) - p(n) + 1) where p(n) is the n-th prime.
2
0, 1, 2, 2, 2, 4, 2, 1, 2, 2, 4, 2, 2, 4, 1, 6, 2, 1, 2, 2, 4, 1, 3, 5, 2, 2, 4, 2, 1, 14, 2, 1, 2, 1, 2, 6, 4, 4, 3, 1, 2, 8, 2, 4, 2, 6, 4, 4, 2, 1, 2, 2, 7, 3, 1, 6, 2, 1, 2, 2, 3, 14, 2, 2, 4, 2, 2, 1, 2, 1, 4, 5, 4, 2, 1, 1, 2, 2, 8, 2, 2, 4, 2, 3, 1, 2, 5, 2, 2, 4, 9, 2, 2, 8, 1, 3, 2
OFFSET
1,3
LINKS
FORMULA
a(n) = A076273(n+1) mod A076368(n+1).
MATHEMATICA
Table[Mod[Prime[p + 1] + Prime[p] - 1, Prime[p + 1] - Prime[p] + 1], {p, 100}] (* Alonso del Arte, Jan 18 2014 *)
Mod[Total[#]-1, #[[2]]-#[[1]]+1]&/@Partition[Prime[Range[100]], 2, 1] (* Harvey P. Dale, Mar 16 2023 *)
PROG
(PARI) a(n)=lift(Mod(prime(n+1)+prime(n)-1, prime(n+1)-prime(n)+1)) /* Ralf Stephan, Sep 03 2013 */
CROSSREFS
Sequence in context: A327987 A216650 A027387 * A138260 A027389 A337539
KEYWORD
nonn,easy
AUTHOR
STATUS
approved