1234567891011121314151617181920212223242526272829303132 |
- #!/usr/bin/ruby
- # a(n) is the index of the smallest Fibonacci n-step number with exactly n prime factors (counted with multiplicity).
- # https://oeis.org/A359881
- # Known terms:
- # 8, 9, 10, 12, 17, 18, 29, 24, 38, 30, 45, 39, 41, 45, 61, 50, 67, 73, 77, 82, 62, 60
- # New terms (a(24)-a(64)):
- # 8, 9, 10, 12, 17, 18, 29, 24, 38, 30, 45, 39, 41, 45, 61, 50, 67, 73, 77, 82, 62, 60, 71, 70, 127, 161, 112, 111, 86, 154, 91, 127, 99, 100, 141, 109, 109, 115, 159, 122, 122, 125, 131, 133, 134, 329, 138, 147, 196, 407, 150, 256, 320, 165, 163, 223, 170, 173, 174, 179, 243, 184, 317
- include("../../../factordb/auto.sf")
- func a(n, from=1) {
- for k in (from..Inf) {
- var t = fib(k,n)
- say "[#{n},#{k}] Checking: #{t}"
- #if (try { bigomega(t) == n } catch { t.is_almost_prime(n) }) {
- if (t.is_almost_prime(n)) {
- return k
- }
- }
- }
- #say a(50)
- say a(64)
- #~ for n in (2..100) {
- #~ say "a(#{n}) = #{a(n)}"
- #~ }
|