OFFSET
1,2
COMMENTS
All odd-indexed (2n+1) terms are divisible by (2n+1). See A051847.
All even-indexed (2n) terms are divisible by n. - Alexander R. Povolotsky, Oct 20 2022
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..200
Chai Wah Wu, Pandigital and penholodigital numbers, arXiv:2403.20304 [math.GM], 2024. See p. 1.
FORMULA
a(n) = Sum_{i=1..n} i*(n+1)^(i-1).
a(n) = ((n+1)^(n+1)*(n-1) + 1)/n^2 = A062806(n+1)/(n+1) - (n+1)^(n+1). - Benoit Cloitre, Sep 28 2002
a(n) = (n-1) * A058128(n+1) + 1. - Seiichi Manyama, Apr 10 2022
EXAMPLE
a(1) = 1,
a(2) = 2*3 + 1 = 7,
a(3) = 3*(4^2) + 2*4 + 1 = 57,
a(4) = 4*(5^3) + 3*(5^2) + 2*5 + 1 = 586.
MAPLE
a(n) := proc(n) local i; add(i*((n+1)^(i-1)), i=1..n); end;
MATHEMATICA
Array[Sum[i*(# + 1)^(i - 1), {i, #}] &, 18] (* Michael De Vlieger, Apr 04 2024 *)
PROG
(PARI) a(n)=((n+1)^(n+1)*(n-1)+1)/n^2
(Maxima) makelist(((n+1)^(n+1)*(n-1) + 1)/n^2, n, 1, 20); /* Martin Ettl, Jan 25 2013 */
(Python)
def a(n): return sum((i+1)*(n+1)**i for i in range(n))
print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 10 2022
CROSSREFS
KEYWORD
easy,base,nonn
AUTHOR
Antti Karttunen, Dec 13 1999
EXTENSIONS
Minor edits in formulas by M. F. Hasler, Oct 11 2019
STATUS
approved