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”).

A083441
Largest n-digit palindrome with a digit sum of n.
4
1, 11, 111, 2002, 20102, 300003, 3001003, 40000004, 400010004, 5000000005, 50000100005, 600000000006, 6000001000006, 70000000000007, 700000010000007, 8000000000000008, 80000000100000008, 900000000000000009, 9000000001000000009, 91000000000000000019, 910000000010000000019
OFFSET
1,2
LINKS
PROG
(PARI) a(n)=my(h=n\2, w=h\9+1, q=10^w-10+h%9); if(n%2, 10^h) + q*10^(n-w) + fromdigits(Vecrev(digits(q))) \\ Andrew Howroyd, Dec 10 2024
CROSSREFS
Cf. A083440.
Sequence in context: A199764 A097177 A136982 * A261269 A031974 A117293
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 01 2003
EXTENSIONS
a(19) onwards from Andrew Howroyd, Dec 10 2024
STATUS
approved