CINXE.COM
A018846 - OEIS
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <link rel="stylesheet" href="/styles.css"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name=viewport content="width=device-width, initial-scale=1"> <meta name="keywords" content="OEIS,integer sequences,Sloane" /> <title>A018846 - OEIS</title> <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml"> <script> var myURL = "\/A018846" function redir() { var host = document.location.hostname; if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") { document.location = "https"+":"+"//"+"oeis"+".org/" + myURL; } } function sf() { if(document.location.pathname == "/" && document.f) document.f.q.focus(); } </script> </head> <body bgcolor=#ffffff onload="redir();sf()"> <div class=loginbar> <div class=login> <a href="/login?redirect=%2fA018846">login</a> </div> </div> <div class=center><div class=top> <center> <div class=donors> The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>. </div> <div class=banner> <a href="/"><img class=banner border="0" width="600" src="/banner2021.jpg" alt="A018846 - OEIS"></a> </div> </center> </div></div> <div class=center><div class=pagebody> <div class=searchbarcenter> <form name=f action="/search" method="GET"> <div class=searchbargreet> <div class=searchbar> <div class=searchq> <input class=searchbox maxLength=1024 name=q value="" title="Search Query"> </div> <div class=searchsubmit> <input type=submit value="Search" name=go> </div> <div class=hints> <span class=hints><a href="/hints.html">Hints</a></span> </div> </div> <div class=searchgreet> (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!) </div> </div> </form> </div> <div class=sequence> <div class=space1></div> <div class=line></div> <div class=seqhead> <div class=seqnumname> <div class=seqnum> A018846 </div> <div class=seqname> Strobogrammatic numbers: numbers that are the same upside down (using calculator-style numerals). </div> </div> <div class=scorerefs> 9 </div> </div> <div> <div class=seqdatabox> <div class=seqdata>0, 1, 2, 5, 8, 11, 22, 55, 69, 88, 96, 101, 111, 121, 151, 181, 202, 212, 222, 252, 282, 505, 515, 525, 555, 585, 609, 619, 629, 659, 689, 808, 818, 828, 858, 888, 906, 916, 926, 956, 986, 1001, 1111, 1221, 1551, 1691, 1881, 1961, 2002, 2112, 2222, 2552, 2692, 2882</div> <div class=seqdatalinks> (<a href="/A018846/list">list</a>; <a href="/A018846/graph">graph</a>; <a href="/search?q=A018846+-id:A018846">refs</a>; <a href="/A018846/listen">listen</a>; <a href="/history?seq=A018846">history</a>; <a href="/search?q=id:A018846&fmt=text">text</a>; <a href="/A018846/internal">internal format</a>) </div> </div> </div> <div class=entry> <div class=section> <div class=sectname>OFFSET</div> <div class=sectbody> <div class=sectline>1,3</div> </div> </div> <div class=section> <div class=sectname>COMMENTS</div> <div class=sectbody> <div class=sectline><a href="/A018847" title="Strobogrammatic primes: the same upside down (calculator-style numerals).">A018847</a> lists primes in this sequence. - <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, May 05 2012</div> </div> </div> <div class=section> <div class=sectname>LINKS</div> <div class=sectbody> <div class=sectline>Michael S. Branicky, <a href="/A018846/b018846.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)</div> </div> </div> <div class=section> <div class=sectname>PROG</div> <div class=sectbody> <div class=sectline>(PARI) is_<a href="/A018846" title="Strobogrammatic numbers: numbers that are the same upside down (using calculator-style numerals).">A018846</a>(n, t=Vec("012..59.86"))={ apply(x->t[eval(x)+1], n=Vec(Str(n)))==vecextract(n, "-1..1") } \\ <a href="/wiki/User:M._F._Hasler">M. F. Hasler</a>, May 05 2012</div> <div class=sectline>(Python)</div> <div class=sectline>from itertools import count, islice, product</div> <div class=sectline>def ud(s): return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})</div> <div class=sectline>def A018846gen(): # generator of terms</div> <div class=sectline> yield from [0, 1, 2, 5, 8]</div> <div class=sectline> for d in count(2):</div> <div class=sectline> for first in "125689":</div> <div class=sectline> for rest in product("0125689", repeat=d//2-1):</div> <div class=sectline> left = first + "".join(rest)</div> <div class=sectline> for mid in [[""], ["0", "1", "2", "5", "8"]][d%2]:</div> <div class=sectline> yield int(left + mid + ud(left))</div> <div class=sectline>print(list(islice(A018846gen(), 54))) # <a href="/wiki/User:Michael_S._Branicky">Michael S. Branicky</a>, Jul 09 2022</div> </div> </div> <div class=section> <div class=sectname>CROSSREFS</div> <div class=sectbody> <div class=sectline>Cf. <a href="/A053701" title="Vertically symmetric numbers.">A053701</a> (vertically symmetric numbers), <a href="/A048708" title="Numerators of ratios converging to the Thue-Morse constant, converted to hexadecimal.">A048708</a>.</div> <div class=sectline>Sequence in context: <a href="/A129300" title="a(0)=1. a(n) = a(n-1) + (sum of the terms of the sequence which are <= n).">A129300</a> <a href="/A347839" title="An array of the positive integers congruent to 2 modulo 3 (A016789), read by antidiagonals upwards, giving the present triangle.">A347839</a> <a href="/A107679" title="Numbers n such that sum of digits of n^3 is 2^3 = 8.">A107679</a> * <a href="/A261578" title="Numbers m such that (4^m + 17) / 3 is prime.">A261578</a> <a href="/A264613" title="Numbers n such that the Shevelev polynomial {m, n} has a root at m = -1.">A264613</a> <a href="/A285293" title="Expansion of Product_{k>=1} (1 + x^k)^k / (1 + x^(5*k))^(5*k).">A285293</a></div> <div class=sectline>Adjacent sequences: <a href="/A018843" title="Number of n-dimensional unimodular lattices without roots.">A018843</a> <a href="/A018844" title="Arises from generalized Lucas-Lehmer test for primality.">A018844</a> <a href="/A018845" title="Number of iterations required for the sum of n and its prime divisors = t to reach a prime (where t replaces n in each itera...">A018845</a> * <a href="/A018847" title="Strobogrammatic primes: the same upside down (calculator-style numerals).">A018847</a> <a href="/A018848" title="Strobogrammatic squares: the same upside down (probably finite).">A018848</a> <a href="/A018849" title="Strobogrammatic squares: the same upside down (calculator-style numerals).">A018849</a></div> </div> </div> <div class=section> <div class=sectname>KEYWORD</div> <div class=sectbody> <div class=sectline><span title="a sequence of nonnegative numbers">nonn</span>,<span title="dependent on base used for sequence">base</span>,<span title="it is very easy to produce terms of sequence">easy</span>,<span title="an exceptionally nice sequence">nice</span></div> </div> </div> <div class=section> <div class=sectname>AUTHOR</div> <div class=sectbody> <div class=sectline><a href="/wiki/User:David_W._Wilson">David W. Wilson</a></div> </div> </div> <div class=section> <div class=sectname>STATUS</div> <div class=sectbody> <div class=sectline>approved</div> </div> </div> </div> <div class=space10></div> </div> </div></div> <p> <div class=footerpad></div> <div class=footer> <center> <div class=bottom> <div class=linksbar> <a href="/">Lookup</a> <a href="/wiki/Welcome"><font color="red">Welcome</font></a> <a href="/wiki/Main_Page"><font color="red">Wiki</font></a> <a href="/wiki/Special:RequestAccount">Register</a> <a href="/play.html">Music</a> <a href="/plot2.html">Plot 2</a> <a href="/demo1.html">Demos</a> <a href="/wiki/Index_to_OEIS">Index</a> <a href="/webcam">WebCam</a> <a href="/Submit.html">Contribute</a> <a href="/eishelp2.html">Format</a> <a href="/wiki/Style_Sheet">Style Sheet</a> <a href="/transforms.html">Transforms</a> <a href="/ol.html">Superseeker</a> <a href="/recent">Recents</a> </div> <div class=linksbar> <a href="/community.html">The OEIS Community</a> </div> <div class=linksbar> Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a> </div> <div class=dbinfo>Last modified November 28 15:35 EST 2024. Contains 378204 sequences.</div> <div class=legal> <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a> </div> </div> </center> </div> </body> </html>