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.

A359003 a(n) is the smallest n-gonal number whose sum of digits is n.

This page as a plain text file.
%I A359003 #7 Feb 16 2025 08:34:04
%S A359003 3,4,5,6,7,8,9,370,506,156,238,671,726,88,836,585,775,7337,5268,8149,
%T A359003 8555,8961,9367,9773,15786,9856,91964,65757,89428,179960,47796,108979,
%U A359003 197945,86976,467974,998516,259896,598792,1737788,869649,969991,1985984,998676,3798496,7979546,5877696
%N A359003 a(n) is the smallest n-gonal number whose sum of digits is n.
%H A359003 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PolygonalNumber.html">Polygonal Number</a>
%e A359003 370 is the smallest 10-gonal number with digit sum 10, so a(10) = 370.
%t A359003 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 *)
%Y A359003 Cf. A007953, A051885, A062685, A062688, A358930.
%K A359003 nonn,base
%O A359003 3,1
%A A359003 _Ilya Gutkovskiy_, Dec 10 2022