login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376270
a(n) is the product of the leading digit of n and the sum of the squares of its digits.
9
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,3
LINKS
N. Bradley Fox et al., Elated Numbers, arXiv:2409.09863 [math.NT], 2024.
FORMULA
a(n) = A000030(n)*A003132(n).
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 *)
PROG
(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
CROSSREFS
b-elated function: A000120 (2), A376270 (10).
Sequence in context: A254521 A351985 A352172 * A055012 A069939 A118880
KEYWORD
nonn,look,base
AUTHOR
Michel Marcus, Sep 18 2024
STATUS
approved