[Question]
  [
> 
> As of 13/03/2018 16:45 UTC, the winner is [answer #345](https://codegolf.stackexchange.com/a/156848/66833), by [Khuldraeseth na'Barya](https://codegolf.stackexchange.com/users/73884/khuldraeseth-nabarya). This means the contest is officially over, but feel free to continue posting answers, just so long as they follow the rules.
> 
> 
> As well, just a quick shout out to the top three answerers in terms of numbers of answers:
> 
> 
> **1.** [NieDzejkob](https://codegolf.stackexchange.com/users/55934/niedzejkob) - 41 answers
> 
> 
> **2.** [KSmarts](https://codegolf.stackexchange.com/users/69481/ksmarts) - 30 answers
> 
> 
> **3.** [Hyper Neutrino](https://codegolf.stackexchange.com/users/68942/hyperneutrino) - 26 answers
> 
> 
> 
---
This is an answer chaining question that uses sequences from OEIS, and the length of the previous submission.
This answer chaining question will work in the following way:
* I will post the first answer. All other solutions must stem from that.
* The next user (let's call them userA) will find the OEIS sequence in which its index number (see below) is the same as the length of my code.
* Using the sequence, they must then code, in an **unused language**, a program that takes an integer as input, n, and outputs the nth number in that sequence.
* Next, they post their solution after mine, and a new user (userB) must repeat the same thing.
The `n`th term of a sequence is the term n times after the first, working with the first value being the first value given on its OEIS page. In this question, we will use **0-indexing** for these sequences. For example, with [A000242](https://oeis.org/A000242) and `n = 3`, the correct result would be *25*.
## However!
This is not a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest code doesn't matter. But the length of your code does still have an impact. To prevent the duplication of sequences, **your bytecount must be unique**. This means that no other program submitted here can be the same length in *bytes* as yours.
If there isn't a sequence for then length of the last post, then the sequence for your post is the lowest unused sequence. This means that the sequences used also have to be unique, and that the sequence cannot be the same as your bytecount.
After an answer has been posted and no new answers have been posted for more than a week, the answer *before* the last posted (the one who didn't break the chain) will win.
## Input and Output
Generic input and output rules apply. Input must be an integer or a string representation of an integer and output must be the correct value in the sequence.
## Formatting
As with most [answer-chaining](/questions/tagged/answer-chaining "show questions tagged 'answer-chaining'") questions, please format your answer like this
```
# N. language, length, [sequence](link)
`code`
[next sequence](link)
*anything else*
```
## Rules
* You must wait for at least 1 hour before posting an answer, after having posted.
* You may not post twice (or more) in a row.
* The index number of a sequence is the number after the `A` part, and with leading zeros removed (e.g. for `A000040` the index number is 40)
* You can assume that neither the input nor the required output will be outside your languages numerical range, but please don't abuse this by choosing a language that can only use the number 1, for example.
* If the length of your submission is greater than 65536 characters long, please provide a link to a way to access the code (pastebin for example).
* `n` will never be larger than 1000, or be out of bounds for the sequence, simply to prevent accuracy discrepancies from stopping a language from competing.
* Every 150 (valid) answers, the number of times a language may be used increases. So after 150 solutions have been posted, every language may be used twice (with all previous answers counting towards this). For instance, when 150 answers have been posted, Python 3 may be used twice, but due to the fact that it has already been used once, this means it can only be used once more until 300 answers have been posted.
* Please be helpful and post a link to the next sequence to be used. This isn't required, but is a recommendation.
* Different versions of languages, e.g. Python 2 and Python 3 are *different languages*. As a general rule, if the different versions are both available on Try It Online, they are different languages, but keep in mind that this is a *general rule* and not a rigid answer.
* It is not banned, but please try not to copy the code from the OEIS page, and actually try to solve it.
* Hardcoding is only allowed if the sequence is finite. Please note that the answer that prompted this ([#40](https://codegolf.stackexchange.com/a/134996/66833)) is the exception to the rule. A few answers early in the chain hardcode, but these can be ignored, as there is no good in deleting the chain up to, say, #100.
## Answer chain snippet
```
var QUESTION_ID=133754,OVERRIDE_USER=66833;function shareUrl(i){return"https://codegolf.stackexchange.com/a/"+i}function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getTemplate(s){return jQuery(jQuery("#answer-template").html().replace("{{PLACE}}",s.index+".").replace("{{NAME}}",s.user).replace("{{LANGUAGE}}",s.language).replace("{{SEQUENCE}}",s.sequence).replace("{{SIZE}}",s.size).replace("{{LINK}}",s.link))}function search(l,q){m=jQuery("<tbody id='answers'></tbody>");e.forEach(function(s){if(!q||(l==0&&RegExp('^'+q,'i').exec(s.lang_name))||(l==1&&q===''+s.size)){m.append(jQuery(getTemplate(s)))}});jQuery("#answers").remove();jQuery(".answer-list").append(m)}function sortby(ix){t=document.querySelector('#answers');_els=t.querySelectorAll('tr');els=[];for(var i=0;i<_els.length;i++){els.push(_els[i]);}els.sortBy(function(a){a=a.cells[ix].innerText;return ix==0||ix==4?Number(a):a.toLowerCase()});for(var i=0;i<els.length;i++)t.appendChild(els[i]);}function checkSize(x){if(!x)return jQuery("#size-used").text("");var i=b.indexOf(+x);if(i<0)return jQuery("#size-used").text("Available!");var low=+x,high=+x;while(~b.indexOf(low))low--;while(~b.indexOf(high))high++;jQuery("#size-used").text(("Not available. The nearest are "+low+" and "+high).replace("are 0 and","is"))}function checkLang(x){}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.answer_id;answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return (e.owner.user_id==OVERRIDE_USER?"<span id='question-author'>"+e.owner.display_name+"</span>":e.owner.display_name)}function process(){b=[];c=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);if(a){e.push({user:getAuthorName(s),size:+a[4],language:a[2],lang_name:a[3],index:+a[1],sequence:a[5],link:shareUrl(s.answer_id)});if(b.indexOf(+a[4])>=0&&c.indexOf(+a[4])<0){c.push(+a[4])};b.push(+a[4])}else{jQuery('#weird-answers').append('<a href="'+shareUrl(s.answer_id)+'">This answer</a> is not formatted correctly. <b>Do not trust the information provided by this snippet until this message disappears.</b><br />')}}),e.sortBy(function(e){return e.index});e.forEach(function(e){jQuery("#answers").append(getTemplate(e))});var q="A"+("000000"+e.slice(-1)[0].size).slice(-6);jQuery("#next").html("<a href='http://oeis.org/"+q+"'>"+q+"</a>");c.forEach(function(n){jQuery('#weird-answers').append('The bytecount '+n+' was used more than once!<br />')})}Array.prototype.sortBy=function(f){return this.sort(function(a,b){if(f)a=f(a),b=f(b);return(a>b)-(a<b)})};var ANSWER_FILTER="!*RB.h_b*K(IAWbmRBLe",COMMENT_FILTER="!owfmI7e3fd9oB",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page,e=[];getAnswers();var SCORE_REG=/<h\d>\s*(\d+)\.\s*((?:<a [^>]+>\s*)?((?:[^\n,](?!<\/a>))*[^\s,])(?:<\/a>)?),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*, ((?:<a[^>]+>\s*)?A\d+(?:\s*<\/a>)?)\s*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important;font-family:Roboto,sans-serif}#answer-list,#language-list{padding:10px;/*width:290px*/;float:left;display:flex;flex-wrap:wrap;list-style:none;}table thead{font-weight:700}table td{padding:5px}ul{margin:0px}#board{display:flex;flex-direction:column;}#language-list li{padding:2px 5px;}#langs-tit{margin-bottom:5px}#byte-counts{display:block;margin-left:15px;}#question-author{color:purple;text-shadow: 0 0 15px rgba(128,0,128,0.1);}#label-info{font-weight: normal;font-size: 14px;font-style: italic;color: dimgray;padding-left: 10px;vertical-align: middle; }
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"><p id="weird-answers"></p><p>Currently waiting on <span id="next"></span></p><span>Search by Byte Count: <input id="search" type="number" min=1 oninput="checkSize(this.value);search(1,this.value)" onclick="document.getElementById('search2').value='';!this.value&&search(0,'')"/> <span id="size-used"></span></span><br><span>Search by Language: <input id="search2" oninput="checkLang(this.value);search(0,this.value)" onclick="document.getElementById('search').value='';!this.value&&search(0,'')"/> <span id="language-used"></span></span><h2>Answer chain <span id="label-info">click a label to sort by column</span></h2><table class="answer-list"><thead><tr><td  onclick="sortby(0)">#</td><td onclick="sortby(1)">Author</td><td onclick="sortby(2)">Language</td><td onclick="sortby(3)">Sequence</td><td onclick="sortby(4)">Size</td></tr></thead><tbody id="answers"></tbody></table><table style="display: none"><tbody id="answer-template"><tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SEQUENCE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody></table><table style="display: none"><tbody id="language-template"><tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SEQUENCE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody></table>
```
  
[Answer]
# 22. [FiM++](https://esolangs.org/wiki/FiM%2B%2B), 982 bytes, [A000024](https://oeis.org/A000024)
> 
> **Note**: if you are reading this, you might want to [sort by "oldest".](https://codegolf.stackexchange.com/questions/133754/one-oeis-after-another?answertab=oldest#tab-top)
> 
> 
> 
```
Dear PPCG: I solved A000024!
I learned how to party to get a number using the number x and the number y.
Did you know that the number beers was x?
For every number chug from 1 to y,
  beers became beers times x!
That's what I did.
Then you get beers!
That's all about how to party.
Today I learned how to do math to get a number using the number n.
Did you know that the number answer was 0?
For every number x from 1 to n,
  For every number y from 1 to n,
    Did you know that the number tmp1 was how to party using x and 2?
    Did you know that the number tmp2 was how to party using y and 2?
    Did you know that the number max was how to party using 2 and n?
    tmp2 became tmp2 times 10!
    tmp1 became tmp1 plus tmp2!
    If tmp1 is more than max then: answer got one more.
  That's what I did.
That's what I did.
Then you get answer!
That's all about how to do math.
Your faithful student, BlackCap.
PS:  This is the best answer
PPS: This really is the best answer
```
[Next sequence](https://oeis.org/A000982)
[Answer]
# 1. [Triangular](https://github.com/aaronryank/triangular), 10 bytes, [A000217](https://oeis.org/A000217)
```
$\:_%i/2*<
```
[Try it online!](https://tio.run/##KynKTMxLL81JLPr/XyXGKl41U99Iy@b/f0MDAA "Triangular – Try It Online")
[Next Sequence](https://oeis.org/A000010)
## How it works
The code formats into this triangle
```
   $
  \ :
 _ % i
/ 2 * <
```
with the IP starting at the `$` and moving South East (SE), works like this:
```
$            Take a numerical input (n);     STACK = [n]
 :           Duplicate it;                   STACK = [n, n]
  i          Increment the ToS;              STACK = [n, n+1]
   <         Set IP to W;                    STACK = [n, n+1]
    *        Multiply ToS and 2ndTos;        STACK = [n(n+1)]
     2       Push 2;                         STACK = [n(n+1), 2]
      /      Set IP to NE;                   STACK = [n(n+1), 2]
       _     Divide ToS by 2ndToS;           STACK = [n(n+1)/2]
        \    Set IP to SE;                   STACK = [n(n+1)/2]
         %   Output ToS as number;           STACK = [n(n+1)/2]
          *  Multiply ToS by 2ndToS (no op); STACK = [n(n+1)/2]
```
[Answer]
# 73. [Starry](https://esolangs.org/wiki/Starry), 363 bytes, [A000252](https://oeis.org/A000252)
```
, +      + *     '.     `
 + + + +  *  *  *  +     
 +`      +*       +    ` 
 + +   +  + +   + *  '   
   +   '  ####`  + +   + 
 + +    ####  +*   +    *
    '  #####  +      + ' 
  `    ######+  + +   +  
+ +   + #########   * '  
 +   +  + #####+ +      +
*  +      + * +  *  *   +
   +  *  + + + +  *  *   
+   +  +   *   + `  + +  
 +  + +   + *'    +    +.
```
[Try it online!](https://tio.run/##XZBLDsMgDET3PsVIXiBBFWWT@7hXSLvp6am/Ia0TCYPnDdiv9/M8P3M@MOAx0H1tmy9CehKfFeIPqVYkmUCyIAjGt5WoojkTIs1ZQ5agGD9PS993wgIY653N3KQQ5tttoMq4wpzMhdbLkipD6rgP4WpYK0F0/M/C7kmzlKJaop/u2zWdsc157F8 "Starry – Try It Online")
[Next sequence](https://oeis.org/A000363)
Uses the formula "`a(n) = n^4 * product p^(-3)(p^2 - 1)*(p - 1)` where the product is over all the primes p that divide n" from OEIS.
The moon's a no-op, but hey, this isn't code-golf.
[Answer]
# 97. [Python 3 (PyPy)](https://docs.python.org/3/), 1772 bytes, [A000236](http://oeis.org/A000236)
First of all, many thanks to Dr. Max Alekseyev for being patient with me. I'm very fortunate that I was able to contact him by email to understand this challenge. His Math.SE answer [here](https://math.stackexchange.com/a/2381188/457091) helped me out a lot. Thanks to Wheat Wizard for helping me as well. :)
```
plist = []
def primes(maximal = -1): # Semi-efficient prime number generator with caching up to a certain max.
	index = plist and plist[-1] or 2
	for prime in plist:
		if prime <= maximal or maximal == -1: yield prime
		else: break
	while index <= maximal or maximal == -1:
		composite = False
		for prime in plist:
			if index % prime == 0:
				composite = True
				break
		if not composite:
			yield index
			plist.append(index)
		index += 1
def modinv(num, mod): # Multiplicative inverse with a modulus
	index = 1
	while num * index % mod != 1: index += 1
	return index
def moddiv(num, dnm, mod):
	return num * modinv(dnm, mod) % mod
def isPowerResidue(num, exp, mod):
	for base in range(mod):
		if pow(base, exp, mod) == num:
			return base
	return False
def compute(power, prime):
	for num in range(2, prime):
		if isPowerResidue(moddiv(num - 1, num, prime), power, prime):
			return num - 1
	return -1
# file = open('output.txt', 'w')
def output(string):
	print(string)
	# file.write(str(string) + '\n')
def compPrimes(power, count):
	maximum = 0
	index = 0
	for prime in getValidPrimes(power, count):
		result = compute(power, prime)
		if result > maximum: maximum = result
		index += 1
		# output('Computed %d / %d = %d%% [result = %d, prime = %d]' % (index, count, (100 * index) // count, result, prime))
	return maximum
def isValidPrime(power, prime):
	return (prime - 1) % power == 0
def getValidPrimes(power, count):
	collected = []
	for prime in primes():
		if isValidPrime(power, prime):
			collected.append(prime)
		if len(collected) >= count:
			return collected
		# output('Collected %d / %d = %d%% [%d]' % (len(collected), count, (100 * len(collected)) // count, prime))
power = int(input()) + 2
output(compPrimes(power, 100))
# file.close()
```
[Try it online!](https://tio.run/##hVTBbtswDD3bX8GhCGKvSRp3t2DpZcBuA4pt2KXrQbWZRJgjG7bcpF@fkaJkO2nXXRJbJB8f@Z5cv9hdZT6dTnWpWwtreHiM4wI3UDd6j22yV0e9VyUF5lm6giv4gXs9x81G5xqNlTQw3f4JG9iiwUbZqoGDtjvIVb7TZgtdDbYCBTk2VmkDhLmII20KPBKuNFamkKeHefYIhHAbRxv6E3wqcsFVHEXac4PPawjsKLEnykxX8KKxLCSRarBscQVPDao/cXTY6ZIhuf17GFSXV/u6arVF4vlVEQidvc2KaQnkxEcJZOkiZyg/mw7doSfDdaay0Oe4EmHv8PjVdVmoukZTJO405UrX7noNmSi2rwptnhPSYsbPTq1vXWk1lefK6mdm/IxNiyKP4qyu7NpBiyxsh0DgYz8Q5cEHiq5g1DNq0HaN8SwDg0J7BoUJNPpMAfU0@7jgC4Bu76sDNt@x1UWHAoTHugfi3T@p1q2@UWaLiQ84V1SHhIOjEhaBQNxOPQnO6BmJpq41C9BZTGomMBMNQ0sm3ne8HQWd6uechx3AHLIZuBmkYAaX4NF4NfPRUuek6RVsWIo1VKR7Mq06SwQX9minM5gepqnwluOktQ1dNcYkcNO/x5GgLA4NeYtPQwSuYfrbBBSe/l5uvOeYV52xjOcuBdEjOw9GWV7czi3aX6rUxT8waKyWnEiFb65ZFulz7sB3XMHQWmLnpo9oNj/99IvAFjAp4IZ/1vQzmcBD33hSzMLFpOfHKdlOrpKnOYMkWy6D6VO4uQnnAhG4pr1Gnl1w7jD/Kw/5gkT6k85sepfkvhKC8J8V5lVZYs4jum/0xWdIagZLvkMmGqDCJ2WsQkle6xNSuFsLhbFZ@/CFBIHgpQZh3efQl3s/j44FCIuP/cqADa4Nd03Zx7dx7Em8tjFhc6W/BXlZtZikp@z0Fw "Python 3 – Try It Online")
If it gives the wrong result, just increase the 100 to something larger. I think 10000 will work for 4 but I'll leave my computer running overnight to confirm that; it may take a couple of hours to finish.
Note that the (PyPy) part is just so that I can use Python again. I really don't know many other languages and I'm not going to try to port this to Java and risk not finishing in time.
[Next Sequence](http://oeis.org/A001772) (Also please don't do any more crazy math stuff; I don't have any Python versions left so someone else will have to save this challenge D:)
[Answer]
# 107. [TrumpScript](https://github.com/samshadwell/TrumpScript), 1589 bytes, [A000047](http://oeis.org/A000047)
```
My cat hears everything really well
because with me every cat is a safe cat
Everybody knows that one is 1000001 minus 1000000
but only most of you that two is, one plus one;
As always nothing is, one minus one;
My dog is one year old.
I promise you that as long as you vote on me, nothing will be less cool than a cat;:
Much dog is, dog times two;
Dead cat is, cat minus one;!
I will make dog feel good, food for dog plus one;
Roads can be made using different things. Asphalt is one of them.
As long as Hillary jailed, I love asphalt less than my dog;:
Roads are, always made using asphalt plus one of other things;
I promise my roadways are, two times asphalt than you want;
My roadways are great, always roadways plus one;
Vladimir is nothing more than my friend.
Name of Putin is Vladimir.
As long as, Putin eat less roadways;:
China is nothing interesting.
We all know people speaking Chinese are from China.
As long as, Chinese makes less roads;:
I will make economy, for Putin - Chinese will love me;
If it will mean, economy is asphalt in Russia?;:
I will make cat feel good, cat plus one dollar on food;
Make Vladimir roadways to help Russia economy.
Never make china roads!
I show you how great China is, China plus one; You can add numbers to China.
Like Chinese is, China times China makes sense;
Like Chinese is, two times Chinese letter;!
Make Vladimir happy, Vladimir plus one million dollars;
I also show you how great Putin is, Vladimir times Vladimir; You can do number stuff to Putin too!
I will make asphalt roads a lot!
Everybody say cat. You did it? America is great.
```
[Try it online!](https://tio.run/##bVTLbtswELzrKzZ31UhuRX0IgrZAAzRFkUOLHmlrZbHhQyCpGPp6d5YUZaWtD5Yo7uzszC6ZwmTHeAx6TJfL00xHlWhgFSLxK4c5DdqdKLAyZqYzG9Mc@KimyHTWaSDLJSzDdCRFUfUsq@azfD/4bqYX58@R0oAQ71jC7m7ld0dWu6mubpvDJAHgsT7irafZTwWWzh6wNsNHAwhe9s0D@MxZzZGcL3XWmJI3B0FS52Unb8xQRt50u@aRxuCthpCVRUUyHlnwlG@vPjFA0NiuBGdtDB2YDMdIR@@NIB1kQ/H@Q/M0HYeFrs3PpC1HKX/ffGLVLTa1@Xkt8gbV5MxWvXDG9cyGTt53LfX4x1/I36/in73qUALIUY5VHdMUpcJO9z0HdjBNKo47eojjoEyqFsDXNLDdiX1V7heQK3Txt9KGwfmInVfGTkFmtVmozW5CaaFXAd4sPdjUUHG1WuGEgRyWmvYb95ExIFdOkdNJr4ttNU1mlo6clUu5o1sEnTCdaS1j3bpa9cOoTlsdxIHaSOuBrJL6oNlhJr4pm2v9PiXtJLoit2a1yzZIizGVEa58RG61pdEuoRkR8add8xOOoslyHGhkPxqmOLJ6kUBBMuwQQT2syR/UW94aI1MSr9xCvJ0fPnrn7dzmoSm1vluxOSw318KZx550WqCsXFux@SjXsXH0PMWo1f1fPDLDmzmV5drwzstAyemR8UXPBLD2Ye1R8rhrzLgQVHY0Qi6VhSVbmnXKMYkDzJNZkGfuPFXT2@VtbTz9QpycENV15CZ74JApF2u/aqSvvlzhZfbKe3E6sosw65/466TWr4YT@o3z/FbvoMYR/VjXq00WZmqYVOzK50KZ6P@nss7kJk3hrsur3M4vaimmqe9FckEn799eNbXHoZxmDEa62VzcUeWLfZczd7rDsNzTg@Wgj3nKc2W7y@X9Hw "TrumpScript – Try It Online")
First time programming in TrumpScript, it is possible that I reinvented the wheel a few times - 4 lines are dedicated to calculating 2 ^ n. I tried to make it look like something that (drunk) Trump could say. As a bonus, here is a Python script I wrote to verify that I'm doing everything right. There are some differences to the above program, but much of it is directly equivalent.
```
cat = int(input())
dog = 2 ** cat + 1
asphalt = 1
cat = 0
while asphalt < dog:
    roads = asphalt + 1
    roadways = 2 * asphalt + 1
    vladimir = 0
    putin = vladimir
    while putin < roadways:
        china = 0
        chinese = china
        while chinese < roads:
            chair = putin - chinese
            if chair == asphalt:
                cat += 1
                vladimir = roadways
                china = roads
            china += 1
            chinese = 2 * china * china
        vladimir += 1
        putin = vladimir * vladimir
    asphalt = roads
print(cat)
```
[Next sequence!](http://oeis.org/A001589)
[Answer]
# 2. Haskell, 44 bytes, [A000010](https://oeis.org/A000010)
```
f k|n<-k+1=length.filter(==1)$gcd n<$>[1..n]
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00huybPRjdb29A2JzUvvSRDLy0zpyS1SMPW1lBTJT05RSHPRsUu2lBPLy@Wiys3MTNPwVahoCgzr0RB5dCCNAWgpEK0gZ6eoYFB7P//AA "Haskell – Try It Online")
[Next Sequence](https://oeis.org/A000044)
[Answer]
# 30. [Python 1](https://www.python.org/download/releases/1.6.1/), 1112 bytes, [A000046](http://oeis.org/A000046)
```
def rotations(array):
	rotations = []
	for divider_index in range(len(array)):
		rotations.append(array[divider_index:] + array[:divider_index])
	return rotations
def next(array):
	for index in range(len(array) - 1, -1, -1):
		array[index] = 1 - array[index]
		if array[index]: break
	return array
def reverse(array):
	reversed = []
	for index in range(len(array) - 1, -1, -1):
		reversed.append(array[index])
	return reversed
def primitive(array):
	for index in range(1, len(array)):
		if array == array[:index] * (len(array) / index): return 1
	return 0
def necklaces(size):
	previous_necklaces = []
	array = [0] * size
	necklaces = 0
	for iteration in range(2 ** size):
		if not primitive(array) and array not in previous_necklaces:
			necklaces = necklaces + 1
			for rotation in rotations(array):
				complement = []
				for element in rotation:
					complement.append(1 - element)
				previous_necklaces.append(rotation)
				previous_necklaces.append(complement)
				previous_necklaces.append(reverse(rotation))
				previous_necklaces.append(reverse(complement))
		array = next(array)
	return necklaces
```
[Try it online!](https://tio.run/##jVPbbsIwDH1uv8KPDZet3WMlvgQhlFGzRdCkSgMCfr7LvemqDZAqIdvH5/jY6e7qW/BqGBo8ghSKKiZ4X1Ap6Z3UeRZDsIHtLs@OQkLDrqxBuWe8wRswDpLyLyzOyD3OAEfkG@065I3LbSfgegdLcPF6ktgRTY3qIvkoKs@NRo43Ncozcv6UAWuoVrC2n5XkmByBnqfSBWlIV7DjJFLDp0R6ilpszumQeEXZY@KUCzSJUa8rC@CpVzMrfJVT0EnWMsWu@K8dmuPXYsKMsNkE770lC0g1vrtWpAZPX0UhZdjF4XSmB@yLnj3QNO@0RCYu/T6mvB2eEbaloTHleZbWlF68Qmm3PQ7wAQsHCOK5ULPZgfLGT2XSGjxXYuATzvH/0syWWQXh3KyA@XvQv4NouzO2yJWfzSPRBxOgAySIsF9zer6e2Jq53FAaej2rG0medvSnGzu/CkgoSHhO1sf4JOOFxB6DXhVXRUu7IsZW4TZLQsjwAw "Python 1 – Try It Online")
Not even going to bother to golf this. Hey, it's not my longest Python answer on this site!
[Next sequence](http://oeis.org/A001112)
[Answer]
# 9. [Pyth](https://github.com/isaacg1/pyth), 19 bytes, [A000025](https://oeis.org/A000025)
```
?>Q0sm@_B1-edld./Q1
```
[Test suite](http://pyth.herokuapp.com/?code=%3F%3EQ0sm%40_B1-edld.%2FQ1&test_suite=1&test_suite_input=0%0A1%0A2%0A3%0A4%0A5%0A6%0A7%0A8%0A9&debug=0).
[Next sequence](https://oeis.org/A000019)
> 
> a(n) = number of partitions of n with even rank minus number with odd rank. The rank of a partition is its largest part minus the number of parts.
> 
> 
> 
[Answer]
# 308. [ENIAC (simulator)](http://www.historicsimulations.com/Eniac/eniac.html), 3025 bytes, [A006060](http://oeis.org/A006060)
Pseudocode: 
```
repeat{
    M←input
    N←-M
    A←1
    B←253
    while(N<0){
        C←60
        C←C-A
        repeat(194){
            C←C+B
        }
        A←B
        B←C
        N←N+1
    }
    output←A
}
```
No online simulator, execution result: 
[![Card reader input](https://i.stack.imgur.com/v2DNh.png)](https://i.stack.imgur.com/v2DNh.png)
[![Punch card output](https://i.stack.imgur.com/wJBcY.png)](https://i.stack.imgur.com/wJBcY.png)
Registers and constants: 
```
A: 1-2
B: 3-4
C: 5-6
M: 7
N: 8
input: const. A
253: const. J
60: const. K
194: Master programmer decade limit 1B
```
Program signal flow and data flow: 
[![Program signal flow and data flow chart](https://i.stack.imgur.com/rtNMc.png)](https://i.stack.imgur.com/rtNMc.png)
[Full "code"](https://pastebin.com/yjaUvDNi) on pastebin or in HTML comments in the markup of this answer, to prevent linkrot and a quite long answer to scroll through at the same time. This is fun!
[Next sequence](http://oeis.org/A003025)
[Answer]
# 8. Mathematica (10.1), 25 bytes, [A000070](http://oeis.org/A000070)
```
Tr@PartitionsP@Range@#+1&
```
[Next sequence](http://oeis.org/A000025)
[Answer]
# 206. [Proton](https://github.com/alexander-liao/proton), 3275 bytes, [A000109](https://oeis.org/A000109)
```
# This took me quite a while to write; if it's wrong, please tell me and I'll try to fix it without changing the byte count..
permutations = x => {
	if len(x) == 0 return [ ]
	if len(x) == 1 return [x]
	result = []
	for index : range(len(x)) {
		for permutation : permutations(x[to index] + x[index + 1 to]) {
			result.append([x[index]] + permutation)
		}
	}
	return result
}
adjacency = cycles => {
	cycles = cycles[to]
	size = cycles.pop()
	matrix = [[0] * size for i : range(size)]
	for cycle : cycles {
		i, j, k = cycle[0], cycle[1], cycle[2]
		matrix[i][j] = matrix[i][k] = matrix[j][i] = matrix[j][k] = matrix[k][i] = matrix[k][j] = 1
	}
	return matrix
}
transform = a => [[a[j][i] for j : range(len(a[i]))] for i : range(len(a))]
isomorphic = (a, b) => {
	return any(sorted(b) == sorted(transform(A)) for A : permutations(transform(a)))
}
intersection = (a, b) => [x for x : a if x in b]
union = (a, b) => [x for x : a if x not in b] + list(b)
validate = graph => {
	matrix = adjacency(graph)
	rowsums = map(sum, matrix)
	r = 0
	for s : rowsums if s + 1 < graph[-1] r++
	return 2 || r
}
graphs = nodes => {
	if nodes <= 2 return []
	if nodes == 3 return [[(0, 1, 2), 3]]
	result = []
	existing = []
	for graph : graphs(nodes - 1) {
		graph = graph[to]
		next = graph.pop()
		for index : range(len(graph)) {
			g = graph[to]
			cycle = g.pop(index)
			n = g + [(cycle[0], cycle[1], next), (cycle[1], cycle[2], next), (cycle[2], cycle[0], next), next + 1]
			N = sorted(adjacency(n))
			if N not in existing {
				existing += [sorted(transform(a)) for a : permutations(transform(adjacency(n)))]
				result.append(n)
			}
			for secondary : index .. len(graph) - 1 {
				g = graph[to]
				c1 = g.pop(index)
				c2 = g.pop(secondary)
				q = union(c1, c2)
				g = [k for k : g if len(intersection(k, intersection(c1, c2))) <= 1]
				if len(intersection(c1, c2)) == 2 {
					for i : range(3) {
						for j : i + 1 .. 4 {
							if len(intersection(q[i, j], intersection(c1, c2))) <= 1 {
								g.append((q[i], q[j], next))
							}
						}
					}
				}
				g.append(next + 1)
				N = sorted(adjacency(g))
				if N not in existing {
					existing += [sorted(transform(a)) for a : permutations(transform(adjacency(g)))]
					result.append(g)
				}
				for tertiary : secondary .. len(graph) - 2 {
					g = graph[to]
					c1 = g.pop(index)
					c2 = g.pop(secondary)
					c3 = g.pop(tertiary)
					q = union(union(c1, c2), c3)
					g = [k for k : g if len(intersection(k, intersection(c1, c2))) <= 1 and len(intersection(k, intersection(c2, c3))) <= 1]
					if len(q) == 5 and len(intersection((q1 = intersection(c1, c2)), (q2 = intersection(c2, c3)))) <= 1 and len(q1) == 2 and len(q2) == 2 {
						for i : range(4) {
							for j : i + 1 .. 5 {
								if len(intersection(q[i, j], q1)) <= 1 and len(intersection(q[i, j], q2)) <= 1 {
									g.append((q[i], q[j], next))
								}
							}
						}
						g.append(next + 1)
						N = sorted(adjacency(g))
						if N not in existing {
							existing += [sorted(transform(a)) for a : permutations(transform(adjacency(g)))]
							result.append(g)
						}
					}
				}
			}
		}
	}
	return [k for k : result if max(sum(k[to -1], tuple([]))) + 1 == k[-1] and validate(k)]
}
x = graphs(int(input()) + 3)
print(len(x))
```
[Try it online!](https://tio.run/##tVdNb@M2ED1bv2KAHpaqFcOWdy/pusAee9lTb4IOjMzItGxKlqhGbje/PZ0hKUqWHadAWyCxxfme4XsUXdWlLtXb20/w@042oMuygKOAUyu1AA4vO3kQKIWXGgW/gHwGqT81uCxVHkF1ELxBvTgcyIurLfz2CZ91fSanZ9mhObxIvStbDdmOq1yqHPROwNMZE2Rlq/RiEQSVqI@t5lqWqoENdLD5Ff4KZpjuIBTrQthsYAm10G2tIIF0olp5VYeqWjTtQWOYBBfPZQ1SbUUHj1BjfsGsW0jxjXaUG23GlbAuwS6Mdwpz6BIbaI75dJnaCC7bgleVUFuWOKOUHEaxQjR9DejPVWrdgtcg4Ns9z4TKzlhxds4OonHd9wsnxVqwn0b@KbxoUZUVw9BHrmucNXacLFP4GYyR6dx3TaLQzcM4o8YloDZkBPsIij4yhonc08o/xejuUiUyTfYpWg/LYrTcpyi5WI61xaW2cKFW4/FYHY1HY/0NVn1EE06TSRLuElAv@4t95SgOw3TSu9GgOAhkUx7LutrJDKMxHsFT6Ibt8nJ1Zk1Za7FlTwZabuGrYN8QOhT@2xQsgwnmCql0qbSoG5EZaI3zJZ0JQZjkxCmkiYInrK9VH5uqUltzRNhBNhoLDYI/@EFuuSZo5DWvdq4rDwwPMmbUiJm6fGnaY2P2oWL4GLmhkw6lS4uVhqboTDF9Y9D/1SZJHlYp1PO5n14MP35ATa0bPQVX5dYDGv3t8usGTXvKpiMFDnztFQlbRrCKIA4jWKdTYosOe6fTZOC57fzRfjfMhnyAlWWqm4sr3ZBppkSne1FPpneODDs3R/p8EsdylYQmivGmUDPazBxnlrBbvKL02By7ZtpUF3vdctCZ6nE/TAXfwYN12GwVmipwvt973Pi5mUaGMc5xjldg5w7s/A7Yx8lCU8rkTDSHH3HbjhYJUaotx1fEoxvzYgHDhGnDXG1XU55lqxsznmWxl/rgVnNCheEUyxBIWRz6uElhGisILuBeJmO@siKCi7ULgANB9NqRz2759XaE5dg1Mrs8j9ZhL5/1R5g0vMJBfPaqm9FPCZ3U6d3ahgizvN8DckSvU7Lv4RP2Rq/Bxbf9sp/evUeadboJtdxFvIO1/xJsuQfbBG15OGqAwuGctLRwG6A3hZzfqWvMvQO6O6ibZWuv6rM7zQDIC1jixzocCviX4DQXsY99YpP1AtA95k4Gvl9uB2InGsjN/HheneIrZZ9oUt1p5UjiBfElaya0@TzQ5po3X0aov0sczHpvSoNdfE2nf8QnT6gps96j0weEuk@p/4tU79Dq1jHxOr3bjuDrXtnYwZF3dMtgBd2pH@hdp1v8/cCSlIBBu4hbX5grBW1Mf6FhBVaEF4qu52VD@4X/VauZcUTiVDXJ3MX@7W35Nw "Proton – Try It Online")
[Next Sequence](https://oeis.org/A003275)
[Answer]
# 15. CJam, 85 bytes, [A000060](https://oeis.org/A000060)
```
{ee\f{\~\0a*@+f*}:.+}:C;2,qi:Q,2f+{_ee1>{~2*\,:!X*X<a*~}%{CX<}*W=+}fX_0a*1$_C.- .+Q)=
```
[Online demo](http://cjam.aditsu.net/#code=%7Bee%5Cf%7B%5C~%5C0a*%40%2Bf*%7D%3A.%2B%7D%3AC%3B2%2Cqi%3AQ%2C2f%2B%7B_ee1%3E%7B~2*%5C%2C%3A!X*X%3Ca*~%7D%25%7BCX%3C%7D*W%3D%2B%7DfX_0a*1%24_C.-%20.%2BQ)%3D&input=5)
[Next sequence](https://oeis.org/A000085)
### Dissection
OEIS gives
> 
> G.f.: S(x)+S(x^2)-S(x)^2, where S(x) is the generating function for A000151. - Pab Ter, Oct 12 2005
> 
> 
> 
where
$$\begin{eqnarray\*}S(x) & = & x \prod\_{i \ge 1} \frac{1}{(1 - x^i)^{2s(i)}} \\ & = & x \prod\_{i \ge 1} (1 + x^i + x^{2i} + \ldots)^{2s(i)}\end{eqnarray\*}$$
```
{           e# Define a block to convolve two sequences (multiply two polynomials)
  ee\f{     e#   Index one and use the other as an extra parameter for a map
    \~\0a*  e#     Stack manipulations; create a sequence of `index` 0s
    @+f*    e#     Shift the extra parameter poly and multiply by the coefficient
  }
  :.+       e#   Fold pointwise add to sum the polys
}:C;        e# Assign the block to C (for "convolve")
2,          e# Initial values of S: S(0) = 0, S(1) = 1
qi:Q        e# Read integer and assign it to Q
,2f+{       e# For X = 2 to Q+1
  _ee1>     e#   Duplicate accumulator of S, index, and ditch 0th term
  {         e#   Map (over notional variable i)
    ~2*\    e#     Double S(i) and flip i to top of stack
    ,:!     e#     Create an array with a 1 and i-1 0s
    X*X<    e#     Replicate X times and truncate to X values
            e#     This gives g.f. 1/(1-x^i) to the first X terms
    a*~     e#     Create 2S(i) copies of this polynomial
  }%
  {CX<}*    e#   Fold convolution and truncation to X terms
  W=+       e#   Append the final coefficient, which is S(X), to the accumulator
}fX
_0a*        e# Pad a copy to get S(X^2)
1$_C        e# Convolve two copies to get S(X)^2
.-          e# Pointwise subtraction
 .+         e# Pointwise addition. Note the leading space because the parser thinks
            e# -. is an invalid number
Q)=         e# Take the term at index Q+1 (where the +1 adjusts for OEIS offset)
```
[Answer]
# 67. [LOLCODE](http://lolcode.org/), 837 bytes, [A000043](https://oeis.org/A000043)
```
HAI 1.2
  CAN HAS STDIO?
  I HAS A CONT ITZ 0
  I HAS A ITRZ ITZ 1
  I HAS A NUMBAH
  GIMMEH NUMBAH
  NUMBAH R SUM OF NUMBAH AN 1
  IM IN YR GF
    ITRZ R SUM OF ITRZ AN 1
    I HAS A PROD ITZ 1
    IM IN YR MOM UPPIN YR ASS WILE DIFFRINT ITRZ AN SMALLR OF ITRZ AN ASS
      PROD R PRODUKT OF PROD AN 2
    IM OUTTA YR MOM
    PROD R DIFF OF PROD AN 1
    I HAS A PRAIME ITZ WIN
    I HAS A VAR ITZ 1
    IM IN YR MOM
      VAR R SUM OF VAR AN 1
      BOTH SAEM VAR AN PROD, O RLY?
        YA RLY, GTFO
      OIC
      BOTH SAEM 0 AN MOD OF PROD AN VAR, O RLY?
        YA RLY
          PRAIME R FAIL
          GTFO
      OIC
    IM OUTTA YR MOM
    BOTH SAEM PRAIME AN WIN, O RLY?
      YA RLY, CONT R SUM OF CONT AN 1
    OIC
    BOTH SAEM NUMBAH AN CONT, O RLY?
      YA RLY, GTFO
    OIC
  IM OUTTA YR GF
  VISIBLE ITRZ
KTHXBYE
```
My capslock key is bound to escape, so I wrote this entire thing while holding shift ..
[Try it online!](https://tio.run/##dVJBbsIwELznFfMAVAFSz2gDCVkRx8h2oOHa9obE/0@pvU6MgXJKZjyemV35ert@335@x7EhxupjXQBb6tCQhXU71htPsEDCVncO7C5YZiQ7cxFylZFdr0pqPLFnparmjuMPDGyvoOsZ@8RVEe4rcIfBYF97hGiexIJm6T3saPQuNcg8lFboj8cIyFqcua2w47o2LINEN6uobU3u77XihGht5NMfXNAI4zXrOUv3ztEUV2R3Qk5@4aU0saqk9pm7h6MTmTfjTK2CIC0lALGPZ6V2DSxVaj4I@QtomHbYTBpgoIAX2LtaT6Tm7YvFMhgo3z@bw9u@sUsQ83QGNXGb8f/kPa@weKwwOflgv6an4HkKeZdpIYLSRkLMk@X9zQXpG8/UNPbMW8rbPLHlsq3kzRQH13yVQzWOn38)
[Next sequence](https://oeis.org/A000837)
[Answer]
# 10. Magma, 65 bytes, [A000019](https://oeis.org/A000019)
```
f:=function(n);return NumberOfPrimitiveGroups(n+1);end function;
```
Try it [here](http://magma.maths.usyd.edu.au/calc/)
lol builtin
[Next sequence](https://oeis.org/A000065)
[Answer]
# 281. Java 5, 11628 bytes, [A000947](https://oeis.org/A947)
```
// package oeis_challenge;
import java.util.*;
import java.lang.*;
class Main {
//  static void assert(boolean cond) {
//      if (!cond)
//          throw new Error("Assertion failed!");
//  }
    /* Use the formula a(n) = A000063(n + 2) - A000936(n).
    It's unfair that I use the formula of "number of free polyenoid with n
    nodes and symmetry point group C_{2v}" (formula listed in A000063)
    without understanding why it's true...
    */
    static int catalan(int x) {
        int ans = 1;
        for (int i = 1; i <= x; ++i)
            ans = ans * (2*x+1-i) / i;
        return ans / -~x;
    }
    static int A63(int n) {
        int ans = catalan(n/2 - 1);
        if (n%4 == 0) ans -= catalan(n/4 - 1);
        if (n%6 == 0) ans -= catalan(n/6 - 1);
        return ans;
    }
    static class Point implements Comparable<Point> {
        final int x, y;
        Point(int _x, int _y) {
            x = _x; y = _y;
        }
        /// @return true if this is a point, false otherwise (this is a vector)
        public boolean isPoint() {
            return (x + y) % 3 != 0;
        }
        /// Translate this point by a vector.
        public Point add(Point p) {
            assert(this.isPoint() && ! p.isPoint());
            return new Point(x + p.x, y + p.y);
        }
        /// Reflect this point along x-axis.
        public Point reflectX() {
            return new Point(x - y, -y);
        }
        /// Rotate this point 60 degrees counter-clockwise.
        public Point rot60() {
            return new Point(x - y, x);
        }
        @Override
        public boolean equals(Object o) {
            if (!(o instanceof Point)) return false;
            Point p = (Point) o;
            return x == p.x && y == p.y;
        }
        @Override
        public int hashCode() {
            return 21521 * (3491 + x) + y;
        }
        public String toString() {
            // return String.format("(%d, %d)", x, y);
            return String.format("setxy %d %d", x * 50 - y * 25, y * 40);
        }
        public int compareTo(Point p) {
            int a = Integer.valueOf(x).compareTo(p.x);
            if (a != 0) return a;
            return Integer.valueOf(y).compareTo(p.y);
        }
        /// Helper class.
        static interface Predicate {
            abstract boolean test(Point p);
        }
        static abstract class UnaryFunction {
            abstract Point apply(Point p);
        }
    }
    static class Edge implements Comparable<Edge> {
        final Point a, b; // guarantee a < b
        Edge(Point x, Point y) {
            assert x != y;
            if (x.compareTo(y) > 0) { // y < x
                a = y; b = x;
            } else {
                a = x; b = y;
            }
        }
        public int compareTo(Edge e) {
            int x = a.compareTo(e.a);
            if (x != 0) return x;
            return b.compareTo(e.b);
        }
    }
    /// A graph consists of multiple {@code Point}s.
    static class Graph {
        private HashMap<Point, Point> points;
        public Graph() {
            points = new HashMap<Point, Point>();
        }
        public Graph(Graph g) {
            points = new HashMap<Point, Point>(g.points);
        }
        public void add(Point p, Point root) {
            assert(p.isPoint());
            assert(root.isPoint());
            assert(p == root || points.containsKey(root));
            points.put(p, root);
        }
        public Graph map(Point.UnaryFunction fn) {
            Graph result = new Graph();
            for (Map.Entry<Point, Point> pq : points.entrySet()) {
                Point p = pq.getKey(), q = pq.getValue();
                assert(p.isPoint()) : p;
                assert(q.isPoint()) : q;
                p = fn.apply(p); assert(p.isPoint()) : p;
                q = fn.apply(q); assert(q.isPoint()) : q;
                result.points.put(p, q);
            }
            return result;
        }
        public Graph reflectX() {
            return this.map(new Point.UnaryFunction() {
                public Point apply(Point p) {
                    return p.reflectX();
                }
            });
        }
        public Graph rot60() {
            return this.map(new Point.UnaryFunction() {
                public Point apply(Point p) {
                    return p.rot60();
                }
            });
        }
        @Override
        public boolean equals(Object o) {
            if (o == null) return false;
            if (o.getClass() != getClass()) return false;
            Graph g = (Graph) o;
            return points.equals(g.points);
        }
        @Override
        public int hashCode() {
            return points.hashCode();
        }
        Graph[] expand(Point.Predicate fn) {
            List<Graph> result = new ArrayList<Graph>();
            for (Point p : points.keySet()) {
                int[] deltaX = new int[] { -1, 0, 1, 1,  0, -1};
                int[] deltaY = new int[] {  0, 1, 1, 0, -1, -1};
                for (int i = 6; i --> 0;) {
                    Point p1 = new Point(p.x + deltaX[i], p.y + deltaY[i]);
                    if (points.containsKey(p1) || !fn.test(p1)
                        || !p1.isPoint()) continue;
                    Graph g = new Graph(this);
                    g.add(p1, p);
                    result.add(g);
                }
            }
            return result.toArray(new Graph[0]);
        }
        public static Graph[] expand(Graph[] graphs, Point.Predicate fn) {
            Set<Graph> result = new HashSet<Graph>();
            for (Graph g0 : graphs) {
                Graph[] g = g0.expand(fn);
                for (Graph g1 : g) {
                    if (result.contains(g1)) continue;
                    result.add(g1);
                }
            }
            return result.toArray(new Graph[0]);
        }
        private Edge[] edges() {
            List<Edge> result = new ArrayList<Edge>();
            for (Map.Entry<Point, Point> pq : points.entrySet()) {
                Point p = pq.getKey(), q = pq.getValue();
                if (p.equals(q)) continue;
                result.add(new Edge(p, q));
            }
            return result.toArray(new Edge[0]);
        }
        /**
         * Check if two graphs are isomorphic... under translation.
         * @return {@code true} if {@code this} is isomorphic
         * under translation, {@code false} otherwise.
         */
        public boolean isomorphic(Graph g) {
            if (points.size() != g.points.size()) return false;
            Edge[] a = this.edges();
            Edge[] b = g.edges();
            Arrays.sort(a);
            Arrays.sort(b);
            // for (Edge e : b)
                // System.err.println(e.a + " - " + e.b);
            // System.err.println("------- >><< ");
            assert (a.length > 0);
            assert (a.length == b.length);
            int a_bx = a[0].a.x - b[0].a.x, a_by = a[0].a.y - b[0].a.y;
            for (int i = 0; i < a.length; ++i) {
                if (a_bx != a[i].a.x - b[i].a.x || 
                    a_by != a[i].a.y - b[i].a.y) return false;
                if (a_bx != a[i].b.x - b[i].b.x || 
                    a_by != a[i].b.y - b[i].b.y) return false;
            }
            return true;
        }
        // C_{2v}.
        public boolean correctSymmetry() {
            Graph[] graphs = new Graph[6];
            graphs[0] = this.reflectX();
            for (int i = 1; i < 6; ++i) graphs[i] = graphs[i-1].rot60();
            assert(graphs[5].rot60().isomorphic(graphs[0]));
            int count = 0;
            for (Graph g : graphs) {
                if (this.isomorphic(g)) ++count;
                // if (count >= 2) {
                    // return false;
                // }
            }
            // if (count > 1) System.err.format("too much: %d%n", count);
            assert(count > 0);
            return count == 1; // which is, basically, true
        }
        public void reflectSelfType2() {
            Graph g = this.map(new Point.UnaryFunction() {
                public Point apply(Point p) {
                    return new Point(p.y - p.x, p.y);
                }
            });
            Point p = new Point(1, 1);
            assert (p.equals(points.get(p)));
            points.putAll(g.points);
            assert (p.equals(points.get(p)));
            Point q = new Point(0, 1);
            assert (q.equals(points.get(q)));
            points.put(p, q);
        }
        public void reflectSelfX() {
            Graph g = this.reflectX();
            points.putAll(g.points); // duplicates doesn't matter
        }
    }
    static int A936(int n) {
        // if (true) return (new int[]{0, 0, 0, 1, 1, 2, 4, 4, 12, 10, 29, 27, 88, 76, 247, 217, 722, 638, 2134, 1901, 6413})[n];
        // some unreachable codes here for testing.
        int ans = 0;
        if (n % 2 == 0) { // reflection type 2. (through line 2x == y)
            Graph[] graphs = new Graph[1];
            graphs[0] = new Graph();
            Point p = new Point(1, 1);
            graphs[0].add(p, p);
            for (int i = n / 2 - 1; i --> 0;)
                graphs = Graph.expand(graphs, new Point.Predicate() {
                    public boolean test(Point p) {
                        return 2*p.x > p.y;
                    }
                });
            int count = 0;
            for (Graph g : graphs) {
                g.reflectSelfType2();
                if (g.correctSymmetry()) {
                    ++count;
                    // for (Edge e : g.edges())
                        // System.err.println(e.a + " - " + e.b);
                    // System.err.println("------*");
                    }
                // else System.err.println("Failed");
            }
            assert (count%2 == 0);
            // System.err.println("A936(" + n + ") count = " + count + " -> " + (count/2));
            ans += count / 2;
        }
        // Reflection type 1. (reflectX)
        Graph[] graphs = new Graph[1];
        graphs[0] = new Graph();
        Point p = new Point(1, 0);
        graphs[0].add(p, p);
        if (n % 2 == 0) graphs[0].add(new Point(2, 0), p);
        for (int i = (n-1) / 2; i --> 0;)
            graphs = Graph.expand(graphs, new Point.Predicate() {
                public boolean test(Point p) {
                    return p.y > 0;
                }
            });
        int count = 0;
        for (Graph g : graphs) {
            g.reflectSelfX();
            if (g.correctSymmetry()) {
                ++count;
                // for (Edge e : g.edges())
                    // System.err.printf(
                // "pu %s pd %s\n"
                // // "%s - %s%n"
                // , e.a, e.b);
                // System.err.println("-------/");
            }
            // else System.err.println("Failed");
        }
        if(n % 2 == 0) {
            assert(count % 2 == 0);
            count /= 2;
        }
        ans += count;
        // System.err.println("A936(" + n + ") = " + ans);
        return ans;
    }
    public static void main(String[] args) {
        // Probably
        if (! "1.5.0_22".equals(System.getProperty("java.version"))) {
            System.err.println("Warning: Java version is not 1.5.0_22");
        }
        // A936(6);
        for (int i = 0; i < 20; ++i)
            System.out.println(i + " | " + (A63(i+9) - A936(i+7)));
        //A936(i+2);
    }
}
```
[Try it online!](https://tio.run/##zVp7b9s4Ev/fn2LiQ3alxJYtJ3XbTRO0KLqPu1u02O7e7aJXFLRN22plSZbkxLqs76v3ZkjqTSppryjOSGtZmhdnhr8ZknrPrtkwjHjwfvHh8cePo5Pe63DDIWKLhResIA0h5my@BtedTh7BLEt54vT@Uvn0Tka93miEHPMPbMUh5F7ybr5mvs@DFb/o9bxNFMYpvEdFzi71fOfkonbPZ8GK7vXmPksS@Jl5AdwKkZCkLPXmcB16C8BnPE6tWRj6nAUwD4OFjXRERh9vCdaRuFncok@6jsMbCPgNvIjjMLb6z4QYLwxgyTyfL4769oXgOPR6xDA6gd8SjnwclmG82fkMmBXYcAnPxviZnlkBnMLEhqG48fhsik8dwfpT@m0CuwDlxsjPUvgJdg1R4RL6wW4z4zFdLmOOng79jAc0whsvXUMgRAXhgifAggUk2WbD0zhDOi9IYRWHuwiev7udXB/6YOVyfS9J@QLQc8pKW4ghieEuRaMWPEZnBiKmN@sMPLI1jXfccaTxFEX6Vi4nXXOWMgyORdd78nXuVLrBggR94l4UN9EUEKSeuI9fTy5hfwGnp57dg8pHctL/J2BNTvan7tCzYQReKSvm6S4OBM0Ihv/ZyyeHloXPMBz0HeitywcQjCYYLtcuFVC2BMfncHkJY1tQD6vk51ryqYl82iAvzdcZLtP8lQgnzgOfb3iQJvA83EQsZjOfPxHPripDWnoB88XA9gPISkWCUHjgHT4Q31nVFfTZoyPeYRwy@q7wKqNEzmP@P1VGU07QeNO1lwD@MZl4A5wuPiZziNkc33h4ZZUU13yehnEZ5Wg383Gg@VT1Emln0zKl0drjhEKzj@EMjtDBRhN/jdGjPku5NE5OiFlWGOA0DZA@RiSz5FXUtEBhColzSiu/@QaOICpvVCJbMZswRRKQ/ZFDkREXmW0cwS986aOpVfuZH@KU3A/ZHm3QDyCWXL@bHFi1ZAjZAIZdJoRpw4PTMSz4CqEoQVDdBSmPh3M/nH@gKJssCtPp@N7m7PXWPH15zePYW3BT3vDtDnPOejl7Tz4Lm@oE4lshpj0h25wjoAq1tp1bIlK2HjyVCDgXZE7YEGqju6e5jkGlZMjkdfZpoyA9a5asnyOUm1w1cR9MXILBs/PHLiYPouwp6PUoqa/TWJZledESjBFWsiWBQxWCpVbfOl4M4Hhh9wcCQ/Q53eBJeLrPkAn/iA0NfTCmkOLF5MFAfJ@P7S5zRRkRwMZ/DU2zUEwDjMhPmHsrHjvXzN/xl0trbzslL8aiYTPFnwnEKALOtKNqys3qcjsmy4/cj7BUC8Qup0JZgHi8ZHMOr2K@8OY0rRrwMkvSmGHu5hmNzVNaeEGrVckuOGWx@C1gcfb9LpiLxsWgRKFdFPmZWYeuFL1YYNumr0T0qF2IlKYBzC4o4VY7pEZncIziE5gVxMSsLMGUkxeZHoIxuTCQWTvA@0qokPeKgn1LSjNUta@RC2lAUmAG1HrUnh6AU/261bLsJUtD/@HeiS08yHV5TdWXVcbAHaZJ4309jffaNJ7VxMxqsa0YSXn7DPtEFq2pSU6wM0yo2cQ@MfUwxnD7dI6QJONxUGldy4cfBG85lij2rim5f0Q0@5lFsj1RAb2SRQQbnaaHhJQWPklqdApVCa1AqxNQpFRp4eozhK8cSdSpRK43yrZhUJS9MDW0EOZ2QREQ7100ERUaIoQ//1SDwZgHKa6Ikr/xTMhosiqyaIfsA2nhnf6DDYvk2Jw6siyD5vAkfcwTzB7lWBXYuhmi@0d3Oy8CXKw0U2QL3@WGcnr@mpMPNJOxLM/R1lnxlEZtD2Bb3PgHYXhTuSEOpNRIuK0TbtuEZMUycCSgIpTeX8W2yrktOe/WKR3t1IO6tU24VEEHyXl36O9qJkUvTPlRtHH1HLF0Yav327UKpKGuaIuc0p62N@oDPdwjsTsb068@NGnMZ47rS7THIQFKsPP9rpZYENLcek7oj07AWlT@6uJUMEzNtLg0NdP51JcGd0Pw/9RPK0UlmVaFsPXNW@D7iAUK5J2yh2uD4N@xhj4RXFd1KHwWxyyrPCWFbVjMQa3AwA/cjIBIgKYtuJ@y35UWeesWhu4AxgNwxR9dDd3DRZeAPxoCSm7BbBBQ28iZ0kbOcIh914Up39XwXKVMAhwtnU7VMN54bwe0fspv/IE3NLMiz0VN4Ytcm0riEYKqaKHxt5adPkQXuVWkJUlesOON2LSzuKxuBBUGE1cOdQYRei8yUCgQJ7LV3bO/Z0ZzJw1FhlmFYW/GbztRUPVxjQzPf4qmMFFluTPjMT21CU9NVflMn@7Kn2PMd6lQlziFSSh4NXaUoWiIIR@VUJeEmhKRkkc5Lk8ea@XWEuCucLlfLV6qp6aVAwUKvxJLiztyCWaAHfHw/64XE7M4h/ttZwAqzheb9LRkFC3P/XuemteFP01OH52clGJO4Pmazz@Ivc6bUKUq4PIKvCTchHG09uaO48i9c0jV3iO2CU5VRr5tqhZVtHt6IJH5b8SRA4h90lxmlbsle5Azimp7KLdbq0pH5o3WXIlphVTB18T7N1fF3qnd6qr4Kl1pzSy6KZW3WiJaUa/0FCJeqC/Epph1PJs1AQbXtiK75YIbM3nWLgRI8zpLUr5xsJFwcKIFqR/QwhvrTx@G@O8U6utnM1d/KD9wdfXkCfSb5qjNC4s5dNiVrsX@xEU3CXZkM3Xd3AmgDvPdTGwZYA47zKEN1Jm6HNCzrHyWlc8yzfzPC/hYnMRArl6ex@j6DtpNI@VHpMErtatLLKta9BRGlTxZyZN1JZJW5axUObuvylmpctatUo/cNGMN@3/qmM0xTbd5GMfYer9WJ3QCvnvaIiexpdJgvJm@rRsnSTCc@cwyrYs0x2zUpImoKiEeCcmvh@5b/UJErUkV3YOCyqmgSGGVrUlVcVgAtQObZrnubAEo/OrkpVSI6HN6KiRf6CY28Ui9V5d0CKtvBMpNcEPmIcGho7zUFQE2nxVoyDfH0zCEzW6@/g6OF8dBfyD9oXdyLmms33ZXnhTxRN036Ik1gvkAZizBDs33s4HI07u2rFTOvOb@8tcs4hNLv5uzynPsq62Fq@sCmq7itKy@825eGxvOb0qZtKQxoG7RhagKh12LFdl2U2q53/LM96sL1E8U2rZ0W7N0bLZ0qxG6tbt3@7Z372JWUuL3u9LBBDkm71CuLnaRLxYRCSxCngTfpoCzI@Vx98GDOLyndydap/dq7lG6F2BuFYvY27FYuxbr2MkAzsWfi1cu3p48xn8PB/Do0QAeTvH6HH9MXPzv4QRJpmeP6OcZcTweo4DpuXt2sN8Eby9qyJ/QOzC7QLz6QgchMBcvZGAzJt7lEAc5dFKmeelgXJEk3huAY5ioNwduJTQJN9N@a4qzFCYO4WAc7lZr8L0Ab4jDx8y@by1xO2pJbcP2c2ZSIUwue@Wq11yRAhiBeNmism/QmuPFGIRl@eIvX52WiFSsUC0TvjQqcu18zcBSPX49oW2Kq/rZrhmMtID0JSrhymkjt75dWjmtpsM0zqKMmkpkvZEuOnXzzsrnNdb3arBPWq21OQQoSBzl6aR9L97p6tudnV8OucI/x2puthcaOvkCs2ic9BJY3y4iT7fktXDFlbghFYwmrXJDQHF6qRhwvlQe1xvQXxpQ4Tq0wyFR2m5vaN6BDXfjggETqm1LNx40Aa9OXQqdkNAGbw1HrGDo2sI3Bhz5MhjyGfhRbO9n1NB9UgNjwIp74UQNI1ol@hOwoau9NkLCfWf00urp5PajHRwnEC3w/38FfR0JUSHJECmwm9ZKGSC6sIEBYrrX76MWvrQ6/k/AlEM14esF3tz9F0R12xUIXBIKtG2rIkW9Q7kPOklcQhnVwRteTqxvIIveccO8wJKvBNGeT7xKaitcNOJVHM6wPcpq8/8I@q7zwBm/m0z6eVOrrMWmFlkidEpm9cXLv9c8ThDe@nYrV3UD/CeLA7TmO/gr8oLipe21IEyhUGp6n0d2nFMj5qitkslY89KqsibcpYU1nsD6PyXUizdRTx@L14JFX3v6sNa8j0bq9sTO3X74@PG/ "Java (OpenJDK 9) – Try It Online")
---
Side note:
1. Tested locally with Java 5. (such that the warning is not printed - see TIO debug tab)
2. Don't. Ever. Use. Java. 1. It's more verbose than Java in general.
3. ~~This may break the chain.~~
4. The gap (7 days and 48 minutes) is no more than the gap created by [this answer](https://codegolf.stackexchange.com/a/144823), which is 7 days and 1 hours 25 minutes later than [the previous one](https://codegolf.stackexchange.com/a/144327).
5. ~~New record on large bytecount!~~ Because I (mistakenly?) use spaces instead of tabs, the bytecount is larger than necessary. On my machine it's [9550](https://oeis.org/A9550) bytes. (at the time of writing this revision)
6. [Next sequence](http://oeis.org/A011628).
7. The code, in its current form, only prints the first 20 terms of the sequence. However it's easy to change so that it will prints first 1000 items (by change the `20` in `for (int i = 0; i < 20; ++i)` to `1000`)
Yay! This can compute more terms than listed on the OEIS page! (for the first time, for a challenge I need to use Java) unless OEIS has more terms somewhere...
---
# Quick explanation
### Explanation of the sequence description.
The sequence ask for the number of free nonplanar polyenoid with symmetry group C2v, where:
* polyenoid: (mathematical model of polyene hydrocarbons) trees (or in degenerate case, single vertex) with can be embedded in hexagonal lattice.
For example, consider the trees
```
      O                O           O      O       (3)
      |                 \         /        \
      |                  \       /          \
O --- O --- O             O --- O            O --- O
      |                                             \
      |                    (2)                       \
 (1)  O                                               O
```
The first one cannot be embedded in the hexagonal lattice, while the second one can. That particular embedding is considered different from the third tree.
* nonplanar polyenoid: embedding of trees such that there exists two overlapping vertices.
`(2)` and `(3)` tree above are planar. This one, however, is nonplanar:
```
   O---O O
  /       \
 /         \
O           O
 \         /
  \       /
   O --- O
```
(there are 7 vertices and 6 edges)
* free polyenoid: Variants of one polyenoid, which can be obtained by rotation and reflection, is counted as one.
![](https://i.stack.imgur.com/Jr65M.png)
* C2v group: The polyenoid are only counted if they have 2 perpendicular planes of reflection, and no more.
For example, the only polyenoid with 2 vertices
```
O --- O
```
has 3 planes of reflection: The horizontal one `-`, the vertical one `|`, and the one parallel to the computer screen `■`. That's too much.
On the other hand, this one
```
O --- O
       \
        \
         O
```
has 2 planes of reflection: `/` and `■`.
---
### Explanation of the method
And now, the approach on how to actually count the number.
First, I take the formula `a(n) = A000063(n + 2) - A000936(n)` (listed on the OEIS page) for granted. I didn't read the explanation in the paper.
[TODO fix this part]
Of course, counting planar is easier than counting nonplanar. That's what the paper does, too.
> 
> Geometrically planar polyenoids (without overlapping vertices) are enumerated by computer
>  programming. Thus the numbers of geometrically nonplanar polyenoids become accessible.
> 
> 
> 
So... the program counts the number of planar polyenoid, and subtract it from the total.
Because the tree is planar anyway, it obviously has the `■` plane of reflection. So the condition boils down to "count number of tree with an axis of reflection in its 2D representation".
The naive way would be generate all trees with `n` nodes, and check for correct symmetry. However, because we only want to find the number of trees with an axis of reflection, we can just generate all possible half-tree on one half, mirror them through the axis, and then check for correct symmetry. Moreover, because the polyenoids generated are (planar) trees, it must touch the axis of reflection exactly once.
The function `public static Graph[] expand(Graph[] graphs, Point.Predicate fn)` takes an array of graphs, each have `n` nodes, and output an array of graph, each has `n+1` nodes, not equal to each other (under translation) - such that the added node must satisfy the predicate `fn`.
Consider 2 possible axes of reflection: One that goes through an vertex and coincide with edges (`x = 0`), and one that is the perpendicular bisector of an edge (`2x = y`). We can take only one of them because the generated graphs are isomorphic, anyway.  
[![](https://i.stack.imgur.com/1USCZm.png)](https://i.stack.imgur.com/1USCZ.png)
So, for the first axis `x = 0`, we start from the base graph consists of a single node `(1, 0)` (in case `n` is odd) or two nodes with an edge between `(1, 0) - (2, 0)` (in case `n` is even), and then expand nodes such that `y > 0`. That's done by the "Reflection type 1" section of the program, and then for each generated graph, reflect (mirror) itself through the X axis `x = 0` (`g.reflectSelfX()`), and then check if it has the correct symmetry.
However, note that if `n` is divisible by 2, by this way we counted each graph twice, because we also generate its mirror image by the axis `2x = y + 3`.  
[![](https://i.stack.imgur.com/SGf7Um.png)](https://i.stack.imgur.com/SGf7U.png)
(note the 2 orange ones)
Similar for the axis `2x = y`, if (and only if) `n` is even, we start from the point `(1, 1)`, generate graphs such that `2*x > y`, and reflect each of them over the `2x = y` axis (`g.reflectSelfType2()`), connect `(1, 0)` with `(1, 1)`, and check if they have correct symmetry. Remember to divide by 2, too.
[Answer]
# 24. [Julia 0.5](http://julialang.org/), 33 bytes, [A000023](https://oeis.org/A000023)
Expansion of [e.g.f.](https://en.wikipedia.org/wiki/Generating_function#Exponential_generating_function_.28EGF.29) exp(−2\*x)/(1−x).
```
!x=foldl((a,b)->a*b+(-2)^b,1,1:x)
```
[Try it online!](https://tio.run/##yyrNyUw0/f9fscI2LT8nJUdDI1EnSVPXLlErSVtD10gzLknHUMfQqkLzf0FRZl6JhqKhgeZ/EwA "Julia 0.5 – Try It Online")
[Next sequence.](https://oeis.org/A000033)
[Answer]
# 91. [Python 2 (PyPy)](http://pypy.org/), 1733 bytes, [A000066](https://oeis.org/A000066)
```
import itertools
girth = int(input()) + 3
v = 4
r = range
def p(v):
	a = [0 for i in r(v)]
	k = int((v * 2) ** .5)
	a[k - 1] = a[k - 2] = a[k - 3] = 1
	j = len(a) - 1
	for i in r(1, 3):
		a[j] = 1
		j -= i
	yield [x for x in a]
	while not all(a):
		for index in r(len(a) - 1, -1, -1):
			a[index] ^= 1
			if a[index]: break
		yield [x for x in a]
def wrap_(p, v):
	m = [[0 for j in r(v)] for i in r(v)]
	k = 0
	for i in r(0, v - 1):
		for j in r(i + 1, v):
			m[i][j] = m[j][i] = p[k]
			k += 1
	return m
def completes_cycle(edgelist):
	if not edgelist or not edgelist[1:]: return False
	start = edgelist[0]
	edge = edgelist[0]
	e = [x for x in edgelist]
	edgelist = edgelist[1:]
	while edgelist:
		_edges = [_edge for _edge in edgelist if _edge[0] in edge or _edge[1] in edge]
		if _edges:
			edgelist.remove(_edges[0])
			if _edges[0][1] in edge: _edges[0] = (_edges[0][1], _edges[0][0])
			edge = _edges[0]
		else:
			return False
	flat = sum(e, ())
	for i in flat:
		if flat.count(i) != 2: return False
	return edge[1] in start
def powerset(a):
	return sum([list(itertools.combinations(a, t)) for t in r(len(a))], [])
while True:
	ps = (v * (v - 1)) // 2
	skip = False
	for Q in p(ps):
		m = wrap_(Q, v)
		output = [row + [0] for row in m]
		output.append([0 for i in r(len(m[0]))])
		for i in r(len(m)):
			output[i][-1] = sum(m[i])
			output[-1][i] = sum(row[i] for row in m)
		if all(map(lambda x: x == 3, map(sum, m))):
			edges = []
			for i in r(v):
				for j in r(i, v):
					if m[i][j]: edges.append((i, j))
			for edgegroup in powerset(edges):
				if completes_cycle(list(edgegroup)):
					if len(edgegroup) == girth:
						print(v)
						exit(0)
					else:
						skip = True
						break
		if skip: break
	v += 1
```
[Try it online!](https://tio.run/##bVVLbyIxDD5PfoX3lrQD5dG9IHHde6W9jdgqhUAD84gy4fXrWdvJDENbJERiO5/tzw/cNXw29Wzkru56u9nKNT6ADcaHpilbIXbWh09Ygq2DtLU7BqkUPMNciBNKX4Xw@ON1vTNCbMwWnDyphcg0SosJbBsPFt@CR/FKZIeEJE/wBDMFT08w/q3QvDjACKYrVMfj7H6c03Eqsj3@lKaWWpGpyAbY0xzm5BVx9skazUfoS2RXa8oNFBeO5UL2GgM5f9rSQN0E0GWJkPSYAeuNuUTQu68cRvxlK/TBRiv4Fx1ldgudbAEf3ugDSn90ywydvXbv0uXARFVEVGJq3zP1I3GTh5wnCEDB9aGn1xarM03gWVYVdhU5qfAHL3hyxWFFugM8cwbehKOvoYrhrZvKlSaY9n19XZdGms3OlLYNhIeZEmWdCNDr8F5MF8hAgvujy9aIrA0aG2p5t5mgb7p8kxERA7o6ZTJnf8sHV10VOxkl/E6XlqD4xHDxNIAEzIOF6LiTQ2dYTHsZsdSZtkxnhzD2pmpORkYVwqjUCL1gALO4SzEwOTTJBw8SSOKml6PMIJPs/pHabamJkvZYSZMDzuWgP0i3iOHTcbxujjTACn4tYfa1Ruk2yJ6rlga6ORvfmhCHJJmSz4KIkP2qQBfVh611sE3dSp1DwEVB8YThOClMucBERSzdX3@kzBxVjHeCjD2t4OUFZtg9B@tQ1SWMaG@E5qRrub9peuI8vVHLo6Q5BlxS1AC@OeMoEOn0jm74slr1NmPtnKk38nFNUZgV1UJxOb5qVByriECzNeKlRXzQqKmBEjVx3kiJ7ukyjETF8tD@qbSTpa4@NhouC2z/5RLmOZAU3@JBJbd9c/P8PuwI1j/sgX4HsJu0CBZc5bbLnaz2SnVopNv55uiY5K7w/CJB2e8Lgtugf6kGPomxu4Ky4n@TZJA5T38FXDX6mIsNcpJufcvjJzUB9UqSdEsWfZCy37on3mi32/Q/ "Python 2 (PyPy) – Try It Online")
I hope using Python 2 PyPy counts as another major version. If someone could get me a Python 0 interpreter, I could use that too, but I hope this is valid.
This starts at 1 vertex and works up, creating the adjacency matrix representation of every possible undirected graph with that many vertices. If it is trivalent, then it will look through the powerset of the edges, which will be sorted by length. If the first cycle it finds is too short, then it will move on. If the first cycle it finds matches the input (offset by 3) then it will output the correct vertex count and terminate.
[Next Sequence](https://oeis.org/A001733) <-- have an easy one as a break from all this math nonsense :D
**EDIT**: I added some optimizations to make it a bit faster (still can't compute the third term within TIO's 60 second limit though) without changing the bytecount.
[Answer]
# 156. C# (Mono), 2466 bytes, [A000083](https://oeis.org/A000083)
Note: the score is 2439 bytes for the code and 27 for the compiler flag  `-reference:System.Numerics`.
```
using Num = System.Numerics.BigInteger;
namespace PPCG
{
    class A000083
    {
        static void Main(string[] a)
        {
            int N = int.Parse(a[0]) + 1;
            var phi = new int[N + 1];
            for (int i = 1; i <= N; i++)
                phi[i] = 1;
            for (int p = 2; p <= N; p++)
            {
                if (phi[p] > 1) continue;
                for (int i = p; i <= N; i += p)
                    phi[i] *= p - 1;
                int pa = p * p;
                while (pa <= N)
                {
                    for (int i = pa; i <= N; i += pa)
                        phi[i] *= p;
                    pa *= p;
                }
            }
            var aik = new Num[N + 1, N + 1];
            var a035350 = new Num[N + 1];
            var a035349 = new Num[N + 1];
            aik[0, 0] = aik[1, 1] = a035350[0] = a035350[1] = a035349[0] = a035349[1] = 1;
            for (int n = 2; n <= N; n++)
            {
                // A000237 = EULER(A035350)
                Num nbn = 0;
                for (int k = 1; k < n; k++)
                    for (int d = 1; d <= k; d++)
                        if (k % d == 0) nbn += d * a035350[d] * aik[1, n - k];
                aik[1, n] = nbn / (n - 1);
                // Powers of A000237 are used a lot
                for (int k = 2; k <= N; k++)
                    for (int i = 0; i <= n; i++)
                        aik[k, n] += aik[k - 1, i] * aik[1, n - i];
                // A035350 = BIK(A000237)
                Num bn = 0;
                for (int k = 1; k <= n; k++)
                {
                    bn += aik[k, n];
                    if (k % 2 == 1)
                        for (int i = n & 1; i <= n; i += 2)
                            bn += aik[1, i] * aik[k / 2, (n - i) / 2];
                    else if (n % 2 == 0)
                        bn += aik[k / 2, n / 2];
                }
                a035350[n] = bn / 2;
                // A035349 = DIK(A000237)
                Num dn = 0;
                for (int k = 1; k <= n; k++)
                {
                    // DIK_k is Polyà enumeration with the cyclic group D_k
                    // The cycle index for D_k has two parts: C_k and what Bower calls CPAL_k
                    // C_k
                    Num cikk = 0;
                    for (int d = 1; d <= k; d++)
                        if (k % d == 0 && n % d == 0)
                            cikk += phi[d] * aik[k / d, n / d];
                    dn += cikk / k;
                    // CPAL_k
                    if (k % 2 == 1)
                        for (int i = 0; i <= n; i += 2)
                            dn += aik[1, n - i] * aik[k / 2, i / 2];
                    else
                    {
                        Num cpalk = 0;
                        for (int i = 0; i <= n; i += 2)
                            cpalk += aik[2, n - i] * aik[k / 2 - 1, i / 2];
                        if (n % 2 == 0)
                            cpalk += aik[k / 2, n / 2];
                        dn += cpalk / 2;
                    }
                }
                a035349[n] = dn / 2;
            }
            // A000083 = A000237 + A035350 - A000237 * A035349
            var a000083 = new Num[N + 1];
            for (int i = 0; i <= N; i++)
            {
                a000083[i] = aik[1, i] + a035349[i];
                for (int j = 0; j <= i; j++) a000083[i] -= aik[1, j] * a035350[i - j];
            }
            System.Console.WriteLine(a000083[N - 1]);
        }
    }
}
```
[Online demo](https://tio.run/##nVZtb9s2EP4s/4r7ssCO40RWWnStmwKJGxRFM8PYOuyDIRSsRNuMFEoQ5bpBkf@y/7L/Ne@OLxKtaVg3fzBF8njP3XMPT0rU5KGQxeGwU0JuYLF7gCv45VHV/OEcJ7wSiTq/EZv3suYbXs0Gkj1wVbKEw3I5fzf4NgiSnCkF1yH@frwcBLgSqJrVIoEvhUjhJybkUNUVul/FwEa4TSaBkDUsEAzH8yWrFB@yVRiPYAzT2YAMvrAKyq1AE8n3ZLZa0GY8o811UcGQXND@dIbD6ytY4DgeE0IQ4MmViPXmkX2JS9EMB2NfWnsdUiDWMKSDZQxvYDqCpJC1kDuuXRxjlh4mjHFuYB3uKa7AxILrXEtGp@AUT@q1/VbkHOGY9mJOmyg6QKyLxCyUjzWz6MybPQ30n@OSicxyiYU1XJ6BR6m2CS@fXz4Pu3Ydg2cv@w0QYRWeQUi00zP6n@pn43UV@pN259lLbwcn056ySVM2aYmQR2W7uNDyiy5foNXtr3e3Pw@vDYphilQtP5OLsFPJzKgng9cgcXDiaQ1SY5ASboZjY6G1ksEPZIF@RxoAq5NihV2KaUwTQ4RENWSGpsAtUZ507AKGtD0dGeFTPstizysFxbrJjFUcdoqnwCAv6r@nEek0NDs9eQidvBGS9K6JCSbTwYxN1TIK5QxEJ3gRt9FdNzK5ef9haCNsuf4Xqq@OuLaaN@w1wVg9O5IjInnqQj7KSsJJ0wCkvSKRs/Tc@illSHl0ZlgXI5o4QJ4rDoQqHWrofHkRmuPSO/hkCmsLryurCxt1SNNX520faen/IA29oq9PGQiFiskf//gduKSuje23kLAX9RbqLYfkMcmxH2@qYlfC209Zc/qj3cScZcq/AgHjPmyZgnpfYK@pavUK5rjEZAr7LavhhqQJCctzBfPl9Z3nbu6eKaFEZFmb0n@/UnByArK9YK6i2i21QWx@qV/Q1FQkdaVMdb20@QUCDdoovaC/Q2DhP4or9cVl7sixwERXWubJVs@wVLLcp@l7sc05Cx/1wdtr7IcQ9Cv72FmPuhsytZ1WddCq3tM@dm@t/VQ2VuYFZFs0fiHgrmtp46aRTJq1U3dP2jeOO9bzxukly/sM@GZD0y7M90DbC8bNG0fEnXt3b9zdkzuBI7oDz8ukcXMfe/1eYB73sZe1/ZCaF1IVOT//rRI1vxMSP3WsrwUVKR7REWTxafB0OByi8M9knbONOkwqvuYVlwl/1fkk@ws). This is a full program which takes input from the command line.
[Next sequence](https://oeis.org/A002466)
### Dissection
I follow Bowen's comment in OEIS that the generating function `A000083(x) = A000237(x) + A035349(x) - A000237(x) * A035350(x)` where the component generating functions are related by transforms as
* `A000237(x) = x EULER(A035350(x))`
* `A035350(x) = BIK(A000237(x))`
* `A035349(x) = DIK(A000237(x))`
I use the definitions of `BIK` and `DIK` from <https://oeis.org/transforms2.html> but the formulae seem to have a number of typos. I corrected `LPAL` without much difficulty, and independently derived a formula for `DIK` based on applying Pólya enumeration to the [cycle index of the dihedral group](https://en.wikipedia.org/wiki/Cycle_index#Dihedral_group_Dn). Between #121 and #156 I'm learning a lot about Pólya enumeration. I have submitted some [errata](https://oeis.org/wiki/Talk:More_Transformations_of_Integer_Sequences), which may prove useful to other people if these transforms come up again in the chain.
[Answer]
# 3. JavaScript (ES6), 38 bytes, [A000044](//oeis.org/A000044)
```
f=n=>n<0?0:n<3?1:f(n-1)+f(n-2)-f(n-13)
```
[Try it online!](https://tio.run/##HcdLCoAgEADQq8zSQQyrXWmdxUrDkJmw8Pr2WT3e4Yq71hzPWy1u8UkRb77WYMlOZPSsBzL93A5BkGpRfnSo/vVYA2cQxWWIYEGPLwa6TykRVqaLk28S7yKIiFgf "JavaScript (Babel Node) – Try It Online")
[Next sequence](//oeis.org/A000038) (should be an easy one :P)
[Answer]
# 13. VB.NET (.NET 4.5), 1246 bytes, [A000131](https://oeis.org/A000131)
```
Public Class A000131
    Public Shared Function Catalan(n As Long) As Long
        Dim ans As Decimal = 1
        For k As Integer = 2 To n
            ans *= (n + k) / k
        Next
        Return ans
    End Function
    Shared Function Answer(n As Long) As Long
        n += 7
        Dim a As Long = Catalan(n - 2)
        Dim b As Long = Catalan(n / 2 - 1)
        If n Mod 2 = 0 Then
            b = Catalan(n / 2 - 1)
        Else
            b = 0
        End If
        Dim c As Long = Catalan(n \ 2 - 1) ' integer division (floor)
        Dim d As Long
        If n Mod 3 = 0 Then
            d = Catalan(n / 3 - 1)
        Else
            d = 0
        End If
        Dim e As Long = Catalan(n / 4 - 1)
        If n Mod 4 = 0 Then
            e = Catalan(n / 4 - 1)
        Else
            e = 0
        End If
        Dim f As Long = Catalan(n / 6 - 1)
        If n Mod 6 = 0 Then
            f = Catalan(n / 6 - 1)
        Else
            f = 0
        End If
        Return (
                    a -
                    (n / 2) * b -
                    n * c -
                    (n / 3) * d +
                    n * e +
                    n * f
                ) /
                (2 * n)
    End Function
End Class
```
[A001246](https://oeis.org/A001246)
[Try it Online!](https://tio.run/##hVRNT8JAED3Lr5h40K6k0oLRxIQDAUlI1Bgh8eJl205hwzKbdFv13@NuKSWlH@yl3Xlvdt6bdudH6IxLN@BahC5h6u4Uqf3@IwukCGEqudYw8TzPH/k9MKsAlhueYATzjMJUKIIpT7nk5BBMNLwqWrPjS55l10zsgJO28RmGYscljMEv4blKYGvBBaW4xsSAQ1gpoJJhlz3gbgymTh@2DAawLeF3/EvLzSemWUKWnode6KQ1D5zrn5D@xaRJfnmkKTmGp17Vz5Fm1J5a4MKQVXlBI29gHLrgs5K6iE2VNxWZ@Bg8WG2w6j7oTn@RGmt87wSbJiziqrCwUdh3cTLcgii@RiR@hLadcmKpVHLmL6p97dLKqNlKdGZldMFKdNEKtvT4oaXHD83CsDu9JgwvCotbhD22CHtsFhZ3p9eExZ3CigviVFLKWwZuY/zw0zG4M39WM4MMFnZlj2x2BP3WbOzA4hpiRkAt5gwNlVj94ttNPtH2ps2ZRDg8/N7VMgvgjQtyWGUeieo88uw8GnqVglNFWkm8/0pEiq@C0BFwA9fPcG0exeC8L6aLYKw@rawoUz4Xd9Cz/wc)
[Answer]
# 26. TI-BASIC, 274 [bytes](http://tibasicdev.wikidot.com/tokens), [A000183](http://oeis.org/A000183)
```
.5(1+√(5→θ
"int(.5+θ^X/√(5→Y₁
"2+Y₁(X-1)+Y₁(X+1→Y₂
{0,0,0,1,2,20→L₁
Prompt A
Lbl A
If A≤dim(L₁
Then
Disp L₁(A
Else
1+dim(L₁
(~1)^Ans(4Ans+Y₂(Ans))+(Ans/(Ans-1))((Ans+1))-(2Ans/(Ans-2))((Ans-3)L₁(Ans-2)+(~1)^AnsY₂(Ans-2))+(Ans/(Ans-3))((Ans-5)L₁(Ans-3)+2(~1)^(Ans-1)Y₂(Ans-3))+(Ans/(Ans-4))(L₁(Ans-4)+(~1)^(Ans-1)Y₂(Ans-4→L₁(Ans
Goto A
End
```
Evaluates the recursive formula found on the OEIS link.
[Next Sequence](http://oeis.org/A000274)
[Answer]
# 39. [Add++](https://github.com/SatansSon/AddPlusPlus), 1 byte, [A000004](https://oeis.org/A000004)
```
O
```
[Try it online!](https://tio.run/##S0xJKSj4/9///38A "Add++ – Try It Online")
[Next sequence](https://oeis.org/A000001)
[Answer]
# 250. [Coconut](http://coconut-lang.org), 711 bytes, [A000171](https://oeis.org/A000171)
```
from collections import Counter
from math import gcd, factorial
def sparts(n, m=4):
  if n%2==1:
    return [ [1] + p for p in sparts(n-1) ]
  elif n==0:
    return [ [] ]
  elif n<m:
    return []
  else:
    return [ [m] + p for p in sparts(n-m,m) ] + sparts(n,m+4)
def ccSize(l) =
  centSize = [ val**mult * factorial(mult)
               for val, mult in Counter(l).items() ] |> reduce$(*)
  factorial(sum(l)) // centSize
def edgeorbits(l) =
  samecyc = sum(l) // 2
  diffcyc = sum ([ gcd(l[i],l[j])
                   for i in range(len(l)) for j in range(i) ])
  samecyc + diffcyc
def a(n) =
  sum ([ ccSize(l)*2**edgeorbits(l)
         for l in sparts(n)         ]) // factorial(n)
def f(n) = a(n+1)
```
[Try it online!](https://tio.run/##dZHLboMwEEX3fMUsUskG2jyUVVWy6Sd0iVi4xk4d@YGMqdSq/07HQICkKguE587MPVxzx53tQt9L7wxwp7XgQTnbgjKN8wFeXWeD8MmgGxY@rsKZ1zlIxoPziukkqYWEtmE@tMTmYIojfU4AlAT7cCiKfTwAeBE6b6GEcl9BBg1I5/Gt7Dz6uKdQYa/QcbQodveD1Up@MbfqqLTifsb8Z2Zyg3YozuQmO9LxZzh/U9@CaAoFruPChniGAhd@Mp2mptMB0iUCEgt0cF490RPbMZHYjt5ToLj3SQVhWhIBfk5IW3dcbEgaVyxL285gK4XtdkYY8UR9Fs6/K6SeEFtmBP/iSDgOxZkD1msl5VwHUsarI7pUVa7LS/WH@EqtIq1n9owZCDtAxPJlKStEpyvj7Go1EjJiJ7DRdg40PaTpDX5yY6zXV0RnqRp@aEnGTvckB5volu1pP5IddzRmalizIRI/0xM0XtnQ/wI "Coconut – Try It Online")
[Next sequence](https://oeis.org/A000711)
This can easily compute more values than the 31 that OEIS has.
Once again we have a symmetric group acting on nodes, inducing an
action on the set of possible edges and on graphs. It acts on the set
of self-complementary graphs, but I don't see how to count how many of
these are fixed by a given permutation to apply the lemma that is
often named after Burnside. So instead I use the formula in the
comment of the OEIS entry that says that the number of
self-complementary graphs with `n` nodes is equal to the difference of
the number of graphs with `n` nodes with an even number of edges and
with an odd number of edges. The symmetric group acts on these sets of
graphs as well. Instead of computing both numbers independently, we
will consider the cases of an even number and an odd number of edges
in parallel, which will turn out to be simpler and allow
optimizations.
We'll see that "evaluate the graph polynomial at `-1`" will lead to the
same result.
As usual, we take the sum over the group elements in Burnside's lemma
conjugacy class wise, and represent the conjugacy classes by
partitions of `n`. For each conjugacy class, we want to know the
difference between the numbers of graphs with an even and odd number
of edges that is fixed by a permutation from that class.
Assume we are given a concrete permutation `g`. The group generated by
`g` acts on the set of possible edges and partitions them into orbits.
A graph is fixed by `g` if for each orbit, it contains either all or
none of its edges. Let's look at the orbits. Each edge in one orbit
has its endpoints in the same two (possibly same) cycles of `g`.
Let's first assume the endpoints are from the same cycle of length
`k>=2`. If `k` is odd, then there are `(k-1)/2` orbits of length `k`.
If `k` is even, then there are `k/2-1` orbits of length `k` and one of
length `k/2` (for example, if `g` contains the cycle `(123456)`, then
the there is an edge orbit of size 3 containing `{1,4}`). Note that we
get all orbits of even size exactly when `k` is a multiple of four.
Next consider the case that the endpoints are from different cycles
of lengths `k` and `l`. Then the orbit has size `lcm(k,l)`, and there
are `gcd(k,l)` such orbits.
In order to combine all the possibilities, consider the product, for
each edge orbit, of `1+x^r`, where `r` is the size of the
corresponding orbit. The coefficient of `x^s` of the product gives the
number of graphs that are fixed by `g` and have `s` edges. We want the
sum of the coefficients at even exponents minus the sum of them at odd
coefficients, which we get by evaluating the polynomial at `x=-1`.
If we kept the polynomials and added them together, we'd get the graph
polynomial. Instead, we don't even create these polynomials, but do
the substitution immediately. For an edge orbit of even size, we get a
factor of `2`, for an odd size we get `0`. (There is also a direct
combinatorial argument that if there is an edge orbit of odd size then
there are as many fixed graphs with an even number of edges as there
are with an odd number of edges. And the factor `2` corresponds to the
choice of including the edges of one orbit to the fixed graph or
not).
So, by the considerations about edges with points from only one cycle,
we get a difference of `0` whenever `g` contains a cycle of odd length
greater than one, or a cycle of even length not divisible by four. We
also get a difference of `0` whenever `g` contains at least two fixed
points (cycles of length one).
This means we only need to sum over conjugacy classes with at most one
fixed point and all other cycle lengths multiples of four. `sparts`
computes the corresponding partitions of `n`. There are none unless
`n` is of the form `4k` or `4k+1`, so in the other cases there are no
self-complementary graphs, which can also easily seen by noting that
in these cases the total number of possible edges is odd. But this
observations alone doesn't lead to the optimization of only
considering special partitions, of which there are only as much as
there are partitions of `k`.
`ccSize` computes the size of a conjugacy class with given cycle
lengths. `edgeorbits` computes the number of edge orbits of the action
of the group generated by a permutation with the given cycle lengths,
assuming they are of the special form. In the general case, `samecyc`,
the number of edge orbits with edges that have both nodes from the
same cycle, could not be calculated like this. (When I wrote the code,
I didn't notice that it only depends on `n` in the relevant cases.)
`a` puts everything together, and `f` fixes the different indexing.
[Answer]
# 11. Pari/GP, 64 bytes, [A000065](https://oeis.org/A000065)
```
{a(n) = if( n<0, 0, polcoeff ( 1 / eta(x + x*O(x^n) ), n) - 1)};
```
[Try it online!](https://tio.run/##K0gsytRNL/j/vzpRI09TwVYhM01DIc/GQEcBiAryc5LzU9OAIoYK@gqpJYkaFQraChVa/hoVcXmamjoKQB26Coaatdb//ydqGGsCAA)
[Next sequence](https://oeis.org/A000064)
[Answer]
# 318. [Funciton](https://github.com/Timwi/Funciton), 1688 bytes, [A000652](https://oeis.org/A000652)
```
╔═══╗  ┌─────────╖  ┌─┐ ┌───╖  ╔═══╗
║   ╟──┤ str→int ╟──┤ └─┤ ↑ ╟──╢ 2 ║
╚═══╝  ╘═════════╝  │   ╘═╤═╝  ╚═══╝
  ┌─────────────────┘     │
┌─┴┐                      │
│┌─┴─╖                ┌───┴───┐
││ ♭ ║              ┌─┴─╖   ┌─┴─╖  
│╘═╤═╝┌───╖    ╔═══╗│ ♭ ║   │ ! ║  
│  └──┤ ↑ ╟────╢ 2 ║╘═╤═╝   ╘═╤═╝
│     ╘═╤═╝    ╚═╤═╝  │       │
│    ┌──┴─┐      │    └───┐   │
│  ┌─┴─╖  │┌───╖ │  ┌───╖ │   │
│  │ ! ║  └┤ ↑ ╟─┴──┤ ↑ ╟─┘   │
│  ╘═╤═╝   ╘═╤═╝    ╘═╤═╝     │
│    │ ┌───╖ │   ┌───╖│       │
│    └─┤ × ╟─┘ ┌─┤ × ╟┘       │
│      ╘═╤═╝   │ ╘═╤═╝ ┌───╖  │
│  ╔═══╗ └─────┘   └───┤ + ╟──┘
│  ║ 2 ╟┐              ╘═╤═╝
│  ╚═╤═╝│        ┌───╖   │
│    │  └──┐   ┌─┤ ÷ ╟───┘
│    └──┐┌─┴─╖ │ ╘═╤═╝┌─────────╖
│ ┌───╖ ││ ↑ ╟─┘   └──┤ int→str ╟─
└─┤ × ╟─┘╘═╤═╝        ╘═════════╝
  ╘═╤═╝    │
    └──────┘
```
[Next Sequence](https://oeis.org/A001688)
Calculates the formula from the OEIS page. I'm sure there's a more compact way to do this, without multiple `2` constants, but this took me long enough.
[Try it online!](https://tio.run/##jZS9TsQwDMf3PIWZ2RBvhIR0S5Gg7KcONzGkKOUCEjrp1JWtEg/Am@RFSj4uxI4dlSpSU9d23d/f8f1zd7frH7p1dZNxk87rCODMizP75preioumzvEVTafcNEKwnrLbDE/9ozu87rqemp0xeXcY0avpDDf@cfSpPlDqz5DVIgNfwcUMUBznEklSqc2/bi4L4fKfUTnDEriIV/IakGNiVnvhSha01yl6APf@BQmsEFfSMkuMpyyYgExC@sHwdJX2KsLNsgnKUf2YCLUsKZ8kVxFspsIiqhW65dKg2SXdDKaJYxkqpFNGQxyJEef5wxO/RpEsMilLMmxhahCiHIZmocTaoJgP4s8R1ZhDi9nyWLH@UE1l5XOj/D@dR1S0PQKG7TNc48azOdcYe@/EjqTYelWTFTi83Jo2LkejAA/ruzoRVvF21HX/Ccw257JqyB7NrN3QqfWj2A9kP5YvLkruAKnp4B9TWMkt7AHyQ1korevtLw "Funciton – Try It Online")
[Answer]
# 121. [Pip](https://github.com/dloscutoff/pip), 525 bytes, [A000022](https://oeis.org/A000022)
```
n:(a+1)//2
t:[[0]RL(3*a+3)PE1]
Fh,n{
  m:([0]RL(3*a+3))
  Fi,(a+1){
    Fj,(a+1){
      Fk,(a+1)m@(i+j+k)+:(t@h@i)*(t@h@j)*(t@h@k)
      m@(i+2*j)+:3*(t@h@i)*(t@h@j)
    }
    m@(3*i)+:2*(t@h@i)
  }
  t:(tAE(m//6PE1))
}
k:t@n
o:0
Fh,aFi,aFj,aI(h+i+j<a)o+:(k@h)*(k@i)*(k@j)*k@(a-1-h-i-j)
Fh,((a+1)//2){
  Fi,aI(2*h+i<a){o+:6*(k@h)*(k@i)*(k@(a-1-2*h-i))}
  I(a%2=1)o+:3*(k@h)*(k@((a-1-2*h)//2))
}
Fh,((a+2)//3)o+:8*(k@h)*(k@(a-1-3*h))
I(a%4=1)o+:6*k@(a//4)
o//:24
Ia(o+:t@n@a)
Fh,nFj,(a+1)o-:(t@(h+1)@j-t@h@j)*(t@(h+1)@(a-j))
o
```
[Online demo](https://tio.run/##XZExa8MwEIV3/YoshZMcoVhyTREtqEMChg6la8igzbKwncFbyG93n2SbhEzi7r579@50Ddd5Hiz5ouRKaTbZ8/lw@fshI3xh@O@xvLBTux9ubLfrLT3XOFKnsM@tqYyoe44QxyXuHYWiKyIvLE2udYGL/HbrG/nakEEtOoBGvKAZubMVMyIA0hvEltIE/e8j9UrVcA6Hdxbt5AY22kNaw8Ovh0vfUFvA0qfnIzxF12JMzMNichUdeVnKVgaJwWik7UB5t6TSkBbQgMINErV4Ecn9IGTgPDlryL/przKNMw@WNixLJ7vrLI2ESfDHE5xYA5azpFYtanU2q1TF2aiU1RVrPCGPrZ3P3oftW0aZzo/NS@46@fiAJQP5DtLjPM/v/w)
[Next sequence](https://oeis.org/A000525)
Fun fact: when the challenge was first posted, I drew up a list of small nasty sequence numbers that I wanted to aim for with CJam, and A000022 was at the top of the list.
This implements the generating function described in E. M. Rains and N. J. A. Sloane, [**On Cayley's Enumeration of Alkanes (or 4-Valent Trees)**](https://cs.uwaterloo.ca/journals/JIS/cayley.html),
Journal of Integer Sequences, Vol. 2 (1999), taking the sum for `Ck` to as many terms as a necessary for the `n`th coefficient to be fixed and then telescoping three quarters of the sum. In particular, telescoping the first half means that the cycle index of `S4` only has to be applied to one of the `Th` rather than to all of them.
The code breaks down as
```
; Calculate the relevant T_h
t:[[0]RL(3*a+3)PE1]
Fh,n{
  m:([0]RL(3*a+3))
  Fi,(a+1){
    Fj,(a+1){
      Fk,(a+1)m@(i+j+k)+:(t@h@i)*(t@h@j)*(t@h@k)
      m@(i+2*j)+:3*(t@h@i)*(t@h@j)
    }
    m@(3*i)+:2*(t@h@i)
  }
  t:(tAE(m//6PE1))
}
; Calculate the cycle index of S_4 applied to the last one
k:t@n
o:0
Fh,aFi,aFj,aI(h+i+j<a)o+:(k@h)*(k@i)*(k@j)*k@(a-1-h-i-j)
Fh,((a+1)//2){
  Fi,aI(2*h+i<a){o+:6*(k@h)*(k@i)*(k@(a-1-2*h-i))}
  I(a%2=1)o+:3*(k@h)*(k@((a-1-2*h)//2))
}
Fh,((a+2)//3)o+:8*(k@h)*(k@(a-1-3*h))
I(a%4=1)o+:6*k@(a//4)
o//:24
; Handle the remaining convolution,
; pulling out the special case which involves T_{-2}
Ia(o+:t@n@a)
Fh,nFj,(a+1)o-:(t@(h+1)@j-t@h@j)*(t@(h+1)@(a-j))
```
Note that this is my first ever Pip program, so is probably not very idiomatic.
[Answer]
# 6. [R](https://www.r-project.org/), 71 bytes, [A000072](https://oeis.org/A000072)
```
function(n)length(unique((t<-outer(r<-(0:2^n)^2,r*4,"+"))[t<=2^n&t>0]))
```
[Try it online!](https://tio.run/##DcrBCoQgEADQX1k6LDOlYNEprB@JgghthZhsGg/79eb18Tj7j9XZJ9olXASEp6NDfpAo3MkBiNVXEsfAVoMZupVw7RTXvaqaCnEWOxb7ymQWxBw5kMCzxXj@y26N8kVf "R – Try It Online")
[Next sequence](https://oeis.org/A000071)
[Answer]
# 14. [Python 2](https://docs.python.org/2/), 60 bytes, [A001246](https://oeis.org/A001246)
```
f=lambda x:x<1or x*f(x-1)
c=lambda n:(f(2*n)/f(n)/f(n+1))**2
```
[Try it online!](https://tio.run/##NckxDoAgDADA3VcwtlVjIHEh@hhEqyZSCHHA1@NgXG659NxHFFMrz5cLy@pUsWXSMatCDKXX2Ph/xAKDIcGB4aPViESmpnzKrYJL4DuVnewb6BGxvg "Python 2 – Try It Online")
[Next sequence.](https://oeis.org/A000060)
[Answer]
# 34. [Prolog (SWI)](http://www.swi-prolog.org), 168 bytes, [A000073](https://oeis.org/A000073)
```
tribonacci(0,0).
tribonacci(1,0).
tribonacci(2,1).
tribonacci(A,B):-
	C is A-1,
	D is A-2,
	E is A-3,
	tribonacci(C,F),
	tribonacci(D,G),
	tribonacci(E,H),
	B is F+G+H.
```
[Try it online!](https://tio.run/##KyjKz8lP1y0uz/z/v6QoMyk/LzE5OVPDQMdAU48LScAQXcBIxxBVwFHHSdNKl4vTWSGzWMFR11CHi9MFwjQCMl0hTGMgE0mPs46bJqqIi447moirjgdIxAlkgJu2u7aHHopLjQx0IjT1AA "Prolog (SWI) – Try It Online")
[Next sequence](https://oeis.org/A000168)
[Answer]
# 49. [SageMath](http://www.sagemath.org/), 74 bytes, [A000003](https://oeis.org/A000003)
```
lambda n: len(BinaryQF_reduced_representatives(-4*n, primitive_only=True))
```
[Try it online!](https://sagecell.sagemath.org/?z=eJwVyDsKgDAMANBd8A4ZW6mg4iS4OLgL7hJtlEIbS_yAt1enB2-FFjyG2SJwA55YdY5RnqGfhOy1kP2MQgfxiae76VB5nbGBKC64P6ad_dOOcpHWaZImAaNaDQjyRqo0VaH1CwoqIbA=&lang=sage)
[Next sequence](https://oeis.org/A000074)
]