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”).

A261469
a(n) = prime(n+3) mod prime(n).
1
1, 2, 3, 3, 8, 10, 12, 12, 14, 12, 12, 10, 12, 16, 14, 14, 12, 12, 12, 12, 16, 18, 18, 14, 10, 8, 10, 20, 22, 24, 12, 18, 14, 18, 14, 16, 16, 16, 14, 18, 14, 16, 8, 18, 26, 28, 18, 10, 12, 12, 18, 18, 22, 18, 14, 14, 12, 12, 16, 26, 28, 20, 10, 20, 24, 30, 18, 16, 12
OFFSET
1,2
LINKS
FORMULA
a(n) = prime(n+3) mod prime(n).
EXAMPLE
a(3) = 13 mod 5 = 3.
MATHEMATICA
a[n_]:=PowerMod[Prime[n + 3], 1, Prime[n]]; Table[a[n], {n, 80}] (* Vincenzo Librandi, Aug 20 2015 *)
Mod[Last[#], First[#]]&/@Partition[Prime[Range[80]], 4, 1] (* Harvey P. Dale, Jun 23 2017 *)
PROG
(PARI) first(m)=vector(m, i, prime(i+3)%prime(i)) \\ Anders Hellström, Aug 20 2015
(Magma) [NthPrime(n+3) mod NthPrime(n): n in [1.. 70]]; // Vincenzo Librandi, Aug 20 2015
CROSSREFS
Cf. A031165.
Sequence in context: A258163 A108381 A238761 * A292498 A108692 A157126
KEYWORD
nonn,easy,less
AUTHOR
Altug Alkan, Aug 20 2015
STATUS
approved