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.

A323190 Integers k for which there exists an integer j such that s(k) + j + reversal(s(k) + j) = k where s(k) is the sum of digits of k.

This page as a plain text file.
%I A323190 #30 Sep 21 2022 12:58:47
%S A323190 0,10,11,12,14,16,18,22,33,44,55,66,77,88,99,101,110,121,132,141,143,
%T A323190 154,161,165,176,181,187,198,201,202,221,222,241,242,261,262,281,282,
%U A323190 302,303,322,323,342,343,362,363,382,383,403,404,423,424,443,444,463
%N A323190 Integers k for which there exists an integer j such that s(k) + j + reversal(s(k) + j) = k where s(k) is the sum of digits of k.
%C A323190 Theorem: all palindromes that have an even number of digits and all palindromes that have an odd number of digits and the digit in the middle is even are in this sequence.
%H A323190 Viorel Niţică, Jeroz Makhania, <a href="https://doi.org/10.3390/sym11111374">About the Orbit Structure of Sequences of Maps of Integers</a>, Symmetry (2019), Vol. 11, No. 11, 1374.
%e A323190 k=10 is a term because a solution exists with j=4: s(10)=1, s(k) + j + reversal(s(k) + j) = 1 + 4 + reversal(1 + 4) = 10.
%t A323190 ok[n_] := Block[{s = Total@ IntegerDigits@ n}, Select[Range[0, n], s + # + FromDigits@ Reverse@ IntegerDigits[s + #] == n &, 1] != {}]; Select[ Range[0, 1000], ok] (* _Giovanni Resta_, Feb 19 2019 *)
%o A323190 (Java)
%o A323190 package com.company;
%o A323190 public class Main {
%o A323190 public static void main(String args[]) {
%o A323190 int counter=1;
%o A323190 for (int i = 0; i < 10000; i++) {
%o A323190 for (int j = 0; j < 10000; j++) {
%o A323190 int sumPlus = sumDigits(i) + j;
%o A323190 int check = sumPlus + reverse(sumPlus);
%o A323190 if (check == i) {
%o A323190 System.out.println(String.format("n(%d)=%d,a=%d", counter,i, j));
%o A323190 counter++;
%o A323190 break;
%o A323190 }
%o A323190 }
%o A323190 }
%o A323190 System.out.println(String.format("%d", counter));
%o A323190 }
%o A323190 public static int reverse(int x) {
%o A323190 String s = String.valueOf(x);
%o A323190 StringBuilder sb = new StringBuilder();
%o A323190 sb.append(s);
%o A323190 sb.reverse();
%o A323190 return Integer.parseInt(sb.toString());
%o A323190 }
%o A323190 public static int sumDigits(int x) {
%o A323190 int result = 0;
%o A323190 while (x > 0) {
%o A323190 result += x % 10;
%o A323190 x = x / 10;
%o A323190 }
%o A323190 return result;
%o A323190 }
%o A323190 }
%Y A323190 Cf. A007953 (sum of digits), A004086 (reversal).
%Y A323190 A305130 is a subsequence.
%Y A323190 This sequence is a subsequence of A067030.
%K A323190 nonn,base
%O A323190 1,2
%A A323190 _Viorel Nitica_, Jan 06 2019
%E A323190 a(30)-a(55) from _Giovanni Resta_, Feb 19 2019