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

A020948 Least k such that b(k) = n, where b( ) is sequence A020944.

Original entry on oeis.org

1, 8, 16, 32, 34, 128, 66, 68, 130, 134, 132, 140, 138, 260, 264, 284, 268, 266, 274, 572, 276, 524, 522, 536, 534, 530, 538, 1034, 532, 548, 556, 1046, 1042, 554, 1050, 1082, 1044, 2072, 1092, 1064, 1060, 2114, 1068, 1076, 1132, 1100, 1066, 2102, 1098, 1106, 2088, 2084, 2098, 4346, 1108
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 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]]; s = Array[a[#] &, 4200]; Array[FirstPosition[s, #][[1]] &, LengthWhile[Differences@ Union@ s, # == 1 &]] (* Michael De Vlieger, Feb 18 2022, after Michael Somos at A020944 *)

Extensions

More terms from Seiichi Manyama, Feb 18 2022

A153893 a(n) = 3*2^n - 1.

Original entry on oeis.org

2, 5, 11, 23, 47, 95, 191, 383, 767, 1535, 3071, 6143, 12287, 24575, 49151, 98303, 196607, 393215, 786431, 1572863, 3145727, 6291455, 12582911, 25165823, 50331647, 100663295, 201326591, 402653183, 805306367, 1610612735, 3221225471
Offset: 0

Views

Author

Keywords

Comments

A020944(a(n)) = 0. - Reinhard Zumkeller, Mar 13 2011
a(n) + a(n-1)^2 is a perfect square. - Vincenzo Librandi, Oct 28 2011
Number of distinct continued fractions of n terms chosen from {1,2}. - Clark Kimberling, Jul 20 2015
Also, the decimal representation of the x-axis, from the origin to the right edge, of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 643", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. See A283508. - Robert Price, Mar 09 2017
This sequence has been used by the ninth-century mathematician Thabit ibn Qurra to devise the first method to construct amicable pairs (see Tattersall). - Stefano Spezia, Jul 18 2025

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 138.

Crossrefs

Cf. A283508.

Programs

Formula

a(n) = a(n-1)*2 + 1, a(0)=2.
a(n) = A083329(n+1).
a(n) = A055010(n+1).
G.f.: (2 - x)/((1-x)(1-2x)). - R. J. Mathar, Feb 13 2009
a(n) = A083416(2n) = A033484(n) + 1. - Philippe Deléham, Apr 14 2013
From G. C. Greubel, Sep 01 2016: (Start)
a(n) = 3*a(n-1) - 2*a(n-2).
E.g.f.: 3*exp(2*x) - exp(x). (End)

Extensions

Edited by N. J. A. Sloane, Feb 14 2009

A213369 The twisted Stern sequence: a(0) = 0, a(1) = 1 and a(2n) = -a(n), a(2n + 1) = -a(n)-a(n + 1) for n>=1.

Original entry on oeis.org

0, 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
Offset: 0

Views

Author

N. J. A. Sloane, Jun 13 2012

Keywords

Crossrefs

Cf. A002487. Absolute values give A020944.

Programs

  • Mathematica
    a[0]=0; a[1]=1; a[n_] := a[n] = If[EvenQ[n], -a[n/2], -a[(n-1)/2]-a[(n+1)/2 ]]; Table[a[n], {n, 0, 77}] (* Jean-François Alcover, Oct 02 2018 *)
  • Maxima
    a[0]:0$ a[1]:1$ a[n]:=-a[floor(n/2)]-(1-(-1)^n)*a[floor((n-1)/2)+1]/2$ makelist(a[n],n,0,77); /* Bruno Berselli, Jun 15 2012 */

Formula

a(n) = A287729(n) - A287730(n) for n > 0. - Michel Marcus & I. V. Serov, May 28 2019

A318163 a(0) = a(3) = 0, a(1) = a(2) = 1; for n >= 2, a(2*n) = -a(n-1) and a(2*n+1) = -a(n-1)-a(n).

Original entry on oeis.org

0, 1, 1, 0, -1, -2, -1, -1, 0, 1, 1, 3, 2, 3, 1, 2, 1, 1, 0, -1, -1, -2, -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, 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, -5, -2, -5, -3, -4, -1, -6, -5, -9, -4, -11, -7
Offset: 0

Views

Author

Altug Alkan, Aug 19 2018

Keywords

Comments

Inspired by A002487.
Alternatively, a(0) = 0, a(1) = 1; for n >= 1, a(2*n) = a(2*n-1) - a(2*n-2), a(2*n+1) = a(2*n) - a(n). Note that if b(0) = 0, b(1) = 1; for n >= 1, b(2*n) = b(2*n-1) - b(n), b(2*n+1) = b(2*n) - b(2*n-1), then b(n) + A213369(n+1) = 0 for all n >= 1.
The main block structure of this sequence is described by A020714.

Crossrefs

Programs

  • Mathematica
    a[0]=a[3]=0; a[1]=a[2]=1; a[n_] := a[n] = If[EvenQ[n], -a[n/2-1], -a[(n-1)/2 - 1] - a[(n-1)/2]]; Array[a, 101, 0] (* Giovanni Resta, Aug 27 2018 *)
  • PARI
    a = vector(100); print1(0", "); for(k=1, #a, print1 (a[k]=if(k<=2,1, my (n=k\2); if (k%2==0, -a[n-1], a[2*n]-a[n]))", "));

Formula

a(5*2^k-2) = 0 for all k >= 0.
Showing 1-4 of 4 results.