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-3 of 3 results.

A349213 a(n) = Sum_{d|n} n^((d+1) mod 2).

Original entry on oeis.org

1, 3, 2, 9, 2, 14, 2, 25, 3, 22, 2, 50, 2, 30, 4, 65, 2, 57, 2, 82, 4, 46, 2, 146, 3, 54, 4, 114, 2, 124, 2, 161, 4, 70, 4, 219, 2, 78, 4, 242, 2, 172, 2, 178, 6, 94, 2, 386, 3, 153, 4, 210, 2, 220, 4, 338, 4, 118, 2, 484, 2, 126, 6, 385, 4, 268, 2, 274, 4, 284, 2, 651, 2, 150
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 10 2021

Keywords

Comments

For each divisor d of n, add n if d is even, otherwise add 1. For example, the divisors of 6 are 1,2,3,6 which would give a(6) = 1 + 6 + 1 + 6 = 14.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, n^Mod[# + 1, 2] &]; Array[a, 100] (* Wesley Ivan Hurt, Nov 12 2022 *)
  • PARI
    A349213(n) = sumdiv(n,d,n^((1+d)%2)); \\ Antti Karttunen, Nov 10 2021
    
  • Python
    from sympy import divisor_count
    def A349213(n): return (1+n*(m:=(~n&n-1).bit_length()))*divisor_count(n>>m) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = A001227(n) * (1+n*A007814(n)). - Chai Wah Wu, Jul 16 2022

A349211 a(n) = Sum_{d|n} d^((d+1) mod 2).

Original entry on oeis.org

1, 3, 2, 7, 2, 10, 2, 15, 3, 14, 2, 26, 2, 18, 4, 31, 2, 29, 2, 38, 4, 26, 2, 58, 3, 30, 4, 50, 2, 52, 2, 63, 4, 38, 4, 81, 2, 42, 4, 86, 2, 68, 2, 74, 6, 50, 2, 122, 3, 65, 4, 86, 2, 84, 4, 114, 4, 62, 2, 148, 2, 66, 6, 127, 4, 100, 2, 110, 4, 100, 2, 185, 2, 78, 6, 122, 4
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 10 2021

Keywords

Comments

For each divisor d of n, add d if d is even. Otherwise add 1. For example, for n = 6, the divisors of 6 are 1, 2, 3, 6. This gives 1 + 2 + 1 + 6 = 10.
Inverse Möbius transform of n^((n+1) mod 2). - Wesley Ivan Hurt, Mar 31 2025

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, #^Mod[(# + 1), 2] &], {n, 77}] (* Michael De Vlieger, Nov 10 2021 *)
  • PARI
    A349211(n) = sumdiv(n,d,d^((1+d)%2)); \\ Antti Karttunen, Dec 14 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A349211(n):
        f = factorint(n>>(m:=(~n&n-1).bit_length())).items()
        d = prod(e+1 for p,e in f)
        s = prod((p**(e+1)-1)//(p-1) for p, e in f)
        return d+s*((1<<(m+1))-2) # Chai Wah Wu, Jul 16 2022

Formula

a(p) = 2 iff p is an odd prime. - Wesley Ivan Hurt, Nov 28 2021
a(n) = A000005(A000265(n)) + A000203(A000265(n))*A000918(A001511(n)). - Chai Wah Wu, Jul 16 2022

A349212 a(n) = Sum_{d|n} n^(d mod 2).

Original entry on oeis.org

1, 3, 6, 6, 10, 14, 14, 11, 27, 22, 22, 28, 26, 30, 60, 20, 34, 57, 38, 44, 84, 46, 46, 54, 75, 54, 108, 60, 58, 124, 62, 37, 132, 70, 140, 114, 74, 78, 156, 86, 82, 172, 86, 92, 270, 94, 94, 104, 147, 153, 204, 108, 106, 220, 220, 118, 228, 118, 118, 248, 122, 126, 378, 70, 260
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 10 2021

Keywords

Comments

For each divisor d of n, add n if d is odd, otherwise add 1. For example, 6 has 4 divisors 1,2,3,6 which gives a(6) = 6 + 1 + 6 + 1 = 14.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, n^Mod[#, 2] &]; Array[a, 100] (* Wesley Ivan Hurt, Nov 12 2022 *)
  • PARI
    A349212(n) = sumdiv(n,d,n^(d%2)); \\ Antti Karttunen, Nov 10 2021
    
  • Python
    from sympy import divisors
    def a(n): return sum(n**(d%2) for d in divisors(n))
    print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Apr 20 2022
    
  • Python
    from sympy import divisor_count
    def A349212(n): return (n+(m:=(~n&n-1).bit_length()))*divisor_count(n>>m) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = A000005(A001787(n)) = A001227(n) * (n+A007814(n)). [The first formula found by LODA miner] - Antti Karttunen, Apr 20 2022
Showing 1-3 of 3 results.