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-10 of 12 results. Next

A081292 Intersection of A014486 and A079946.

Original entry on oeis.org

0, 12, 50, 52, 56, 202, 204, 210, 212, 216, 226, 228, 232, 240, 810, 812, 818, 820, 824, 842, 844, 850, 852, 856, 866, 868, 872, 880, 906, 908, 914, 916, 920, 930, 932, 936, 944, 962, 964, 968, 976, 992, 3242, 3244, 3250, 3252, 3256, 3274, 3276, 3282, 3284
Offset: 1

Views

Author

Antti Karttunen, Mar 17 2003

Keywords

Comments

These are A014486-encodings of the binary trees (or equivalent general trees) whose left subtree (equivalently: leftmost branch) is not just a single edge.

Crossrefs

Formula

a(n) = A014486(A081291(n)).

A090324 Second in a series of triangular arrays generating the natural numbers (cf. A079946).

Original entry on oeis.org

6, 13, 10, 27, 21, 18, 55, 43, 37, 34, 111, 87, 75, 69, 66, 223, 175, 151, 139, 133, 130, 447, 351, 303, 279, 267, 261, 258, 895, 703, 607, 559, 535, 523, 517, 514
Offset: 1

Views

Author

Alford Arnold, Jan 26 2004

Keywords

Comments

Note that for each triangular array T(row+1,col) = 2 * T(row,col) +1 and that the change from T(row,col+1) to T(row,col) can be readily discerned. In the first array that pattern is 1 2 4 8 ...while in the second, it becomes 3 6 12 24 48 ... and in general, the pattern for the k-th array will begin with 2k-1.

Examples

			The first array begins
1
3 2
7 5 4
15 11 9 8
31 23 19 17 16
so a(1) begins with six. In general each triangular array will begin with
the next term from A079946.
		

A090774 A permutation of the natural numbers related to sequence A079946.

Original entry on oeis.org

1, 3, 6, 2, 13, 12, 7, 10, 25, 14, 5, 27, 20, 29, 24, 4, 21, 51, 22, 49, 26, 15, 18, 41, 59, 40, 53, 28, 11, 55, 36, 45, 99, 42, 57, 30, 9, 43, 103, 38, 81, 107, 44, 61, 48, 8, 37, 83, 119, 72, 85, 115, 46, 97, 50, 31, 34, 73, 91, 199, 74, 89, 123, 80, 101, 52, 23, 111, 68, 77
Offset: 1

Views

Author

Alford Arnold, Feb 07 2004

Keywords

Comments

When viewed as a square array the first row begin with 1 6 12 14 24 ..., cf. A079946 and the second column is A090324.

Examples

			When viewed as a square array each column can be interpreted as a triangular array. Thus column two would become as illustrated below:
6
13 10
27 21 18
55 43 37 34
		

Crossrefs

Cf. A090324.

A004755 Binary expansion starts 11.

Original entry on oeis.org

3, 6, 7, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

a(n) is the smallest value > a(n-1) (or > 1 for n=1) for which A001511(a(n)) = A001511(n). - Franklin T. Adams-Watters, Oct 23 2006

Examples

			12 in binary is 1100, so 12 is in the sequence.
		

Crossrefs

Equals union of A079946 and A080565.
Cf. A004754 (10), A004756 (100), A004757 (101), A004758 (110), A004759 (111).

Programs

  • Haskell
    import Data.List (transpose)
    a004755 n = a004755_list !! (n-1)
    a004755_list = 3 : concat (transpose [zs, map (+ 1) zs])
                       where zs = map (* 2) a004755_list
    -- Reinhard Zumkeller, Dec 04 2015
    
  • Maple
    a:= proc(n) n+2*2^floor(log(n)/log(2)) end: seq(a(n),n=1..60); # Muniru A Asiru, Oct 16 2018
  • Mathematica
    Flatten[Table[FromDigits[#,2]&/@(Join[{1,1},#]&/@Tuples[{0,1},n]),{n,0,5}]] (* Harvey P. Dale, Feb 05 2015 *)
  • PARI
    a(n)=n+2*2^floor(log(n)/log(2))
    
  • PARI
    is(n)=n>2 && binary(n)[2] \\ Charles R Greathouse IV, Sep 23 2012
    
  • Python
    f = open('b004755.txt', 'w')
    lo = 3
    hi = 4
    i = 1
    while i<16384:
        for x in range(lo,hi):
            f.write(str(i)+" "+str(x)+"\n")
            i += 1
        lo <<= 1
        hi <<= 1
    # Kenny Lau, Jul 05 2016
    
  • Python
    def A004755(n): return n+(1<Chai Wah Wu, Jul 13 2022

Formula

a(2n) = 2*a(n), a(2n+1) = 2*a(n) + 1 + 2*[n==0].
a(n) = n + 2 * 2^floor(log_2(n)) = A004754(n) + A053644(n).
a(n) = 2n + A080079(n). - Benoit Cloitre, Feb 22 2003
G.f.: (1/(1+x)) * (1 + Sum_{k>=0, t=x^2^k} 2^k*(2t+t^2)/(1+t)).
a(n) = n + 2^(floor(log_2(n)) + 1) = n + A062383(n). - Franklin T. Adams-Watters, Oct 23 2006
a(2^m+k) = 2^(m+1) + 2^m + k, m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Aug 08 2016

Extensions

Edited by Ralf Stephan, Oct 12 2003

A079905 a(1)=1; then a(n) is smallest positive integer which is consistent with sequence being monotonically increasing and satisfying a(a(n)) = 2n+1 for n>1.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 96, 97, 98, 99, 100, 101, 102
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2003

Keywords

Comments

Alternate definition: a(n) is taken to be smallest positive integer greater than a(n-1) such that the condition "a(a(n)) is always odd" can be satisfied. - Matthew Vandermast, Mar 03 2003
Also: a(n)=smallest positive integer > a(n-1) such that the condition "n is in the sequence if and only if a(n) is even" is false; that is, the condition "either n is not in the sequence and a(n) is odd or n is in the sequence and a(n) is even" is satisfied. - Matthew Vandermast, Mar 05 2003

Crossrefs

See A080637 for a nicer version. Cf. A079000.
Equals A007378(n+1)-1, n>1.
A007378, A079905, A080637, A080653 are all essentially the same sequence.
Union of A079946 and A005408 (the odd numbers).

Programs

Formula

a(1)=1, a(2)=3, then a(3*2^k - 1 + j) = 4*2^k - 1 + 3j/2 + |j|/2 for k >= 1, -2^k <= j < 2^k.
a(n) = 1+A079945(n-1)-A079944(n-1) for n>1, a(1)=1. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 23 2003

A080675 a(n) = (5*4^n - 8)/6.

Original entry on oeis.org

2, 12, 52, 212, 852, 3412, 13652, 54612, 218452, 873812, 3495252, 13981012, 55924052, 223696212, 894784852, 3579139412, 14316557652, 57266230612, 229064922452, 916259689812, 3665038759252, 14660155037012, 58640620148052, 234562480592212, 938249922368852
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2003

Keywords

Comments

These numbers have a simple binary pattern: 10,1100,110100,11010100,1101010100, ... i.e., the n-th term has a binary expansion 1(10){n-1}0, that is, there are n-1 10's between the most significant 1 and the least significant 0.

Crossrefs

a(n) = A072197(n-1) - 1 = A014486(|A106191(n)|). a(n) = A079946(A020988(n-2)) for n>=2. Cf. also A122229.

Programs

Formula

a(1)=2, a(2)=12, a(n)=5*a(n-1)-4*a(n-2). - Harvey P. Dale, Oct 16 2012

Extensions

Further comments added by Antti Karttunen, Sep 14 2006

A057547 A014486-encodings of Catalan mountain ranges with no sea-level valleys, i.e., the rooted plane general trees with root degree = 1.

Original entry on oeis.org

2, 12, 52, 56, 212, 216, 228, 232, 240, 852, 856, 868, 872, 880, 916, 920, 932, 936, 944, 964, 968, 976, 992, 3412, 3416, 3428, 3432, 3440, 3476, 3480, 3492, 3496, 3504, 3524, 3528, 3536, 3552, 3668, 3672, 3684, 3688, 3696, 3732, 3736, 3748, 3752, 3760
Offset: 0

Views

Author

Antti Karttunen Sep 07 2000

Keywords

Comments

This one-to-one correspondence between all rooted plane trees and one node larger, root degree = 1 trees illustrates the fact that INVERT(A000108) = LEFT(A000108). (Catalan numbers shift left under Cameron's A transformation.)
From Ruud H.G. van Tol, May 13 2024: (Start)
Sequence on a lattice:
Tree Paths Decimal Count
|_ 10 2 1
|. 1100 12 1
||._ 110100 -111000 52,56 2
|||_._ 11010100 -11110000 212-240 5
|||_|. 1101010100-1111100000 852-992 14
... (End)

Crossrefs

Double-trunked trees: A057517. Cf. also A057548, A057549.

Programs

  • Maple
    alltrees2singletrunked := n -> pars2binexp([binexp2pars(n)]); # Just surround with extra parentheses.
  • PARI
    a_rows(N) = my(a=Vec([[2]], N)); for(r=1, N-1, my(b=a[r], c=List()); foreach(b, t, for(i=1, valuation(t, 2), listput(~c, (t<<2)+(2<Ruud H.G. van Tol, May 25 2024

Formula

a(n) = A014486(A057548(n)) and also from n > 0 onward = A079946(A014486(n)).
a(n) = alltrees2singletrunked(A014486[n]) (see Maple code below and in A057501).

A162932 a(n) = A053445(n-2) - A053445(n-4).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 3, 1, 3, 4, 4, 4, 8, 6, 10, 11, 13, 15, 22, 20, 28, 33, 39, 43, 58, 60, 77, 88, 104, 119, 148, 160, 197, 226, 265, 300, 363, 404, 481, 549, 638, 727, 858, 961, 1126, 1283, 1480, 1680, 1953, 2201, 2544, 2887, 3309, 3750, 4312, 4857, 5566, 6301, 7175
Offset: 6

Views

Author

Alford Arnold, Jul 17 2009

Keywords

Comments

a(n) counts partitions of n such that all parts are >=2 and the largest part occurs at least three times, see example.

Examples

			For n = 19 the a(19) = 6 partitions are 5554, 44443, 55522, 444322, 3333322 and 33322222.
		

Crossrefs

Programs

  • Magma
    a:=func; [a(n): n in [6..100]]; // Vincenzo Librandi, Dec 09 2014
  • Mathematica
    Table[PartitionsP[n] - 2 PartitionsP[n - 1] + 2 PartitionsP[n - 3] - PartitionsP[n - 4], {n, 6, 70}] (* Vincenzo Librandi, Dec 09 2014 *)

Formula

From Mircea Merca, Jun 11 2012: (Start)
a(n) = p(n) - 2*p(n-1) + 2*p(n-3) - p(n-4) for n >= 6, where p(n) = A000041(n).
G.f.: -1 + x - x^3 + (1 - x)*Product_{k > 2} 1/(1 - x^k). (End)
a(n) ~ exp(Pi*sqrt(2*n/3)) * Pi^3 / (36*sqrt(2)*n^(5/2)). - Vaclav Kotesovec, Jun 02 2018
G.f.: Sum_{n >= 1} q^(3*n+3)/Product_{k = 1..n} 1 - q^(k+1). - Peter Bala, Dec 01 2024

Extensions

Keyword:tabf removed, indexing corrected, sequence extended by R. J. Mathar, Sep 17 2009

A080565 Binary expansion of n has form 11**...*1.

Original entry on oeis.org

3, 7, 13, 15, 25, 27, 29, 31, 49, 51, 53, 55, 57, 59, 61, 63, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 193, 195, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233
Offset: 1

Views

Author

Benoit Cloitre, Feb 22 2003

Keywords

Comments

If n>3 is in the sequence so are 2n-1 and 2n+1.

Crossrefs

A004755 = union of A079946 and this sequence.
A diagonal of A246830.

Formula

a(n) = 2^floor(log[2](4*(n-1)))+2*n-1 for n>1, a(1)=3. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
Equals 2 * A004760(n) + 1. - Ralf Stephan, Sep 16 2003

A346305 Positions of words in A076478 that start with 1 and end with 1.

Original entry on oeis.org

2, 6, 12, 14, 24, 26, 28, 30, 48, 50, 52, 54, 56, 58, 60, 62, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238
Offset: 1

Views

Author

Clark Kimberling, Aug 16 2021

Keywords

Comments

The sequences A346303, A171757, A346304, and this sequence partition the positive integers. See A076478 for a guide to related sequences.
Is this A079946 with a 2 added in front? - R. J. Mathar, Sep 07 2021

Examples

			The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(1) = 2.
		

Crossrefs

Programs

Showing 1-10 of 12 results. Next