|
|
A359003
|
|
a(n) is the smallest n-gonal number whose sum of digits is n.
|
|
1
|
|
|
3, 4, 5, 6, 7, 8, 9, 370, 506, 156, 238, 671, 726, 88, 836, 585, 775, 7337, 5268, 8149, 8555, 8961, 9367, 9773, 15786, 9856, 91964, 65757, 89428, 179960, 47796, 108979, 197945, 86976, 467974, 998516, 259896, 598792, 1737788, 869649, 969991, 1985984, 998676, 3798496, 7979546, 5877696
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,1
|
|
LINKS
|
|
|
EXAMPLE
|
370 is the smallest 10-gonal number with digit sum 10, so a(10) = 370.
|
|
MATHEMATICA
|
p[n_, k_] := (n - 2)*k*(k - 1)/2 + k; a[n_] := Module[{k = 1, pk}, While[Plus @@ IntegerDigits[pk = p[n, k]] != n, k++]; pk]; Array[a, 45, 3] (* Amiram Eldar, Dec 10 2022 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|