lucas_floor.sf 698 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/ruby
  2. # https://oeis.org/draft/A307736
  3. # Integers k such that ceiling(Lucas(k)/log(k)) is prime.
  4. # 12286, 14334
  5. # https://oeis.org/draft/A307737
  6. # Integers k such that ceiling(Fibonacci(k)/log(k)) is prime.
  7. # 5762, 8430, 8814,
  8. # https://oeis.org/draft/A307729
  9. # Integers k such that floor(Fibonacci(k)/log(k)) is prime.
  10. # https://oeis.org/draft/A307728
  11. # Integers k such that floor(Lucas(k) / log(k)) is prime.
  12. func f(n) {
  13. var l = lucas(n)
  14. local Num!PREC = 4*(l.len+10)
  15. floor(l / log(n)).int
  16. }
  17. STDOUT.autoflush(1)
  18. for k in (44626..1e6) {
  19. say "Testing: #{k}"
  20. if (f(k).is_prob_prime) {
  21. say "Found: #{k}"
  22. die "new term: #{k}" if (k > 18699)
  23. }
  24. }