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.

A006072 Numbers with mirror symmetry about middle.

This page as a plain text file.
%I A006072 M4481 #66 Jul 08 2025 16:41:12
%S A006072 0,1,8,11,88,101,111,181,808,818,888,1001,1111,1881,8008,8118,8888,
%T A006072 10001,10101,10801,11011,11111,11811,18081,18181,18881,80008,80108,
%U A006072 80808,81018,81118,81818,88088,88188,88888,100001,101101,108801,110011,111111,118811,180081
%N A006072 Numbers with mirror symmetry about middle.
%C A006072 Apparently this sequence and A111065 have the same parity. - _Jeremy Gardiner_, Oct 15 2005
%C A006072 Obviously, terms of this sequence also have the same parity (and also the same digital sum mod 6) as those of A118594, see below. - _M. F. Hasler_, May 08 2013
%C A006072 The number of n-digit terms is given by A225367 -- which counts palindromes in base 3, A118594. The terms here are the base 3 palindromes considered there, with 2 replaced by 8 (which means this sequence A006072 arises from A118594 not only by taking the 3rd power of each digit, but also by superposing the number with its horizontal or vertical reflection, somehow remarkably given the symmetry of numbers considered here). - _M. F. Hasler_, May 05 2013 [Part of the comment moved from A225367 to here on May 08 2013]
%D A006072 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006072 Michael S. Branicky, <a href="/A006072/b006072.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1450 from Vincenzo Librandi)
%H A006072 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TetradicNumber.html">Tetradic Number</a>
%F A006072 a(n) = digit-wise application of A000578 to A118594(n). - _M. F. Hasler_, May 08 2013
%t A006072 NextPalindrome[n_] := Block[{l = Floor[Log[10, n] + 1], idn = IntegerDigits[n]}, If[ Union[idn] == {9}, Return[n + 2], If[l < 2, Return[n + 1], If[ FromDigits[ Reverse[ Take[idn, Ceiling[l/2]]]] > FromDigits[ Take[idn, -Ceiling[l/2]]], FromDigits[ Join[ Take[idn, Ceiling[l/2]], Reverse[ Take[idn, Floor[l/2]]]]], idfhn = FromDigits[ Take[idn, Ceiling[l/2]]] + 1; idp = FromDigits[ Join[ IntegerDigits[ idfhn], Drop[ Reverse[ IntegerDigits[ idfhn]], Mod[l, 2]]]]]]]]; np = 0; t = {0}; Do[np = NextPalindrome[np]; If[Union[Join[{0, 1, 8}, IntegerDigits[np]]] == {0, 1, 8}, AppendTo[t, np]], {n, 1150}]; t (* _Robert G. Wilson v_ *)
%t A006072 TetrNumsUpTo10powerK[k_]:= Select[FromDigits/@ Tuples[{0, 1, 8}, k],IntegerDigits[#] == Reverse[IntegerDigits[#]] &]; TetrNumsUpTo10powerK[7] (* _Mikk Heidemaa_, May 21 2017 *)
%o A006072 (PARI) {for(l=1,5,u=vector((l+1)\2,i,10^(i-1)+(2*i-1<l)*10^(l-i))~;forvec(v=vector((l+1)\2,i,[l>1&&i==1,2]), print1((v+v\2*6)*u", ")))} \\ The n-th term could be produced by using (partial sums of) A225367 to skip all shorter terms, and then skipping the adequate number of vectors v until n is reached. - _M. F. Hasler_, May 05 2013
%o A006072 (Python)
%o A006072 from itertools import count, islice, product
%o A006072 def agen():
%o A006072     yield from [0, 1, 8]
%o A006072     for d in count(2):
%o A006072         for start in "18":
%o A006072             for rest in product("018", repeat=d//2-1):
%o A006072                 left = start + "".join(rest)
%o A006072                 for mid in [[""], ["0", "1", "8"]][d%2]:
%o A006072                     yield int(left + mid + left[::-1])
%o A006072 print(list(islice(agen(), 42))) # _Michael S. Branicky_, Mar 29 2022
%Y A006072 Subsequence of A000787. Cf. A045574.
%K A006072 base,nonn,easy
%O A006072 1,3
%A A006072 _N. J. A. Sloane_
%E A006072 More terms from _Robert G. Wilson v_, Nov 16 2005