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.

Showing 1-2 of 2 results.

A201630 a(n) = a(n-1) + 2*a(n-2) with n>1, a(0)=2, a(1)=7.

Original entry on oeis.org

2, 7, 11, 25, 47, 97, 191, 385, 767, 1537, 3071, 6145, 12287, 24577, 49151, 98305, 196607, 393217, 786431, 1572865, 3145727, 6291457, 12582911, 25165825, 50331647, 100663297, 201326591, 402653185, 805306367, 1610612737, 3221225471, 6442450945, 12884901887
Offset: 0

Views

Author

Bruno Berselli, Dec 03 2011

Keywords

References

  • B. Satyanarayana and K. S. Prasad, Discrete Mathematics and Graph Theory, PHI Learning Pvt. Ltd. (Eastern Economy Edition), 2009, p. 73 (problem 3.3).

Crossrefs

Programs

  • Magma
    [n le 2 select 5*n-3 else Self(n-1)+2*Self(n-2): n in [1..33]];
    
  • Mathematica
    LinearRecurrence[{1, 2}, {2,7}, 33]
  • Maxima
    a[0]:2$ a[1]:7$ a[n]:=a[n-1]+2*a[n-2]$ makelist(a[n], n, 0, 32);
    
  • PARI
    v=vector(33); v[1]=2; v[2]=7; for(i=3, #v, v[i]=v[i-1]+2*v[i-2]); v
    
  • SageMath
    def A201630(n): return 3*2**n - (-1)**n
    print([A201630(n) for n in range(31)]) # G. C. Greubel, Feb 07 2025

Formula

G.f.: (2+5*x)/((1+x)*(1-2*x)).
a(n) = 3*2^n - (-1)^n.
a(n) = 7 + 2*Sum_{i=0..n-2} a(i), for n>0.
a(n) = A097581(A042948(n+1)).
a(n+2) - a(n) = a(n+1) + a(n) = A005010(n).
E.g.f.: 3*exp(2*x) - exp(-x). - G. C. Greubel, Feb 07 2025

A358935 a(n) is the least k > 0 such that fusc(n) = fusc(n + k) or fusc(n) = fusc(n - k) (provided that n - k >= 0), where "fusc" is Stern's diatomic series (A002487).

Original entry on oeis.org

1, 1, 3, 2, 2, 3, 2, 4, 6, 3, 2, 6, 2, 4, 3, 8, 4, 3, 4, 6, 6, 4, 2, 12, 2, 4, 6, 8, 4, 6, 3, 16, 30, 3, 12, 6, 4, 8, 18, 12, 4, 12, 10, 8, 6, 4, 2, 24, 2, 4, 6, 8, 10, 12, 4, 16, 18, 7, 4, 12, 9, 6, 3, 32, 7, 3, 7, 6, 12, 9, 8, 12, 46, 7, 12, 11, 12, 21, 7
Offset: 1

Views

Author

Rémy Sigrist, Dec 07 2022

Keywords

Comments

Every positive integer appears infinitely many times in A002487, hence the sequence is well defined.

Examples

			The first terms, alongside fusc(n) and the direction where to find the same value, are:
  n   a(n)  fusc(n)  dir
  --  ----  -------  ---
   1     1        1  +
   2     1        1  -
   3     3        2  +
   4     2        1  -
   5     2        3  +
   6     3        2  -
   7     2        3  -
   8     4        1  -
   9     6        4  +
  10     3        3  -
  11     2        5  +
  12     6        2  -
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(2^k) = 2^(k-1) for any k > 0.
a(n) = 2 iff n belongs to A097581 \ {2}.
Showing 1-2 of 2 results.