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.

A316707 For any n >= 0 with base-5 expansion Sum_{k=0..w} d_k * 5^k, let f(n) = Sum_{k=0..w} [d_k > 0] * (2 + i)^k * i^(d_k - 1) (where [] is an Iverson bracket and i denotes the imaginary unit); a(n) equals the square of the modulus of f(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 10, 8, 2, 4, 5, 4, 10, 8, 2, 5, 2, 4, 10, 8, 5, 8, 2, 4, 10, 25, 32, 34, 20, 18, 50, 61, 61, 41, 41, 40, 45, 53, 37, 29, 10, 13, 17, 9, 5, 20, 29, 25, 13, 17, 25, 18, 32, 34, 20, 20, 17, 29, 25, 13, 50, 41, 61, 61, 41, 40, 29, 45, 53, 37, 10
Offset: 0

Views

Author

Rémy Sigrist, Jul 11 2018

Keywords

Comments

See A316657 for the real part of f and additional comments.

Crossrefs

Programs

  • PARI
    a(n) = my (d=Vecrev(digits(n, 5)), z=sum(i=1, #d, if (d[i], (2+I)^(i-1) * I^(d[i]-1), 0))); real(z)^2 + imag(z)^2

Formula

a(n) = A316657(n)^2 + A316658(n)^2.
a(5 * n) = 5 * a(n) for any n >= 0.
a(5^k) = 5^k for any k >= 0.