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.
%I A001232 #121 May 24 2025 16:19:44 %S A001232 1089,10989,109989,1099989,10891089,10999989,108901089,109999989, %T A001232 1089001089,1098910989,1099999989,10890001089,10989010989,10999999989, %U A001232 108900001089,108910891089,109890010989,109989109989,109999999989,1089000001089,1089109891089 %N A001232 Numbers k such that 9*k = (k written backwards), k > 0. %C A001232 This sequence contains the least n-digit non-palindromic number which is a factor of its reversal. Quotient is always 9. - _Lekraj Beedassy_, Jun 11 2004. (But it contains many other numbers as well. - _N. J. A. Sloane_, Jul 02 2013) %C A001232 Nonzero fixed points of the map which sends x to x - reverse(x) if that is nonnegative, otherwise to x + reverse(x). - _Sébastien Dumortier_, Nov 05 2006. (Clarified comment, see A124074. - _Ray Chandler_, Oct 11 2017) %C A001232 Numbers k such that reversal(k)=reversal(k+reversal(k)). Also numbers k such that reversal(k)=reversal(10*k-reversal(k)). - _Farideh Firoozbakht_, Jun 11 2010 %C A001232 From _M. F. Hasler_, Oct 04 2022: (Start) %C A001232 (1) The first digit of any term must be 1, otherwise multiplication by 9 yields one more digit. For the same reason, no "overflow" must occur from the second to the first digit, so the last digit must be 9. %C A001232 (2) Continuing the reasoning "from right to left" implies that the trailing nonzero digits must be ...9*89, where 9* means any nonnegative number of consecutive digits 9, preceded by a digit 0, which must be preceded by a digit 1. This implies that the initial and also final digits of any term must be 109*89. We might call a term of this form a "primitive" term. So there is exactly one primitive term b(k) = 11*10^(k-2)-11 with k digits, for all k >= 4. %C A001232 (3) All terms of the sequence are a "symmetric" concatenation of such b(k)'s, "spaced out" with any number of digits 0, also in a symmetrical way: For any n >= 1, let k = (k[1], ..., k[n]) with k[n+1-j] = k[j] >= 4, and m = (m[1], ..., m[n-1]) (possibly of length 0) with m[n-j] = m[j] >= 0, then N = concat(b(k[j])*10^m[j], 1 <= j < n; k[n]) is a term of the sequence, and this yields all terms of the sequence. (For example, with 1089 we also have 1089{0...0}1089 and 1089,001089,001089, etc.) (End) %D A001232 H. Camous, Jouer Avec Les Maths, "Cardinaux Réversibles", Section I, Problem 6, pp. 27, 37-38; Les Editions d'Organisation, Paris, 1984. %D A001232 Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 41. %D A001232 David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, under #1089. %H A001232 Ray Chandler, <a href="/A001232/b001232.txt">Table of n, a(n) for n = 1..10000</a> %H A001232 C. A. Van Cott, <a href="https://doi.org/10.1080/10724117.2020.1809284">The Integer Hokey Pokey</a>, Math Horizons, Vol. 28, pp. 24-27, November 2020. %H A001232 L. H. Kendrick, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Kendrick/ken1.html">Young Graphs: 1089 et al.</a>, J. Int. Seq. 18 (2015) 15.9.7. %H A001232 N. J. A. Sloane, <a href="http://arxiv.org/abs/1307.0453">2178 And All That</a>, arXiv:1307.0453 [math.NT], 2013; Fib. Quart., 52 (2014), 99-120. %H A001232 N. J. A. Sloane, <a href="/A001232/a001232.pdf">2178 And All That</a> [Local copy] %H A001232 Simon Weisgerber, <a href="https://doi.org/10.1007/s10516-023-09705-y">Value Judgments in Mathematics: GH Hardy and the (Non-)seriousness of Mathematical Theorems</a>, Global Phil. (2024) Vol. 34, Art. No. 1. See p. 8. %F A001232 Theorem: Terms in this sequence have the form 99*m, where the decimal representation of m contains only 1's and 0's, is palindromic and contains no singleton 1's or 0's. Hence contains Fib(floor(k/2)-1) k-digit terms, k >= 4. - _David W. Wilson_, Dec 15 1997 %F A001232 a(A094707(n)) = 11*(10^n - 1) = 11*A002283(n) = 99*A002275(n), for n>1. - _Lekraj Beedassy_, Jun 11 2004. (Restored from history and corrected. - _Ray Chandler_, Oct 11 2017) %F A001232 a(n) = 99*A061851(n) = A008918(n)/2. - _M. F. Hasler_, Oct 06 2022 %e A001232 1089*9 = 9801. %t A001232 Rest@Select[FromDigits /@ Tuples[{0, 99}, 11], IntegerDigits[9*#] == Reverse@IntegerDigits[#] &] (* _Arkadiusz Wesolowski_, Aug 14 2012 *) %t A001232 okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; 99#&/@Flatten[Table[ FromDigits/@ Select[Tuples[{0,1},n],okQ],{n,20}]] (* _Harvey P. Dale_, Jul 03 2013 *) %o A001232 (PARI) isok(n) = 9*n == eval(concat(Vecrev(Str(n)))); \\ _Michel Marcus_, Feb 21 2015 %o A001232 (PARI) {A001232_row(n, L(v, s=0)=for(i=1, #v, s*=10^v[i]; i%2 && s+=10^v[i]\900); s)=if(n<4, [], L, Set(apply(L, self()(n, 0)))*99, L=List([[n]]); for(k=4, n\2, listput(L,[k,n-2*k,k]); for(p=0, n\2-k, foreach(self()(n-(k+p)*2, 0), M, listput(L, concat([[k, p], M, [p, k]]))))); L)} \\ List of n-digit terms. - _M. F. Hasler_, Oct 04 2022 %o A001232 concat(apply(A001232_row, [1..14])) %o A001232 (Python) %o A001232 def A001232_row(n, r=11): # list of n-digit terms %o A001232 L = [] if n<4 else [[n]] %o A001232 for L1 in range(4, n//2+1): %o A001232 L.append([L1, n-2*L1, L1]) %o A001232 L.extend([L1,L2]+M+[L2,L1] for L2 in range(n//2-1-L1) %o A001232 for M in A001232_row(n-(L1+L2)*2, 0)) %o A001232 if not r: return L %o A001232 def f(L, s=0): %o A001232 for k,L in enumerate(L): %o A001232 s *= 10**L %o A001232 if not k%2: s += 10**(L-2)-1 %o A001232 return r*s %o A001232 return sorted(map(f, A001232_row(n, 0))) # _M. F. Hasler_, Oct 04 2022 %Y A001232 Cf. A008918, A008919, A193434, A222814, A222815, A031877, A124074. %Y A001232 Cf. A002275, A002283, A004086, A094707. %K A001232 base,nonn,nice %O A001232 1,1 %A A001232 _N. J. A. Sloane_ and _Simon Plouffe_ %E A001232 Corrected and extended by _David W. Wilson_, Aug 15 1996, Dec 15 1997 %E A001232 a(20)-a(21) from _Arkadiusz Wesolowski_, Aug 14 2012 %E A001232 a(1..10^4) in b-file double-checked with independent code by _M. F. Hasler_, Oct 04 2022