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.

A284150 Sum_{d|n, d==1 or 4 mod 5} d.

Original entry on oeis.org

1, 1, 1, 5, 1, 7, 1, 5, 10, 1, 12, 11, 1, 15, 1, 21, 1, 16, 20, 5, 22, 12, 1, 35, 1, 27, 10, 19, 30, 7, 32, 21, 12, 35, 1, 56, 1, 20, 40, 5, 42, 42, 1, 60, 10, 47, 1, 51, 50, 1, 52, 31, 1, 70, 12, 75, 20, 30, 60, 11, 62, 32, 31, 85, 1, 84, 1, 39, 70, 15, 72, 80, 1
Offset: 1

Views

Author

Seiichi Manyama, Mar 21 2017

Keywords

Crossrefs

Cf. Sum_{d|n, d==1 or k-1 mod k} d: A046913 (k=3), A000593 (k=4), this sequence (k=5), A186099 (k=6), A284151 (k=7).

Programs

  • Maple
    A284150 := proc(n)
        a := 0 ;
        for d in numtheory[divisors](n) do
            if modp(d,5) in {1,4} then
                a := a+d ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 21 2017
  • Mathematica
    Table[Sum[If[Mod[d, 5] == 1 || Mod[d,5]==4, d, 0], {d, Divisors[n]}], {n, 80}] (* Indranil Ghosh, Mar 21 2017 *)
  • PARI
    for(n=1, 80, print1(sumdiv(n, d, if(d%5==1 || d%5 ==4, d, 0)), ", ")) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    from sympy import divisors
    def a(n): return sum([d for d in divisors(n) if d%5==1 or d%5 == 4]) # Indranil Ghosh, Mar 21 2017

Formula

a(n) = A284097(n) + A284103(n). - Seiichi Manyama, Mar 24 2017