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-3 of 3 results.

A020953 Least k such that A020951(k) = n.

Original entry on oeis.org

0, 10, 20, 40, 42, 160, 82, 84, 162, 166, 164, 172, 170, 324, 328, 348, 332, 330, 338, 700, 340, 652, 650, 664, 662, 658, 666, 1290, 660, 676, 684, 1302, 1298, 682, 1306, 1338, 1300, 2584, 1348, 1320, 1316, 2626, 1324, 1332
Offset: 1

Views

Author

Keywords

Extensions

Title simplified, missing a(21), a(38), a(42) inserted by Sean A. Irvine, May 05 2019

A020944 a(2n+1) = |a(2n) - a(2n-1)|, a(2n) = a(n) + a(n-1), a(0) = -1.

Original entry on oeis.org

-1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3
Offset: 0

Views

Author

Keywords

Comments

a(n) = abs(t(n+1)) if n>0 where t(n) is the twisted Stern sequence defined by R. Bacher and M. Coons. - Michael Somos, Jan 08 2011
a(A153893(n)) = 0. - Reinhard Zumkeller, Mar 13 2011

Examples

			G.f. = -1 + x + x^3 + x^4 + x^6 + x^7 + 2*x^8 + x^9 + x^10 + x^12 + x^13 + 2*x^14 + ...
		

Crossrefs

Programs

  • Haskell
    a020944 n = a020944_list !! n
    a020944_list = -1 : f [1,0] where f (x:y:xs) = x : f (y:xs ++ [x,x+y])
    -- Same list generator function as for a020951_list, cf. A020951.
    -- Reinhard Zumkeller, Mar 13 2013
  • Mathematica
    a[ n_] := Which[ n < 2, Boole[n == 1] - Boole[n == 0], OddQ[n], Abs[a[n - 1] - a[n - 2]], True, a[n/2] + a[n/2 - 1]]; (* Michael Somos, Jul 25 2018 *)
  • PARI
    {a(n) = if( n<2,(n==1) - (n==0),  n%2, abs( a(n-1) - a(n-2) ), a(n/2) + a(n/2 - 1) )}; /* Michael Somos, Jan 08 2011 */
    
  • PARI
    {a(n) = my(A, m); if( n<0, 0, m = 1; A = -1 + O(x); while( m <= n, m*=2; A = 2*x + (1 + x + x^2) * subst( A, x, x^2 ) ); polcoeff( A, n ) )}; /* Michael Somos, Jan 08 2011 */
    

Formula

G.f. A(x) satisfies: A(x) = 2*x + (1 + x + x^2) * A(x^2). - Michael Somos, Jan 08 2011

Extensions

More terms from Henry Bottomley, May 16 2001
Added a(0) from Michael Somos, Jan 08 2011

A082498 a(0)=0, a(1)=1, a(2n)=a(n), a(2n+1)=a(n)+a(n-1).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, 3, 2, 4, 3, 5, 1, 4, 3, 4, 2, 5, 3, 5, 1, 4, 3, 4, 2, 5, 3, 5, 2, 5, 4, 6, 3, 7, 5, 8, 1, 6, 4, 5, 3, 7, 4, 7, 2, 6, 5, 7, 3, 8, 5, 8, 1, 6, 4, 5, 3, 7, 4, 7, 2, 6, 5, 7, 3, 8, 5, 8, 2, 7, 5, 7, 4, 9, 6, 10, 3, 9, 7, 10, 5, 12, 8
Offset: 0

Views

Author

Ralf Stephan, Apr 29 2003

Keywords

Crossrefs

Cf. A020951.

Programs

  • Haskell
    a082498 n = a082498_list !! n
    a082498_list = 0 : 1 : concat
       (zipWith (\u v -> [u, u + v]) (tail a082498_list) a082498_list)
    -- Reinhard Zumkeller, Jul 19 2013
  • PARI
    a(n) = if(n<2,n,if(n%2==0,a(n/2),a((n-1)/2)+a((n-3)/2)))
    
Showing 1-3 of 3 results.