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.

A213879 Positive palindromes that are not the sum of two positive palindromes.

Original entry on oeis.org

1, 111, 131, 141, 151, 161, 171, 181, 191, 1331, 1441, 1551, 1661, 1771, 1881, 1991, 10301, 10401, 10501, 10601, 10701, 10801, 10901, 11111, 11211, 11311, 11411, 11511, 11611, 11711, 11811, 11911, 12021, 12121, 12321, 12421, 12521, 12621, 12721, 12821
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jun 23 2012

Keywords

Comments

These numbers do not occur in A035137.

Examples

			22 is not a member because 22 = 11 + 11.
		

Crossrefs

Programs

  • Maple
    # From N. J. A. Sloane, Sep 09 2015: bP is a list of the palindromes
    a:={}; M:=400; for n from 3 to M do p:=bP[n];
    # is p a sum of two palindromes?
    sw:=-1; for i from 2 to n-1 do j:=p-bP[i]; if digrev(j)=j then sw:=1; break; fi;
    od;
    if sw<0 then a:={op(a),p}; fi; od:
    b:=sort(convert(a,list));
  • Mathematica
    lst1 = {}; lst2 = {}; r = 12821; Do[If[FromDigits@Reverse@IntegerDigits[n] == n, AppendTo[lst1, n]], {n, r}]; l = Length[lst1]; Do[s = lst1[[i]] + lst1[[j]]; AppendTo[lst2, s], {i, l - 1}, {j, i}]; Complement[lst1, lst2]
    palQ[n_] := Reverse[x = IntegerDigits[n]] == x; t1 = Select[Range[12900], palQ[#] &]; Complement[t1, Union[Flatten[Table[i + j, {i, t1}, {j, t1}]]]] (* Jayanta Basu, Jun 15 2013 *)

Formula

({ A002113 } intersect { A319477 }) minus { 0 }. - Alois P. Heinz, Sep 19 2018