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.

A376270 a(n) is the product of the leading digit of n and the sum of the squares of its digits.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 8, 10, 16, 26, 40, 58, 80, 106, 136, 170, 27, 30, 39, 54, 75, 102, 135, 174, 219, 270, 64, 68, 80, 100, 128, 164, 208, 260, 320, 388, 125, 130, 145, 170, 205, 250, 305, 370, 445, 530, 216, 222, 240, 270, 312, 366
Offset: 0

Views

Author

Michel Marcus, Sep 18 2024

Keywords

Crossrefs

b-elated function: A000120 (2), A376270 (10).

Programs

  • Maple
    a:= n-> (l-> l[-1]*add(i^2, i=l))(convert(n, base, 10)):
    seq(a(n), n=0..65);  # Alois P. Heinz, Sep 18 2024
  • Mathematica
    a[n_]:=First[d=IntegerDigits[n]]Norm[d]^2; Array[a,66,0] (* Stefano Spezia, Sep 18 2024 *)
  • PARI
    a(n) = if (n, my(d=digits(n)); d[1]*norml2(d), 0);
    
  • Python
    def a(n): return (d:=list(map(int, str(n))))[0] * sum(di*di for di in d)
    print([a(n) for n in range(66)]) # Michael S. Branicky, Sep 18 2024

Formula

a(n) = A000030(n)*A003132(n).