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.

A280273 Primes p such that 8p^2 - 7p + 2 is also prime.

Original entry on oeis.org

3, 5, 23, 41, 59, 113, 131, 173, 179, 269, 281, 383, 401, 431, 443, 449, 461, 479, 521, 641, 653, 863, 929, 941, 953, 1013, 1103, 1163, 1301, 1319, 1361, 1439, 1481, 1559, 1583, 1871, 2003, 2213, 2309, 2411, 2609, 2693, 2711, 2729, 2801, 2903, 2909, 2969, 3041
Offset: 1

Views

Author

Ely Golden, Dec 30 2016

Keywords

Comments

For any p in this sequence, 2*p*(8p^2 - 7p + 2) has the same nonzero digits as its prime factors in base 2*p-1.
Apart from 3 itself, all members of this sequence are congruent to 2 (mod 3). This is because for any number congruent to 1 (mod 3), the expression (8n^2 - 7n + 2) would be a multiple of 3 and hence not prime.

Programs

  • Mathematica
    Select[Prime@ Range@ 450, PrimeQ[8 #^2 - 7 # + 2] &] (* Michael De Vlieger, Dec 30 2016 *)
  • SageMath
    c=1
    index=1
    while(index<=1000):
        if((is_prime(c))&(is_prime(8*(c**2)-7*c+2))):
            print(str(index)+" "+str(c))
            index+=1
        c+=1
    print("complete")