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.

A244573 Numbers n such that 10*n + d - digsum(10*n + d) is a palindrome for any d in {0,1,2,3,4,5,6,7,8,9}.

Original entry on oeis.org

1, 10, 18, 26, 34, 42, 68, 76, 84, 92, 100, 279, 368, 457, 546, 635, 724, 813, 902, 1000, 1071, 1152, 1233, 1314, 1486, 1567, 1648, 1729, 1981, 2051, 2132, 2213, 2385, 2466, 2547, 2628, 2709, 2880, 2961, 3031, 3112, 3284, 3365, 3446, 3527, 3608, 3699, 3860, 3941, 4011, 4183, 4264
Offset: 1

Views

Author

Derek Orr, Jun 30 2014

Keywords

Examples

			180 - (1+8+0) = 171, a palindrome. By adding {1,2,3,4,5,6,7,8,9} to 180 and subtracting that number's digsum, it will still be 171, a palindrome. Since 180 = 18*10, 18 is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=AnyTrue[Table[10n+d-Total[IntegerDigits[10n+d]],{d,0,9}],PalindromeQ]; Select[Range[4300],palQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 13 2021 *)
  • PARI
    rev(n)={r="";for(i=1,#digits(n),r=concat(Str(digits(n)[i]),r));return(eval(r))}
    for(n=1,10^4,s=sum(i=1,#digits(10*n),digits(10*n)[i]);if(rev(10*n-s)==10*n-s,print1(n,", ")))