OFFSET
1,1
COMMENTS
Or primes p such that p (mod 15) = {1, 2}.
Terminal digits in a(7)...a(32) alternate 26 times (7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1). 25 differences between the 2 consecutive terms in this range show patterns as well.
A differenceroot function can generate the terms a(7)...a(32).
FORMULA
a(n) = 1/2*((-1)^n*(3*(-1)^n*(10n+81)-1)) with (1<n<10) for a(7)...a(16).
G.f.: (x*(-14x^6-32x^5+16x^4+30x^3-x+14)+17)/((x-1)^2*(x+1)) generates a(2)...a(16), (0<=x<15).
G.f.: (x*(x*(30x*(-2x^4-x^3+x+2)-301)+14)+317)/((x-1)^2*(x+1)) generates a(17)...a(32), (0<=x<16).
MAPLE
select(isprime, [seq(seq(15*i+j, j= 1..2), i=0..10000)]); # Robert Israel, Jan 17 2016
MATHEMATICA
Select[ Prime[ Range[10000]], (Mod[#, 3] == Mod[#, 5]) &] (* Or *)
Select[ Prime[ Range[10000]], 0 < Mod[#, 15] < 3 &]
PROG
(Magma) [p: p in PrimesUpTo(2000) | p mod 3 eq p mod 5]; // Vincenzo Librandi, Jan 17 2016
(PARI) lista(nn) = forprime(p=2, nn, if(p%3 == p%5, print1(p, ", "))); \\ Altug Alkan, Jan 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mikk Heidemaa, Jan 16 2016
EXTENSIONS
More terms from Vincenzo Librandi, Jan 17 2016
STATUS
approved