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.

Showing 1-1 of 1 results.

A349257 Largest integer that can be expressed as Sum_{k=1..n} k/p(k), where p is a permutation of [n].

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 10, 11, 15, 18, 21, 22, 27, 28, 32, 36, 40, 41, 46, 47
Offset: 0

Views

Author

Seiichi Manyama, Nov 12 2021

Keywords

Crossrefs

Programs

  • Ruby
    def A(n)
      max = 0
      (1..n).to_a.permutation{|i|
        m = (1..n).inject(0){|s, j| s + j / i[j - 1].to_r}
        if m.denominator == 1
          max = m if max < m
        end
      }
      max.to_i
    end
    def A349257(n)
      (0..n).map{|i| A(i)}
    end
    p A349257(8)

Formula

a(n) = 1 + a(n-1) if n is prime. - Alois P. Heinz, Nov 12 2021

Extensions

a(12)-a(19) from Alois P. Heinz, Nov 12 2021
Showing 1-1 of 1 results.