OFFSET
1,2
FORMULA
For formulas see A082267.
EXAMPLE
In the following array the n-th row contains all the palindromes that use digits > 0 and have a digit sum of n.
1
2 11
3 111
4 22 121 1111
5 131 212 11111
6 33 141 222 1221 2112 111111
...
The sequence contains the array read by rows.
MAPLE
isPali := proc(perm) local i ; for i from 1 to nops(perm)/2 do if op(i, perm) <> op(-i, perm) then RETURN(false) ; fi ; od ; RETURN(true) ; end: isSingDig := proc(perm) local i ; for i from 1 to nops(perm) do if op(i, perm)>9 then RETURN(false) ; fi ; od ; RETURN(true) ; end: A082266 := proc(n) local arow, npart, pindx, part, perm, i, cand, j, pali ; arow := [] ; npart := combinat[partition](n) ; for pindx from 1 to nops(npart) do part := op(pindx, npart) ; perm := combinat[permute](part) ; for i from 1 to nops(perm) do cand := op(i, perm) ; if isSingDig(cand) and isPali(cand) then pali := add( op(j, cand)*10^(j-1), j=1..nops(cand) ) ; arow := [op(arow), pali] ; fi ; od ; od ; RETURN(sort(arow)) ; end: for n from 1 to 10 do arow := A082266(n) : for i from 1 to nops(arow) do printf("%d, ", op(i, arow)) ; od : od : # R. J. Mathar, Mar 07 2007
CROSSREFS
KEYWORD
base,nonn,tabf
AUTHOR
Amarnath Murthy, Apr 12 2003
EXTENSIONS
Corrected and extended by R. J. Mathar, Mar 07 2007
STATUS
approved