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.

Previous Showing 21-22 of 22 results.

A099942 Start with 1, then alternately double or add 2.

Original entry on oeis.org

1, 2, 4, 8, 10, 20, 22, 44, 46, 92, 94, 188, 190, 380, 382, 764, 766, 1532, 1534, 3068, 3070, 6140, 6142, 12284, 12286, 24572, 24574, 49148, 49150, 98300, 98302, 196604, 196606, 393212, 393214, 786428, 786430, 1572860, 1572862, 3145724, 3145726
Offset: 0

Views

Author

N. J. A. Sloane, Nov 12 2004

Keywords

Crossrefs

Programs

  • Magma
    [3*2^Ceiling(n/2) + (-1)^n - 3: n in [0..50]]; // Vincenzo Librandi, Aug 17 2011
  • Mathematica
    LinearRecurrence[{0,3,0,-2},{1,2,4,8},50] (* Harvey P. Dale, May 03 2016 *)
  • PARI
    print1(a=1,",");for(n=1,20,print1(a=2*a,",",a=a+2,","))
    

Formula

a(0)=1; for n > 0, a(n) = a(n-1)*(1 + n mod 2) + 2*((n+1) mod 2).
G.f.: (2*x^3 + x^2 + 2*x + 1)/(2*x^4 - 3*x^2 + 1).
3*2^ceiling(n/2) + (-1)^n - 3. - Ralf Stephan, Dec 04 2004
a(2*n) = A033484(n).
a(n-1) + a(n) = A061776(n) for n > 0.
E.g.f.: -2*cosh(x) + 3*cosh(sqrt(2)*x) - 4*sinh(x) + 3*sqrt(2)*sinh(sqrt(2)*x). - Franck Maminirina Ramaharo, Nov 08 2018

Extensions

Edited and extended by Klaus Brockhaus, Nov 13 2004

A362343 Sequence that alternately doubles and squares the previous number; a(0) = 1.

Original entry on oeis.org

1, 2, 4, 8, 64, 128, 16384, 32768, 1073741824, 2147483648, 4611686018427387904, 9223372036854775808, 85070591730234615865843651857942052864, 170141183460469231731687303715884105728, 28948022309329048855892746252171976963317496166410141009864396001978282409984
Offset: 0

Views

Author

Christopher Roat, Apr 17 2023

Keywords

Crossrefs

Cf. A075427.
Subsequence of A000079.

Programs

  • Python
    def A362343(n): return 1<<((1<<(n>>1)+1)-1 if n&1 else (1<<(n>>1)+1)-2) # Chai Wah Wu, Apr 23 2023

Formula

a(0) = 1; a(n) = a(n-1)*2 if n is odd, otherwise a(n) = a(n-1)^2.
a(n) = 2^A075427(n-1), for n>=1.
Previous Showing 21-22 of 22 results.