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.

A229545 Numbers n such that n + (sum of digits of n) is a palindrome.

This page as a plain text file.
%I A229545 #39 May 22 2025 10:21:36
%S A229545 0,1,2,3,4,10,20,30,40,50,60,70,80,90,91,96,100,105,124,129,143,148,
%T A229545 162,167,181,191,196,200,205,224,229,243,248,262,267,281,291,296,300,
%U A229545 305,324,329,343,348,362,367,381,391,396,400,405,424,429,443,448,462
%N A229545 Numbers n such that n + (sum of digits of n) is a palindrome.
%C A229545 It appears the ones and tens digits in the 3-digit numbers have a pattern to them (00-->05-->24-->29-->43-->48-->62-->67-->81-->91-->96-->00).
%C A229545 Analyzing a(n) mod 10^e, n<100000, for e=2: starting at n=15 there are 9 cycles of length 11 [91,96,0,5,24,29,43,48,62,67,81], followed by 9 cycles of length 10 [82,0,9,18,27,36,45,54,63,72], then 9 of length 101, 9 of 102, 9 of 1011, 9 of 1012, and at least 7 of length 10103. For e=1 the cycles have the same position and length, for e>2 the shorter cycles successively disappear. [_Lars Blomberg_, Jan 05 2013]
%H A229545 Lars Blomberg, <a href="/A229545/b229545.txt">Table of n, a(n) for n = 1..10000</a>
%e A229545 196 + (1+9+6) = 212 (a palindrome). So, 196 is in this sequence.
%t A229545 palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range[0, 462], palQ[# + Plus @@ IntegerDigits@ #] &] (* _Michael De Vlieger_, Apr 12 2015 *)
%o A229545 (Python)
%o A229545 def ispal(n):
%o A229545   r = ''
%o A229545   for i in str(n):
%o A229545     r = i + r
%o A229545   return n == int(r)
%o A229545 def DS(n):
%o A229545   s = 0
%o A229545   for i in str(n):
%o A229545     s += int(i)
%o A229545   return s
%o A229545 {print(n,end=', ') for n in range(10**3) if ispal(n+DS(n))}
%o A229545 # Simplified by _Derek Orr_, Mar 22 2015
%o A229545 (PARI) for(n=0,10^3,D=digits(n+sumdigits(n));if(Vecrev(D)==D,print1(n,", "))) \\ _Derek Orr_, Mar 22 2015
%Y A229545 Cf. A062028.
%K A229545 nonn,base,easy
%O A229545 1,3
%A A229545 _Derek Orr_, Sep 25 2013