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.

A343524 Palindromes with digits strictly increasing up to the middle digit.

This page as a plain text file.
%I A343524 #29 Apr 25 2021 13:10:07
%S A343524 0,1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,121,131,141,151,161,
%T A343524 171,181,191,232,242,252,262,272,282,292,343,353,363,373,383,393,454,
%U A343524 464,474,484,494,565,575,585,595,676,686,696,787,797,898,1221,1331
%N A343524 Palindromes with digits strictly increasing up to the middle digit.
%C A343524 The maximum term in the sequence is 123456789987654321, if leading zeros are not allowed.
%H A343524 Michael S. Branicky, <a href="/A343524/b343524.txt">Table of n, a(n) for n = 1..1023</a>
%e A343524 121 and 1221 are legal terms but 122221 is not, since the digits 2,2 at positions 2 and 3 are not increasing.
%o A343524 (Perl)
%o A343524 #!/usr/bin/perl
%o A343524 open(OUT,">incrDecrPalindrome.txt")||die "open fail OUT\n";
%o A343524 foreach $cand (0..100000){
%o A343524     @a=split("",$cand);
%o A343524     $b = join("",reverse @a);
%o A343524     next unless $cand==$b; # palindromes only
%o A343524     $n = int(@a/2.);
%o A343524     $n-- if &is_even(0+@a); # backoff if even count of digits
%o A343524     foreach $i (1..$n){
%o A343524         goto skip_num unless $a[$i-1] < $a[$i];
%o A343524     }
%o A343524     print OUT "$cand,";
%o A343524 skip_num:;
%o A343524     print "";
%o A343524 }
%o A343524 print OUT "\n";
%o A343524 ##########################################
%o A343524 sub is_even{  $_[0]/2. == int $_[0]/2.  }
%o A343524 ##########################################
%o A343524 (Python)
%o A343524 from itertools import combinations
%o A343524 A343524_list = [0]
%o A343524 for l in range(1,4):
%o A343524     for d in combinations('123456789',l):
%o A343524         s = ''.join(d)
%o A343524         A343524_list.append(int(s+s[-2::-1]))
%o A343524     for d in combinations('123456789',l):
%o A343524         s = ''.join(d)
%o A343524         A343524_list.append(int(s+s[::-1])) # _Chai Wah Wu_, Apr 24 2021
%Y A343524 Cf. A002113, A009993, A062351 (primes), A134941.
%K A343524 nonn,base,fini,full
%O A343524 1,3
%A A343524 _James S. DeArmon_, Apr 18 2021
%E A343524 Terms < 100 prepended by _Rémy Sigrist_, Apr 25 2021