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.

A370377 a(n) is the number of symmetrical linear hydrocarbon chains with n C-C bonds.

Original entry on oeis.org

1, 3, 2, 6, 5, 14, 11, 31, 25, 70, 56, 157, 126, 353, 283, 793, 636, 1782, 1429, 4004, 3211, 8997, 7215, 20216, 16212, 45425, 36428, 102069, 81853, 229347, 183922, 515338, 413269, 1157954, 928607, 2601899, 2086561, 5846414, 4688460, 13136773, 10534874
Offset: 0

Views

Author

Tomasz Dziekanski, Feb 18 2024

Keywords

Examples

			For n = 1: a(1) = A006356(1) = 3
 CH3-CH3, CH2=CH2, CH≡CH
For n = 3: a(3) = A006356(2) = 6
 CH3-CH2-CH2-CH3, CH3-CH=CH-CH3, CH3-C≡C-CH3, CH2=CH-CH=CH2, CH≡C-C≡CH, CH2=C=C=CH2
For n = 4: a(4) = A006356(2) - A006356(0) = 6 - 1 = 5
 CH3-CH2-CH2-CH2-CH3, CH3-CH=C=CH-CH3, CH2=CH-CH2-CH=CH2, CH≡C-CH2-C≡CH, CH2=C=C=C=CH2
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 0, 1, 0, -1}, {1, 3, 2, 6, 5, 14}, 50] (* Paolo Xausa, Feb 22 2024 *)
  • PARI
    Vec(O(x^55)+(1+3*x-x^5)/(1-2*x^2-x^4+x^6)) \\ Joerg Arndt, Feb 18 2024
  • Python
    a = [1, 3, 2, 6, 5, 14]
    for i in range(30):
        a.append(2*a[-2]+a[-4]-a[-6])
    print(a)
    

Formula

a(n) = 2*A306334(n) - A006356(n).
Also:
a(0) = 1;
a(2) = 2;
a(n) = A006356((n+1)/2) if n is odd;
a(n) = A006356(n/2) - A006356((n-4)/2) if n is even.
G.f.: (1+3*x-x^5)/(1-2*x^2-x^4+x^6). - Joerg Arndt, Feb 18 2024