cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A267540 Primes p such that p (mod 3) = p (mod 5).

Original entry on oeis.org

2, 17, 31, 47, 61, 107, 137, 151, 167, 181, 197, 211, 227, 241, 257, 271, 317, 331, 347, 421, 467, 541, 557, 571, 587, 601, 617, 631, 647, 661, 677, 691, 751, 797, 811, 827, 857, 887, 947, 977, 991, 1021, 1051, 1097, 1171, 1187, 1201, 1217, 1231, 1277, 1291
Offset: 1

Views

Author

Mikk Heidemaa, Jan 16 2016

Keywords

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

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | p mod 3 eq p mod 5]; // Vincenzo Librandi, Jan 17 2016
    
  • 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 &]
  • PARI
    lista(nn) = forprime(p=2, nn, if(p%3 == p%5, print1(p, ", "))); \\ Altug Alkan, Jan 17 2016

Formula

a(n) = 1/2*((-1)^n*(3*(-1)^n*(10n+81)-1)) with (1
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).

Extensions

More terms from Vincenzo Librandi, Jan 17 2016

A267781 Expansion of (x*(-14x^6 - 32x^5 + 16x^4 + 30x^3 - x + 14) + 17)/((x-1)^2*(x+1)).

Original entry on oeis.org

17, 31, 47, 61, 107, 137, 151, 167, 181, 197, 211, 227, 241, 257, 271, 287, 301, 317, 331, 347, 361, 377, 391, 407, 421, 437, 451, 467, 481, 497, 511, 527, 541, 557, 571, 587, 601, 617, 631, 647, 661, 677, 691, 707, 721, 737, 751, 767, 781, 797, 811, 827, 841, 857, 871, 887, 901, 917, 931, 947, 961, 977, 991, 1007
Offset: 1

Author

Mikk Heidemaa, Jan 20 2016

Keywords

Comments

The terms which are primes are the same (p mod 3 = p mod 5) as in A267540 (starting from a(2)=17, their correspondence is verified up to 150000047).
Primes here frequently also have regular intervals and occur mostly in short blocks (consisting of 2-4 primes) rather than singletons, but some blocks can be much longer (e.g., a(1)..a(15) and a(33)..a(43)).

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[(x*(-14x^6 - 32x^5 + 16x^4 + 30x^3 - x + 14) + 17)/((x - 1)^2*(x + 1)), {x, 0, 63}], x] (* Michael De Vlieger, Jan 21 2016 *)(* Or *)
    Flatten @Prepend[ Table[(30*n - (-1)^n + 123)/2, {n, 5, 1000}],{17,31,47,61,107}](* Efficient. Mikk Heidemaa, Jan 21 2016 *)
  • PARI
    Vec((x*(-14*x^6-32*x^5+16*x^4+30*x^3-x+14)+17)/((x-1)^2*(x+1)) + O(x^80)) \\ Michel Marcus, Jan 20 2016

Formula

a(n) = (30*n - (-1)^n + 123)/2 for n > 4. - Colin Barker, Jan 21 2016
Showing 1-2 of 2 results.