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.

A280720 For p = prime(n), number of iterations of the function f(x) = 5x + 2 that leave p prime.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Felix Fröhlich, Jan 07 2017

Keywords

Comments

Records are a(1) = 0 [p = 2], a(2) = 1 [p = 3], a(6) = 2 [p = 13], a(8) = 3 [p = 19], a(74) = 4 [p = 373], a(12656) = 6 [p = 135859], a(1165346) = 7 [p = 18235423], a(1659004) = 8 [p = 26588257], a(5386789) = 9 [p = 93112729], .... - Charles R Greathouse IV, Jan 12 2017

Crossrefs

Programs

  • Mathematica
    Table[Length@ NestWhileList[5 # + 2 &, Prime@ n, PrimeQ] - 2, {n, 120}] (* Michael De Vlieger, Jan 09 2017 *)
  • PARI
    a016873(n) = 5*n+2
    a(n) = my(p=prime(n), i=0); while(1, if(!ispseudoprime(a016873(p)), return(i), p=a016873(p); i++))