cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337518 Number of non-isomorphic graphs on n unlabeled nodes modulo 3.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 0, 0, 1, 0, 2, 2, 0, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 2, 0, 1, 0, 2, 1, 0, 0, 2, 2, 0, 2, 0, 0, 2, 1, 2, 1, 0, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 0, 1, 2, 0, 1, 2, 1, 1, 1, 1, 0, 0, 2, 1, 1, 2, 0, 2, 0, 0, 0, 2, 1, 2, 2, 1
Offset: 0

Views

Author

Drake Thomas, Nov 21 2020

Keywords

Comments

For the mod-2 case, the sequence is eventually constant, because there are an even number of graphs on n vertices for n>4. (In fact, the number of factors of 2 in A000088(n) is asymptotically n/2; see Cater and Robinson in the Links section.)

Examples

			For n = 4, there are 11 graphs on 4 nodes up to isomorphism, so a(4) = 2 = 11 mod 3.
		

Crossrefs

Programs

  • Python
    from itertools import combinations
    from math import prod, factorial, gcd
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A337518(n): return int(sum(Fraction(1<>1)*r+(q*r*(r-1)>>1) for q, r in p.items()),prod(q**r*factorial(r) for q, r in p.items()))%3 for p in partitions(n))) % 3 # Chai Wah Wu, Jul 02 2024

Formula

a(n) = A000088(n) mod 3.