PageSourceSearch

https://oeis.org/hints.html

html oeis.org collected 2026-09-24 08:29:52 UTC 20,915 bytes, 608 lines download raw bytes

1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3<html>
4  
5  <head>
6  
7  <link rel="stylesheet" href="/styles.css?v=20260826">
8  <meta name="format-detection" content="telephone=no">
9  <meta http-equiv="content-type" content="text/html; charset=utf-8">
10  <meta name=viewport content="width=device-width, initial-scale=1">
11  <meta name="keywords" content="OEIS,integer sequences,Sloane" />
12  
13  
14  
15  <title>Hints for Using The On-Line Encyclopedia of Integer Sequences</title>
16  <link rel="search" type="application/opensearchdescription+xml" title="OEIS" href="/oeis.xml">
17  
18  <link rel="icon" type="image/svg+xml" href="/favicon.svg?v=20260826">
19  <link rel="icon" sizes="16x16 32x32 48x48" href="/favicon.ico?v=20260826">
20  <link rel="apple-touch-icon" href="/apple-touch-icon.png?v=20260826">
21  
21<script>
22  var myURL = "\/hints.html"
23  function redir() {
24      var host = document.location.hostname;
25      if(host != "oeis.org" && host != "127.0.0.1" && !/^([0-9.]+)$/.test(host) && host != "localhost" && host != "localhost.localdomain") {
26          document.location = "https"+":"+"//"+"oeis"+".org/" + myURL;
27      }
28  }
29  function sf() {
30      if(document.location.pathname == "/" && document.f) document.f.q.focus();
31  }
32  </script>
32
33  </head>
34  <body bgcolor=#ffffff onload="redir();sf()"><a href="https://oeis.org/cdn-cgi/content?id=Nv8uCuDMi8MAnJ271uJi0zigWGZya76dgdpLfxaPgIw-1790238591.6008272-1.2.1.1-JhujeyS4FTdcPx1rsm5o7w8SuL5ifqiNF2.b6YGIP6rDB7bKPdrmi7lOaZP.YQgp" aria-hidden="true" rel="nofollow noopener" style="display: none !important; visibility: hidden !important"></a>
35    <div class=loginbar>
36      <div class=login>
37      
38        <a href="/login?redirect=%2Fhints.html" rel="nofollow">login</a>
39      
40      </div>
41    </div>
42
43    <div class=center><div class=top>
44    <center>
45    <div class=donors>
46    The OEIS is supported by <a href="http://oeisf.org/#DONATE">the many generous donors to the OEIS Foundation</a>.
47    </div>
48
49    <div class=banner>
50    <a href="/"><picture>
51    <source media="(min-width: 830px)" srcset="/oeis-banner-wide.png 1x, /[email protected] 2x" width="918" height="129">
52    <img class=banner border="0" width="540" height="129" src="/oeis-banner.png" srcset="/oeis-banner.png 1x, /[email protected] 2x" alt="Hints for Using The On-Line Encyclopedia of Integer Sequences">
53    </picture></a>
54    </div>
55
56    
57    
58    
59    <div class="motdbox" style="justify-content: center;">
60        <div class="400k">
61         <p>Nominations for sequence A400000 are open, see <a href="https://oeis.org/wiki/Nominations_for_Sequence_A400000">here</a>.</p>
62        </div>
63        
64    </div>
65    
66    </center>
67    </div></div>
68
69    <div class=center><div class=pagebody>
70      
71    
72    <div class=searchbarcenter>
73        <form name=f action="/search" method="GET">
74            <div class=searchbargreet>
75                <div class=searchbar>
76                    <div class=searchq>
77                        <input class=searchbox maxLength=1024 name=q value="" title="Search Query">
78                        
79                        
80                        
81                        
82                    </div>
83                    <div class=searchsubmit>
84                        <input type=submit value="Search" name=go>
85                    </div>
86                    <div class=hints>
87                        <span class=hints><a href="/hints.html">Hints</a></span>
88                    </div>
89                </div>
90                <div class=searchgreet>
91                    (Greetings from <a href="/welcome">The On-Line Encyclopedia of Integer Sequences</a>!)
92                </div>
93            </div>
94        </form>
95    </div>
96
97<div align="center">
98<h2>Hints for Using <a href="https://oeis.org/">On-Line
99Encyclopedia of Integer Sequences</a> (or OEIS)</h2>
100</div>
101
102
103<ul>
104<li><STRONG>The main uses for the OEIS are:</STRONG>
105<ul>
106<li>to identify a sequence</li>
107<li>to obtain more terms, formulas, references, links, programs, etc. for a sequence</li>
108</ul>
109<p>
110You are trying to solve a problem, but it's too hard.<br>
111The answers in the first few cases are
112<A HREF="A001006">1,1,2,4,9,21,51,127</a>.<br>
113You then look this up</a> in the OEIS and see if anyone
114has ever encountered this sequence before (they have).
115<p>
116<center>
117<a href="https://oeis.org/search?q=1%2C1%2C2%2C4%2C9%2C21%2C51%2C127&sort=&language=&go=Search">Give up?</a>
118<form action="/search">
119  <input maxLength=1024 size=55 name=q value="2,4,9,21,51,127"
120    title="Search Query"><input type=submit value="Search" name=go>
121</form>
122</center>
123<p>
124</li>
125
126<li><strong>Hints:</strong>
127<ul>
128<li><font color="red"><strong>Enter about 6 terms, starting with the second term.</strong></font><br>
129Leave off the first term or two, because people may disagree about where
130the sequence begins.<br>
131If there are several 0's and 1's at the start, leave them off too when you are checking to see if your sequence is already in the OEIS.<br>
132Don't enter too many terms, because you may have more terms than are in the OEIS.<p>
133&nbsp; &nbsp; For the example above, you should enter 2,4,9,21,51,127 and 
134leave off the two 1's.<p>
135</li>
136
137<li><STRONG>Clean up your sequence first.</STRONG>
138<ul>
139<li>If every other term is zero (e.g.
1401 0 2 0 4 0 8 0 16 0 32 0 64 0 ...), omit these zeros,
141and look up 1 2 4 8 16 32 64 instead.</li>
142<li>If your sequence has an obvious common factor
143(e.g. 2 6 12 20 30 42 ...) try dividing it out
144and look up 1 3 6 10 15 21 instead.</li>
145<li>In general, do not submit a sequence which is a small constant times an existing sequence</li>
146</ul>
147<p>
148</li>
149</ul>
150</li>
151
152
153<li>
154<STRONG>Advanced search syntax</STRONG>
155
156<center>
157<form action="/search">
158  <input maxLength=1024 size=55 name=q value="2,3,6,16 &quot;symmetric group&quot; author:Stanley"
159    title="Search Query"><input type=submit value="Search" name=go>
160</form>
161</center>
162
163<ul>
164<li>
165<strong><font color="red">Examples of searches.</font></strong>
166
167<pre>
168        1,4,9,16,25,36,64
169        5 8 13 233 39088169
170        "fermat's little theorem"
171        author:Guy keyword:nice
172        keyword:nice keyword:more -keyword:base
173        keyword:new -keyword:base
174        id:A64413
175        A64413
176        id:A028284|id:A066948
177        author:smith keyword:less|keyword:dumb
178</pre>
179
180<ul>
181<li>The search text is a list of space-separated search terms,
182as with popular web search engines.</li>
183<li>The search terms can be single numbers,
184sequences of numbers, words or strings of words.</li>
185<li>Sequences of numbers should be separated with commas.</li>
186<li>To search the sequence terms, separate consecutive terms with commas. To search for numbers anywhere in the sequence entry (data, comments, examples etc.), precede the number with a # character and it will be treated as a word (see below).</li>
187<li>Strings of words should be separated by spaces (NOT commas).</li>
188<li>Strings of words may be enclosed in double quotes.</li>
189<li>You can separate search terms with | (no spaces around 
190the |) and it means sequences that match either term.</li>
191
192</ul>
193
194<p>
195</li>
196
197<li>
198<strong><font color="red">Commas and spaces</font></strong><br>
199
200These three searches produce the same results:
201
202<pre>
203        1,4,9,16,25,36,49,64,81,100
204        1 4 9 16 25 36 49 64 81 100
205        1, 4, 9, 16, 25, 36, 49, 64, 81, 100
206</pre>
207
208They both only match sequences in which the numbers appear consecutively, 
209in the order given.<br>
210The form with commas is the official form for a sequence search,
211but the space-only form is used so often that
212any time three or more numbers appear
213in a query separated by spaces, the server inserts commas between them automatically.
214Similarly, the comma-space form is accepted for easier pasting from other sources.
215All searches will match the squares (A000290).
216<br>
217To match sequences containing those numbers in any order,
218the numbers must be individually quoted, as in:
219
220<pre>
221        "1" "4" "9" "16" "25" "36" "49" "64" "81" "100"
222</pre>
223
224This search will still match the squares but also
225other sequences,
226 such as the composite numbers (A002808),
227which contain all those numbers but not necessarily consecutively or
228in the given order.<p>
229
230Commas are only inserted for numeric searches, not word searches.
231Suppose you want to find sequences that cite Stanley's book Enumerative Combinatorics.<br>
232The search string Stanley, Combinatorics (with the comma) gets no hits, but searching for Stanley Combinatorics (without the comma) gets several hundred hits.
233<p>
234</li>
235
236<li>
237<strong><font color="red">Prefixes.</font></strong><br>
238Simple search terms will be matched against every field of the entry,<br>
239though fields such as the name and the sequence data are given
240more weight than others.<br>
241Prefixes restrict the search to particular lines, as in:
242
243<pre>
244        keyword:nice author:LeBrun
245</pre>
246
247The prefixes mostly correspond to the lines in the display, as follows:
248
249<pre>
250        id:                     ref:                    program:
251        seq:                    link:                   xref:
252        signed:                 formula:                keyword:
253        name:                   example:                author:
254        offset:                 maple:                  extension:
255        comment:                mathematica:
256</pre>
257
258<ul>
259<li><tt>id:A001006</tt> displays sequence A001006.
260<tt>A001006</tt> displays sequence A001006 followed by all other sequences 
261that mention it.</li>
262<li><tt>seq:</tt> matches the sequence data, possibly by ignoring signs.</li>
263<li><tt>signed:</tt> matches sequence data and requires that any signs match
264as well. For example
265<pre>
266        signed:1,-1,-1,0,-1,1,-1,0,0,1,-1,0,-1,1,1,0
267</pre>
268will find the Moebius function mu(n), A008683.
269</li>
270<li>Put a minus sign in front of a prefix to exclude those matches.<br>
271Put a tilde (&#126;) in front of a number to exclude it (only applies
272if the numbers are separated by spaces).<br>
273For example, a search for 2 4 &#126;8 16 returns sequences such as 0, 1, 2, 4, 16, 65536
274that do not contain 8.
275</li>
276<li>You can say prefix: by itself to match sequences
277that have a line of that type.<br>
278For example <tt>ref:</tt>
279will match all sequences with reference lines.
280</li>
281<li>
282Another example:
283you can say, e.g. -seq:5 in your search to exclude all 
284sequences containing the number 5.  So if you know your sequence 
285consists only of 1, 2, 3, and 4 (and does include all of them), you 
286could search seq:1 seq:2 seq:3 seq:4 -seq:5 -seq:6 -seq:0.
287</li>
288</ul>
289<p>
290
291Two other prefixes are concerned with subsequences:
292
293<pre>
294        subseq:                 signedsubseq:
295</pre>
296
297<ul>
298<li>
299You can say, for example, subseq:377,8 to get those numbers in sequence data in that order.
300</li>
301<p>
302</ul>
303
304
305</li>
306
307<li>
308<strong><font color="red">Relevance.</font></strong><br>
309The results are returned in order of &ldquo;relevance,&rdquo; which is a rough
310measure of how likely you are to want to see a particular
311sequence.<br>
312It orders first by how well the sequence matched the search
313terms,<br> second by the popularity of the sequence in other 
314sequences' cross-references,<br> and finally by 
315sequence number.<br>
316Other sort orders can be selected on the results page.
317<p>
318</li>
319
320<li>
321<strong><font color="red">Wild cards.</font></strong><br>
322<ul>
323<li>
324        The wildcard _ will match any number in a sequence,
325           as in 1,2,_,4,5
326</li>
327
328<li>
329        The wildcard __ will match any list of numbers in a sequence,
330           as in 1,2,__,7,8
331</li>
332
333<li>
334        Search terms are highlighted in the results
335</li>
336
337</ul>
338
339</li>
340<p>
341
342<li>
343<strong><font color="red">Punctuation</font></strong>
344is not indexed and is treated as identical to whitespace 
345during matching;<br>
346for example,
347searching for <tt>fermat's</tt> is the same as searching for <tt>"fermat s"</tt>.
348<p>
349</li>
350
351<li>
352<strong><font color="red">Further examples</font></strong>
353<ul>
354
355   <li>
356   To find sequences containing both terms 1759 and 1957: 
357   search for <tt>"seq:1759 seq:1957"</tt>.
358   </li>
359
360</ul>
361<p>
362</li>
363
364</ul>
365
366<p>
367</li>
368
369
370
371<li>
372<strong>Further Hints</strong>
373<ul>
374<li><STRONG><A NAME="fract">You can only look up a sequence of integers or whole numbers,
375like 6 or 10 or -3</A></STRONG>
376<ul>
377<li>If you have a sequence of fractions, <strong>look up numerators
378and denominators separately</strong><br>
379Example: for
380<p> &nbsp; 1/4, 5/8, 13/16, 29/32, 61/64, 125/128, ...,</p>
381look up &nbsp; 1,5,13,29,61,125 &nbsp;
382and &nbsp; 4,8,16,32,64,128 &nbsp; separately.</li>
383<li>If your sequence has <strong>decimal fractions</strong> in it (1.4, 5.87, 12.083),
384the OEIS probably can't help you<br>
385(though you might try rounding them to the nearest integer,
386or taking the integer part).</li>
387<li>There are <strong>no letter sequences</strong> (such as A, B, C, D ...)
388in the OEIS!</li>
389</ul>
390<p>
391</li>
392
393<li><font color="green"><strong>For a triangle of numbers,</strong></font> such as:
394<pre>
395           1                        
396         1   1                      
397       1   2   2                    
398     1   3   5   4                  
399   1   4   9  12   9                
400 1   5  14  25  30  21              
401</pre>
402
403etc., make it into a sequence by reading across the rows:
404<p> &nbsp; &nbsp; 1 2 2 &nbsp; 1 3 5 4 &nbsp; 1 4 9</p>
405and look that up.  Or look up the diagonals, such as
406<p> &nbsp; &nbsp; 1 2 5 12 30 76</p>
407<p>
408</li>
409<li><font color="green"><strong>For a square array,</strong></font> such as
410<pre>
411    1   1   1   1 ...
412    1   2   3   4 ...
413    2   5   9  14 ...
414    4  12  25  44 ...
415    9  30  69 133 ...
416   21  76 189 392 ...
417</pre>
418etc., make it into a sequence by reading up (or down) the <strong>antidiagonals</strong>:
419<p> &nbsp; &nbsp; 1 &nbsp; 1 1 &nbsp;  1 2 2 &nbsp; 1 3 5 4 &nbsp; 1 4 9</p>
420and look that up.  Or look up the rows or columns, such as
421<p> &nbsp; &nbsp; 1 2 5 12 30 76</p>
422<p>
423</li>
424
425<li><font color="green"><strong>For a decimal constant,</strong></font> such as
4263.14159, look up the sequence of digits, as in
427<p> &nbsp; &nbsp; 3 1 4 1 5 9</p>
428The OEIS search engine will convert numbers containing decimal points
429into digit sequences automatically,<br> so you can type 3.14159 directly.
430</li>
431<p>
432
433
434<li>
435To search <font color="green">for <strong>a single large number</strong></font> in
436the OEIS, try Google, because Google has searched all the .txt files in the OEIS, and so may do a better job than the OEIS search engine.
437Example: The 64th Motzkin number is 9468017265749942384739441267, and Google will tell you it is in the <a href="https://oeis.org/A001006/b001006.txt">b-file</a> for <a href="A001006">A001006</a>.
438</li>
439<p>
440
441
442
443</ul>
444</li>
445
446
447
448
449<li>The <a href="https://oeis.org/"><STRONG>standard reply</STRONG></a>
450returns nicely reformatted sequences.<p>
451To see the sequences in the <STRONG>internal format</STRONG> used in the OEIS,
452click on the "internal format" link on the results page.<br>
453This is useful when reporting updates or corrections.
454<p>
455</li>
456
457<li>
458Note that there is also an
459<a href=Sindx.html>
460<STRONG>Index to the OEIS</STRONG></a>.
461<br>
462Hint: To search the <a href=Sindx.html>Index</a>,
463ask your favorite search engine, e.g. Google,
464to search for (say) theta series Index OEIS.
465<p>
466</li>
467
468<p>
469
470</li>
471
472
473<li><STRONG>Dates</STRONG> have been standardized in the format Jan 01 2001. The month
474is one of<br>
475&nbsp; &nbsp; &nbsp; Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec<br>
476The day is one of 01 02 03 ... 31, and there may be a comma after the day:<br>
477Jan 01 2001 and Jan 01, 2001 are both acceptable.<p>
478So to find the sequences submitted or updated on a particular day,
479look up both "Oct 10 2001" and "Oct 10, 2000" using the "word" search.
480<p>
481</li>
482
483<li>Every sequence in the OEIS has an <strong>A-number</strong>, such as
484<A HREF="A001850">A001850</a>.<br>
485If you know the A-number you can retrieve the sequence directly by typing it (with the A) into the search page.
486<p>
487</li>
488
489<li>If no match is found for your sequence, try
490<a href="ol.html"><STRONG>Superseeker</STRONG></a>.
491<p>
492</li>
493
494<li><STRONG>If your sequence isn't in the database</STRONG> - and is
495of general interest - please
496<a href="Submit.html"><STRONG>send it to the OEIS</STRONG></a>.<br>
497This will help other people who come across the same sequence
498(and will preserve your name for posterity).
499<p>
500
501</li>
502<li><STRONG>For a description of a typical entry in the OEIS,</STRONG> click
503<a href="eishelp2.html"><STRONG>here</STRONG></a>.
504<p>
505</li>
506
507<li>
508<STRONG>To browse the OEIS,</STRONG> use the
509<a href="WebCam.html"><STRONG>WebCam</STRONG></a>.
510This can be set to browse 
511<ul>
512<li>the best sequences</li>
513<li>recent additions</li>
514<li>sequences needing more terms, or</li>
515<li>all sequences.</li>
516</ul>
517<small>For the WebCam to work, Javascript must be turned on. It may not work with some older browsers.</small>
518<p>
519</li>
520
521<li>
522<strong>The meaning of the little numbers at the right of the blue bar.</strong>
523For example, +30 and 1086 for A000045.
524<p>
525The +30 is the sequence's query score -- how well it matches the query.<br>
526You get 100 points for matching ordering (for example,
527having 1 3 5 not 1 2 3 4 5 when the query is 1 3 5).<br>
528You get 10 points
529for matching terms in certain lines (for example, sequence data
530counts more, and sequence number counts a lot more).  
531<p>
532The 1086 is the number of sequences in the database that reference
533the given sequence.
534<p>
535The "relevance" sort is by query score, with ties broken by reference count.
536<p>
537That's how 1 3 5 manages to bring up the odd numbers and 2 3 5 the primes.
538<p>
539</li>
540
541<li>
542<font color="red"><STRONG>For more information, see:</STRONG></font>
543<ul>
544<li> <a href="https://oeis.org/wiki/Welcome"><STRONG>Welcome to the On-Line Encyclopedia.</STRONG></a> </li>
545<li> <font color="red"><strong>My Favorite Integer Sequences</strong></font>
546[<a href="http://NeilSloane.com/doc/sg.txt">Abstract</a>,
547<a href="http://NeilSloane.com/doc/sg.pdf">pdf</a>,
548<a href="http://NeilSloane.com/doc/sg.ps">ps</a>].</li>
549
550<li> An article about the OEIS
551from the <strong>Handbook of Computer Science</strong>
552[<a href="http://NeilSloane.com/doc/hbk.pdf">pdf</a>,
553<a href="http://NeilSloane.com/doc/hbk.ps">
553ps</a>].</li>
554<li>
555B. Hayes,
556<a href="http://www.americanscientist.org/template/AssetDetail/assetid/21436">A
557Question of Numbers</a>, in <STRONG>American Scientist</STRONG>.
558</li>
559</ul>
560</li>
561
562</ul>
563
564
565    </div></div>
566
567    <p>
568
569    <div class=footerpad></div>
570    <div class=footer>
571    <center>
572    <div class=bottom>
573    <div class=linksbar>
574      <a href="/">Lookup</a>
575      <a href="/wiki/Welcome"><font color="red">Welcome</font></a>
576      <a href="/wiki/Main_Page"><font color="red">Wiki</font></a>
577      <a href="/account">Register</a>
578      
579      <a href="/play.html">Music</a>
580      <a href="/plot2.html">Plot 2</a>
581      <a href="/demo1.html">Demos</a>
582      <a href="/wiki/Index_to_OEIS">Index</a>
583      <a href="/webcam">WebCam</a>
584      <a href="/Submit.html">Contribute</a>
585      <a href="/eishelp2.html">Format</a>
586      <a href="/wiki/Style_Sheet">Style Sheet</a>
587      <a href="/transforms.html">Transforms</a>
588      <a href="/ol.html">Superseeker</a>
589      <a href="/recent">Recents</a>
590    </div>
591    <div class=linksbar>
592      <a href="/community.html">The OEIS Community</a>
593    </div>
594    <div class=linksbar>
595      Maintained by <a href="http://oeisf.org">The OEIS Foundation Inc.</a>
596    </div>
597
598    <div class=dbinfo>Last modified September 24 04:27 EDT 2026.  Contains 399566 sequences.</div>
599    <div class=legal>
600    <a href="/wiki/Legal_Documents">License Agreements, Terms of Use, Privacy Policy</a>
601    </div>
602
603    </div>
604    </center>
605    </div>
606  
606<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"781e3e2683624a28a850394a171c1b83","r":1,"spa":2}' crossorigin="anonymous"></script>
vendor: 1 bytes, line 606
606
607<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a4006c7d8a1e2986',t:'MTc5MDIzODU5MQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>
607</body>
608</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.