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.

A342809 Numbers k such that k-1 and round(k/5) are both prime.

Original entry on oeis.org

8, 12, 14, 24, 54, 84, 114, 234, 264, 294, 354, 444, 504, 564, 654, 684, 744, 864, 954, 984, 1164, 1194, 1284, 1554, 1584, 1734, 1914, 2004, 2154, 2214, 2244, 2334, 2394, 2544, 2844, 2964, 3084, 3204, 3414, 3594
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 22 2021

Keywords

Comments

Except for a(1) and a(2), all terms == 4 (mod 10).
The first three absolute differences (d) between two consecutive rounded (k/5) are respectively equal to 0, 1 and 2 and all the others to 6 or a multiple of 6.
Subsequence of A008864, by definition. - Michel Marcus, Mar 22 2021
For n >= 3, a(n) = 5*A158318(n-2) - 1. - Hugo Pfoertner, Mar 22 2021

Examples

			8 is a term because 8 - 1 = 7 and 7 is prime and 8/5 = 1.6 which when rounded gives 2 and 2 is also prime.
235 is not a term because 235 - 1 = 234 and 234 is not a prime although 235/5 = 47 is prime.
Initial terms, associated primes and d:
         k     k - 1   round(k/5)    d
a(1)     8       7         2
a(2)    12      11         2         0
a(3)    14      13         3         1
a(4)    24      23         5         2
a(5)    54      53        11         6
a(6)    84      83        17         6
a(7)   114     113        23         6
a(8)   234     233        47        24
a(9)   264     263        53         6
a(10)  294     293        59         6
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2,5000,2],And@@PrimeQ[{#-1,Round[#/5]}]&] (* Giorgos Kalogeropoulos, Apr 01 2021 *)
  • PARI
    for(k = 1,10000,if(isprime(k - 1) && isprime(k\/5),print1(k", ")))
    
  • Python
    from sympy import isprime
    A342809_list = [k for k in range(1,10**5) if isprime(k-1) and isprime(k//5+int(k % 5 > 2))] # Chai Wah Wu, Apr 08 2021