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 31-37 of 37 results.

A305848 Solution b() of the complementary equation a(n) + b(n) = 5n, where a(1) = 1. See Comments.

Original entry on oeis.org

4, 8, 12, 15, 19, 23, 26, 30, 34, 37, 41, 44, 48, 52, 55, 59, 63, 66, 70, 73, 77, 81, 84, 88, 92, 95, 99, 102, 106, 110, 113, 117, 120, 124, 128, 131, 135, 139, 142, 146, 149, 153, 157, 160, 164, 168, 171, 175, 178, 182, 186, 189, 193, 196, 200, 204, 207
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2018

Keywords

Comments

The increasing complementary sequences a() and b() are uniquely determined by the titular equation and initial value. Let x = (5 - sqrt(5))/2 and y = (5 + sqrt(5))/2. Let r = y - 2 = golden ratio (A001622). It appears that
2 - r <= n*x - a(n) < r and 2 - r < b(n) - n*y < r for all n >= 1.

Examples

			a(1) = 1, so b(1) = 5 - a(1) = 4. In order for a() and b() to be increasing and complementary, we have a(2) = 2, a(3) = 3, a(4) = 5, etc.
		

Crossrefs

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    u = 5; v = 5; z = 220;
    c = {v}; a = {1}; b = {Last[c] - Last[a]};
    Do[AppendTo[a, mex[Flatten[{a, b}], Last[a]]];
      AppendTo[c, u Length[c] + v];
      AppendTo[b, Last[c] - Last[a]], {z}];
    c = Flatten[Position[Differences[a], 2]];
    a  (* A305847 *)
    b  (* A305848 *)
    c  (* A305849 *)
    (* Peter J. C. Moses, May 30 2018 *)

A036571 Binary packing of Connell sequence (shifted once right).

Original entry on oeis.org

0, 1, 3, 11, 27, 91, 347, 859, 2907, 11099, 43867, 109403, 371547, 1420123, 5614427, 22391643, 55946075, 190163803, 727034715, 2874518363, 11464452955, 45824191323, 114543668059, 389421575003
Offset: 0

Views

Author

Keywords

Comments

Binary representation of n has 1's at positions specified by Connell sequence (A001614).

Examples

			347=101011011 in binary, with 1's at positions 1,2,4,5,7,9.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from math import isqrt
    def A036571_gen(): # generator of terms
        c = 0
        for n in count(1):
            yield c
            c += 1<<(m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1)-1
    A036571_list = list(islice(A036571_gen(),25)) # Chai Wah Wu, Jul 26 2022

Formula

a(0)=0, a(n) = a(n-1) + 2^((2*n - floor((1/2)*(1 + sqrt(8*n - 7)))) - 1).

A118012 a(n) = 4*A117384(n) - n; a self-inverse permutation of the natural numbers.

Original entry on oeis.org

3, 6, 1, 8, 11, 2, 13, 4, 15, 18, 5, 20, 7, 22, 9, 24, 27, 10, 29, 12, 31, 14, 33, 16, 35, 38, 17, 40, 19, 42, 21, 44, 23, 46, 25, 48, 51, 26, 53, 28, 55, 30, 57, 32, 59, 34, 61, 36, 63, 66, 37, 68, 39, 70, 41, 72, 43, 74, 45, 76, 47, 78, 49, 80, 83, 50, 85, 52, 87, 54, 89, 56
Offset: 1

Views

Author

Paul D. Hanna, Apr 10 2006

Keywords

Comments

A117384 is defined by A117384(n) = A117384(k) when k = 4*A117384(n) - n. A001614 is the Connell sequence generated as: 1 odd, 2 even, 3 odd, .. and A118011 is the complement of A001614.

Crossrefs

Formula

a(a(n)) = n; a(A118011(n)) = a(4*n - A001614(n)) = A001614(n).

A190716 a(2*n) = 2*n and a(2*n-1) = A054569(n).

Original entry on oeis.org

1, 2, 7, 4, 21, 6, 43, 8, 73, 10, 111, 12, 157, 14, 211, 16, 273, 18, 343, 20, 421, 22, 507, 24, 601, 26, 703, 28, 813, 30, 931, 32, 1057, 34, 1191, 36, 1333, 38, 1483, 40, 1641, 42, 1807, 44, 1981, 46, 2163, 48, 2353, 50, 2551, 52, 2757, 54, 2971, 56, 3193
Offset: 1

Views

Author

Johannes W. Meijer, May 18 2011

Keywords

Comments

Equals the Row2 triangle sums of the Connell sequence A001614 as a triangle. The Row2(n) triangle sums are defined by Row2(n) = sum((-1)^(n+k)*T(n,k), k=1..n), see A180662.

Crossrefs

Programs

  • Maple
    A190716:= n-> coeff (series (x*(1+2*x+4*x^2-2*x^3+3*x^4)/(1-x^2)^3, x, n+1), x, n): seq(A190716(n), n=1..49);
  • Mathematica
    a[n_]:=(1-(-1)^n(n-1)^2+n^2)/2; Array[a,57] (* Stefano Spezia, Aug 19 2025 *)

Formula

a(2*n) = 2*n and a(2*n-1) = 4*n^2 - 6*n + 3.
G.f.: x*(1+2*x+4*x^2-2*x^3+3*x^4)/(1-x^2)^3.
From Stefano Spezia, Aug 19 2025: (Start)
a(n) = (1 - (-1)^n*(n - 1)^2 + n^2)/2.
E.g.f.: (1 + x + x^2)*sinh(x). (End)

A138585 The sequence is formed by concatenating subsequences S1, S2, ... each of finite length. S1 consists of the element 1. The n-th subsequence consist of numbers {(n/2)*(n/2 - 1)+ 1, ..., (n/2)*(n/2 + 1)} for n even, {((n-1)/2)^2, ..., (n-1)/2 * ((n-1)/2 + 2)} for n odd.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 3, 4, 5, 6, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 12, 9, 10, 11, 12, 13, 14, 15, 13, 14, 15, 16, 17, 18, 19, 20, 16, 17, 18, 19, 20, 21, 22, 23, 24, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 31, 32, 33, 34, 35
Offset: 1

Views

Author

Ctibor O. Zizka, May 13 2008

Keywords

Comments

A generalized Connell sequence.
Except for the first term the first element of each subsequence Sn (equivalently, each row of the triangle) gives A004652 (offset by 1), and the last element is A035106.

Examples

			S1: {1}
S2: {1,2}
S3: {1,2,3,}
S4: {3,4,5,6}
S5: {4,5,6,7,8}
S6: {7,8,9,10,11,12}, etc.
so concatenation of S1/S2/S3/S4/S5/S6/... gives:
1,1,2,1,2,3,3,4,5,6,4,5,6,7,8,7,8,9,10,11,12,...
		

Crossrefs

Cf. A001614.

Programs

  • Maple
    S := proc(n) local s: if(n=1)then s:=1: elif(n mod 2 = 0)then s:=(n/2)*(n/2 -1)+1: else s:=((n-1)/2)^2: fi: seq(k,k=s..s+n-1): end: seq(S(n),n=1..12); # Nathaniel Johnston, Oct 01 2011

Extensions

Corrected and edited by D. S. McNeil, Dec 12 2010

A193732 Connell-like sequence.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 28, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 112, 114, 116, 118, 120
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 08 2011

Keywords

Examples

			Let prime(n) denote the n-th prime.
Because prime(1)=2, take first 2 odd numbers giving a(1)=1, a(2)=3.
Because prime(2)=3, take 3 even numbers starting with 4 giving a(3)=4, a(4)=6, a(5)=8.
Because prime(3)=5, take 5 odd numbers starting with 9 giving a(6)=9, a(7)=11, a(8)=13, a(9)=15, a(10)=17.
Because prime(4)=7, take 7 even numbers starting with 18 gives a(11)=18, a(12)=20, ..., a(17)=30 etc.
		

Crossrefs

Programs

  • Maple
    cp:=2:ct:=1:a := proc(n) option remember: global cp,ct: if(n=1)then return 1: elif(ct=cp)then ct:=1:cp:=nextprime(cp): return a(n-1)+1: else ct:=ct+1: return a(n-1)+2: fi: end: seq(a(n),n=1..100); # Nathaniel Johnston, Aug 11 2011
  • Mathematica
    nxt[{p_,a_}]:={NextPrime[p],Range[Last[a]+1,Last[a]+2*NextPrime[p],2]}; Transpose[NestList[nxt,{2,{1,3}},10]][[2]]//Flatten (* Harvey P. Dale, Mar 23 2016 *)

A193666 F(2) odd Fib. numbers, F(3) even Fib. numbers, F(4) odd Fib. numbers..., F(n) = A000045(n), a(n) < a(n+1).

Original entry on oeis.org

1, 2, 8, 13, 21, 55, 144, 610, 2584, 10946, 46368, 75025, 121393, 317811, 514229, 1346269, 2178309, 5702887, 9227465, 14930352, 63245986, 267914296, 1134903170, 4807526976, 20365011074, 86267571272, 365435296162, 1548008755920, 6557470319842, 27777890035288
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 08 2011

Keywords

Examples

			Taking (F(2)=) 1 odd Fib. number gives a(1)=1.
Then taking F(3)=2 even Fib. numbers starting with 2 gives a(2)=2, a(3)=8.
Then taking F(4)=3 odd Fib. numbers starting with 13 gives a(4)=13, a(5)=21, a(6)=55.
Then taking F(5)=5 even Fib. numbers starting with 144 gives a(7)=144, a(8)=610, a(9)=2584, a(10)=10946, a(11)=46368, etc...
		

Crossrefs

Previous Showing 31-37 of 37 results.