prog.sf 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/ruby
  2. # Numbers n such that 2^n + 3^n is a semiprime.
  3. # https://oeis.org/A050244
  4. # a(34) > 23194.
  5. for k in (23194..1e6) {
  6. say "Testing: #{k}"
  7. if (is_semiprime(3**k + 2**k)) {
  8. die "Found: #{k}"
  9. }
  10. }
  11. # Numbers m such that 4^m - m is a semiprime.
  12. # https://oeis.org/A252657
  13. # Next term >= 483 -- http://factordb.com/index.php?id=1100000000251223208
  14. # Numbers m such that 10^m - m is a semiprime.
  15. # https://oeis.org/A252663
  16. # 107, 117, 143, 149, 177,
  17. # Numbers m such that m*10^m + 1 is a semiprime.
  18. # https://oeis.org/A216378
  19. # 111, 117, 123, 181, 184, 187,
  20. # Numbers k such that 1 + (product of first k primes) is a semiprime.
  21. # https://oeis.org/A085725
  22. # 76,
  23. # Numbers n such that 3^n-2 is a semiprime.
  24. # https://oeis.org/A080892
  25. # Next term >= 658 -- http://factordb.com/index.php?id=1000000000018245962
  26. # Numbers n such that Pell(n) is a semiprime.
  27. # https://oeis.org/A250292
  28. # Next term >= 709 -- http://factordb.com/index.php?id=1100000000707746051