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.

A060013 New record highs reached in A060000.

Original entry on oeis.org

1, 2, 3, 5, 9, 15, 27, 51, 99, 195, 387, 771, 1539, 3075, 6147, 12291, 24579, 49155, 98307, 196611, 393219, 786435, 1572867, 3145731, 6291459, 12582915, 25165827, 50331651, 100663299, 201326595, 402653187, 805306371, 1610612739, 3221225475, 6442450947, 12884901891
Offset: 1

Views

Author

Robert G. Wilson v, Mar 15 2001

Keywords

Crossrefs

Programs

  • Mathematica
    h = f = {1, 2}; a = 1; b = 2; Do[ g = Sort[ h ]; If[ g[ [ -1 ] ] + 1 == n, c = a + b, k = 1; While[ g[ [ k ] ] == k, k++ ]; c = k ]; a = b; b = c; h = Append[ h, c ]; If[ c > g[ [ -1 ] ], f = Append[ f, c ] ], { n, 3, 10^4 } ]; f
    LinearRecurrence[{3,-2},{1,2,3,5,9,15},40] (* Harvey P. Dale, Dec 12 2018 *)

Formula

For n>4: a(n) = 2*a(n-1)-3. For n>3: a(n) = 3*2^(n-3)+3 = 3*A000051(n-3) = A007283(n-3)+3.
a(n+1) = A060000(a(n)+1), a(1) = 1. - Reinhard Zumkeller, Mar 04 2008
G.f.: -x*(x^2-x+1)*(2*x^3+2*x^2-1) / ((x-1)*(2*x-1)). - Colin Barker, Jan 12 2013
E.g.f.: (144*exp(x) + 9*exp(2*x) - 153 - 114*x - 42*x^2 - 12*x^3 - 2*x^4)/48. - Stefano Spezia, Jul 25 2024

Extensions

Formulae and more terms from Henry Bottomley and Larry Reeves (larryr(AT)acm.org), Mar 19 2001

A099424 Inverse of A060000.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 8, 9, 6, 11, 12, 13, 14, 15, 10, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 16, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 28, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 15 2004

Keywords

Comments

Permutation of the natural numbers.

A060030 a(1) = 1, a(2) = 2; thereafter a "hole" is defined to be any positive number not in the sequence a(1)..a(n-1) and less than the largest term; if there exists at least one hole, then a(n) is the largest hole, otherwise a(n) = a(n-2) + a(n-1).

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 8, 7, 6, 13, 12, 11, 10, 21, 20, 19, 18, 17, 16, 15, 14, 29, 28, 27, 26, 25, 24, 23, 22, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83
Offset: 1

Views

Author

William Nelles (wnelles(AT)flashmail.com), Mar 17 2001

Keywords

Comments

A self-inverse permutation of the natural numbers: a(a(n)) = n and a(n) <> n for n > 3. [Reinhard Zumkeller, Apr 29 2012]

Crossrefs

See A060482 for successive records, A027383 for the final hole-filling values, A016116 for the difference between top and bottom of downward subsequences, A052551 for number of terms in downward subsequences.

Programs

  • Haskell
    import Data.List (delete)
    a060030 n = a060030_list !! (n-1)
    a060030_list = 1 : 2 : f 1 2 [3..] where
       f u v ws = y : f v y (delete y ws) where
         y = if null xs then u + v else last xs
         xs = takeWhile (< v) ws
    -- Reinhard Zumkeller, Apr 29 2012
  • Mathematica
    a[1] = 1; a[2] = 2;
    a[n_] := a[n] = Module[{A, H}, A = Array[a, n-1]; H = Complement[ Range[a[n-1]], A]; If[H != {}, H[[-1]], a[n-2] + a[n-1]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Apr 23 2024 *)

Extensions

Offset corrected by Reinhard Zumkeller, Apr 29 2012
Name made more explicit by Jean-François Alcover, Apr 23 2024

A138153 If the numbers a(1)...a(n) contain a hole, then a(n+1) is the smallest hole; otherwise a(n+1) = a(n-2) + a(n-1) + a(n).

Original entry on oeis.org

1, 2, 3, 6, 4, 5, 15, 7, 8, 9, 10, 11, 12, 13, 14, 39, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 111, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66
Offset: 1

Views

Author

Jonathan Vos Post, May 04 2008

Keywords

Comments

This is to A060000 as tribonacci A000073 is to Fibonacci A000045. Let H be the set of positive numbers less than a(n) which are not equal to some a(i), i < n. This H is the 'set of holes so far'. If H is nonempty, then define a(n+1) = minimum(H). Otherwise define a(n+1) = a(n-2) + a(n-1) + a(n). Permutation of the natural numbers with inverse not yet in the OEIS.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n < 4, n, Block[{s = Array[a, n-1]}, s = Complement[ Range[ Max@s], s]; If[s == {}, a[n - 1] + a[n - 2] + a[n - 3], First[s]]]]; Array[a, 80] (* Giovanni Resta, Jun 20 2016 *)

Extensions

Data corrected by Giovanni Resta, Jun 20 2016
Showing 1-4 of 4 results.