search.pl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/perl
  2. # Numbers that are not powers of primes (A024619) whose harmonic mean of their proper unitary divisors is an integer.
  3. # https://oeis.org/A335270
  4. # Known terms:
  5. # 228, 1645, 7725, 88473, 20295895122, 22550994580
  6. # Conjecture: all terms have the form n*(usigma(n)-1) where usigma(n)-1 is prime.
  7. # The conjecture was inspired by the similar conjecture of Chai Wah Wu from A247077.
  8. use 5.014;
  9. use strict;
  10. #use integer;
  11. use ntheory qw(:all);
  12. sub usigma {
  13. vecprod(map { powint($_->[0], $_->[1]) + 1 } factor_exp($_[0]));
  14. }
  15. my $count = 0;
  16. foreach my $k (2 .. 1e9) {
  17. my $p = usigma($k) - 1;
  18. is_prime($p) || next;
  19. my $m = mulint($k, $p);
  20. next if ($k == $p);
  21. my $o = prime_omega($k) + 1;
  22. if (++$count >= 1e5) {
  23. say "Testing: $k -> $m";
  24. $count = 0;
  25. }
  26. if (modint(mulint($m, ((1 << $o) - 1)), mulint(usigma($k), $p+1) - 1) == 0) {
  27. say "\tFound: $k -> $m";
  28. die "New term: $k -> $m\n" if ($m > 22550994580);
  29. }
  30. }
  31. __END__
  32. Found: 12 -> 228
  33. Found: 35 -> 1645
  34. Found: 75 -> 7725
  35. Found: 231 -> 88473
  36. Found: 108558 -> 20295895122
  37. Found: 120620 -> 22550994580