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 21-30 of 66 results. Next

A126441 Tabular arrangement of the natural numbers: the row on which any nonzero term a(n) appears in is A053645(a(n))=A053645(n+1), and the column is A161511(a(n)). Table is presented by columns with 2^{k-1} items in column k, unused positions are filled with 0's.

Original entry on oeis.org

1, 2, 3, 4, 5, 0, 7, 8, 9, 6, 11, 0, 0, 0, 15, 16, 17, 10, 19, 0, 13, 0, 23, 0, 0, 0, 0, 0, 0, 0, 31, 32, 33, 18, 35, 12, 21, 14, 39, 0, 0, 0, 27, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 34, 67, 20, 37, 22, 71, 0, 25, 0, 43, 0, 29, 0, 79, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0
Offset: 0

Views

Author

Alford Arnold, Jan 19 2007

Keywords

Comments

Note: 1 might be a more natural starting offset for this sequence, although the identities concerning A053645 and A161511 would have to be changed. - Antti Karttunen, Oct 12 2009.
This can be regarded as an arrangement of the partitions, indexed by position in A125106. The partitions in a given row all have the same remaining partition when the largest part is removed; specifically, the partition indexed by the row number in A125106 (with row 0 having the empty partition remaining).
The first value on row n is A004760(n+1). The second value on each row is A004760(n+1) plus A062383(n); subsequent values increase by ever enlarging powers of two. Or equivalently, each subsequent value on the row after the first nonzero value is given by A004754(previous value on the same row).
A055941(r) tells how many terms the row r (>= 0) has been shifted rightward from its "natural position", i.e. with how many zeros that row has been prepended.
The number of (nonzero) entries in column k is A000041(k).

Examples

			The largest power of 2 <= 6 is 4, 6 - 4 = 2, so 6 is in row 2. By A125106, 6 corresponds to the partition [2^2], total 4, so 6 goes in column 4. Thus T(2,4) = 6.
The table begins:
1.2.4..8.16.32.64.128.256.512.1024
..3.5..9.17.33.65.129.257.513.1025
.......6.10.18.34..66.130.258..514
....7.11.19.35.67.131.259.515.1027
............12.20..36..68.132..260
.........13.21.37..69.133.261..517
............14.22..38..70.134..262
......15.23.39.71.135.263.519.1031
...................24..40..72..136
...............25..41..73.137..265
...................26..42..74..138
............27.43..75.139.267..523
.......................28..44...76
...............29..45..77.141..269
...................30..46..78..142
.........31.47.79.143.271.527.1039
...........................48...80
.......................49..81..145
...........................50...82
...................51..83.147..275
		

Crossrefs

Cf. A125106, A053645, A000041, A004760, A062383, A000079 (column lengths).
A053645(a(A166274(n))) = A053645(1+A166274(n)) for all n>=1.
Positions of zeros: A166275, this sequence without zeros: A161924. A161920(n) gives the position of the first nonzero term on the row n-1.

Programs

  • Mathematica
    columns = 7; row[n_] := n-2^Floor[Log2[n]]; col[0] = 0; col[n_] := If[EvenQ[n], col[n/2] + DigitCount[n/2, 2, 1], col[(n-1)/2]+1]; Clear[T]; T[, ] = 0; Do[T[row[k], col[k]] = k, {k, 1, 2^columns}]; Table[T[n-1, k], {k, 1, columns}, {n, 1, 2^(k-1)}] // Flatten (* Jean-François Alcover, Sep 09 2017 *)

Extensions

Edited by Franklin T. Adams-Watters, Jan 23 2007
Further edited and Scheme-code added by Antti Karttunen, Oct 12 2009

A064235 The smallest power of 3 that is greater than or equal to n.

Original entry on oeis.org

1, 3, 3, 9, 9, 9, 9, 9, 9, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81
Offset: 1

Views

Author

Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Sep 22 2001

Keywords

Comments

Let A_n be the upper triangular matrix in the group GL(n,3) of invertible n X n matrices over GF(3) that has zero entries below the diagonal and 1 elsewhere. For example for n=4 the matrix is / 1,1,1,1 / 0,1,1,1 / 0,0,1,1 / 0,0,0,1 /. a(n) is the order of this matrix as an element of GL(n,3).
For n>1 a(n) is the smallest integer such that gcd(a(n),2^a(n)+1) >= n. - Benoit Cloitre, Apr 21 2002
From Jianing Song, Jul 05 2025: (Start)
a(n+1) is the period of {binomial(N,n) mod 3: N in Z}. For the general result, see A349593.
Since the modulus (3) is a prime, the remainder of binomial(N,n) is given by Lucas's theorem. (End)

Crossrefs

Cf. A062383.
With offset 0, column 3 of A349593. A062383, A385552, A385553, and A385554 are respectively columns 2, 5, 6, and 10.

Programs

  • Haskell
    import Data.List (transpose)
    a064235 n = genericIndex a064235_list (n - 1)
    a064235_list = 1 : zs where
       zs = 3 : 3 : (map (* 3) $ concat $ transpose [zs, zs, zs])
    -- Reinhard Zumkeller, Sep 02 2015
    
  • Maple
    A064235 := proc(n)
            ceil(log(n)/log(3)) ;
            3^% ;
    end proc: # R. J. Mathar, Nov 06 2011
  • Mathematica
    nn=100;With[{p3=3^Range[0,Ceiling[Log[3,nn]]]},Flatten[Table[Select[ p3, #>=n&, 1],{n,nn}]]] (* Harvey P. Dale, Mar 14 2013 *)
  • Python
    from gmpy2 import digits
    def A064235(n): return 3**len(digits(n-1,3)) if n>1 else 1 # Chai Wah Wu, Oct 21 2024

Formula

a(n) = 3 ^ A080342(n). - Reinhard Zumkeller, Sep 02 2015
Sum_{n>=1} 1/a(n)^2 = 4/3. - Amiram Eldar, Aug 16 2022

Extensions

More terms from James Sellers, Sep 26 2001

A292671 Upper right triangle A(m,n) = least number of symbols required to fill a grid of size n X n row by row in the greedy way such that in no row or column or m X m square a symbol occurs more than once.

Original entry on oeis.org

1, 2, 4, 4, 6, 9, 4, 6, 11, 16, 8, 7, 13, 18, 25, 8, 8, 13, 18, 27, 36, 8, 10, 13, 20, 29, 38, 49, 8, 10, 13, 20, 32, 38, 51, 64, 16, 13, 14, 22, 33, 40, 53, 66, 81, 16, 15, 14, 22, 33, 40, 56, 66, 83, 100, 16, 16, 15, 23, 33, 41, 57, 68, 85, 102
Offset: 1

Views

Author

M. F. Hasler, Sep 20 2017

Keywords

Comments

Consider the symbols as positive integers. By the greedy way we mean to fill the grid row by row from left to right always with the least possible positive integer such that the three constraints (on rows, columns and rectangular blocks) are satisfied. In contrast to the sudoku case, the m X m rectangles have "floating" borders, so the constraint is actually equivalent to say that any element must be different from all neighbors in a Moore neighborhood of range m-1 (having up to (2m-1)^2 grid points). See A292673 for examples.
One can consider the infinite square array A(m,n) defined in the same way, but the lower triangular part of it is uninteresting: for m>n one has A(m,n) = n^2, i.e., the columns continue below the diagonal indefinitely with the same value, n^2.

Examples

			The infinite square array would look as follows: (but the sequence only lists the upper right triangle: 1; 2, 4; 4, 6, 9; 4, 6, 11, 16; ...):
   [1  2  4  4  8  8  8  8 16 ...]  m=1: A(1,n) = 2^ceil(log_2(n)) = A062383(n-1)
   [1\_4  6  6  7  8 10 10 13 ...]  m=2: A(2,n) = A292672(n)
   [1  4\_9 11 13 13 13 13 14 ...]  m=3: A(3,n) = A292673(n) : see here
   [1  4  9\16 18 18 20 20 22 ...]  m=4: A(4,n) = A292674(n) :  for examples
   [1  4  9 16\25 27 29 32 33 ...]  m=5: A(5,n) = A292675(n)
   [1  4  9 16 25\36 38 38 40 ...]  m=6: A(6,n) = A292676(n)
   [1  4  9 16 25 36\49 51 53 ...]  m=7: A(7,n) = A292677(n)
   [1  4  9 16 25 36 49\64 66 ...]  m=8: A(8,n) = A292678(n)
   [1  4  9 16 25 36 49 64\81 ...]  m=9: A(9,n) = A292679(n)
   [...   ...  ...  ...  ...  ...]
		

Crossrefs

Programs

  • PARI
    A(m, n, g=matrix(n, n))={my(ok(g, k, i, j, m)=if(m, ok(g[i, ], k)&&ok(g[, j], k)&&ok(concat(Vec(g[max(1, i-m+1)..i, max(1, j-m+1)..min(#g, j+m-1)])), k), !setsearch(Set(g), k))); for(i=1, n, for(j=1, n, for(k=1, n^2, ok(g, k, i, j, m)&&(g[i, j]=k)&&break))); vecmax(g)} \\ without "vecmax" the program returns the full n X n board.
    
  • Python
    def A(m, n): # change m for A292672, ..., A292679
        mx, S, N, b = 0, {1}, range(1, n+1), m # b is block size
        g = [[0 for j in range(n+b)] for i in range(n+b)]
        row, col = {i:set() for i in N}, {j:set() for j in N}
        offsets = [(i, j) for i in range(-b+1, 1) for j in range(-b+1, 1)]
        offsets += [(i, j) for i in range(-b+1, 0) for j in range(1, b)]
        for i in N:
            for j in N:
                rect = set(g[i+o[0]][j+o[1]] for o in offsets)
                e = min(S - row[i] - col[j] - rect)
                g[i][j] = e
                if e > mx:
                    mx = e
                    S.add(mx+1)
                row[i].add(e)
                col[j].add(e)
        return mx
    print([A(m, n) for n in range(1, 12) for m in range(1, n+1)]) # Michael S. Branicky, Apr 13 2023

A076877 a(n) = A020330(n) / n.

Original entry on oeis.org

3, 5, 5, 9, 9, 9, 9, 17, 17, 17, 17, 17, 17, 17, 17, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 129, 129, 129, 129, 129, 129
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 25 2002

Keywords

Examples

			12 -> '1100' -> '1100'1100' = '11001100' -> 204 = A020330(12): a(12) = A020330(12)/12 = 204/12 = 17.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := 1 + 2^Floor[Log2[n] + 1]; Array[a, 50] (* Amiram Eldar, Apr 07 2021 *)

Formula

a(n) = 1 + 2^(1 + Log2(n)), with Log2 = A000523.
a(n) = 1 + 2*A053644(n).
a(n) = 1 + A062383(n).

A101402 a(0)=0, a(1)=1; for n>=2, let k = smallest power of 2 that is >= n, then a(n) = a(k/2) + a(n-1-k/2).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 26, 27, 27, 27
Offset: 0

Views

Author

Odimar Fabeny, Jan 16 2005

Keywords

Comments

Either a(n) = a(n-1) or a(n) = a(n-1) + 1. Proof: Suppose n is a power of 2, then a(n+1) = a(n) + a(0) = a(n). Otherwise let 2m be the largest power of 2 greater than n, so a(n) = a(m) + a(n-1-m) and a(n+1) = a(m) + a(n-m) and then proceed by induction. - Charles R Greathouse IV, Aug 27 2014
It appears that this sequence gives the partial sums of A164349. - Arie Groeneveld, Aug 27 2014
Each term other than zero appears at least twice. Suppose m is a power of 2, then a(2m) and a(4m) appear at least twice by my above comment. Otherwise suppose 3 <= k+2 <= 2m, then a(2m+k) = a(m) + a(m+k-1), a(2m+k+1) = a(m) + a(2m+k), and a(2m+k+2) = a(m) + a(m) + a(m+k+1), so a(2m+k+2) - a(2m+k) = a(m+k+1) - a(m+k-1). So if each term from a(m) to a(2m) appears at least twice then so will each term in a(2m) to a(4m). - Charles R Greathouse IV, Sep 10 2014
a(n) = Theta(n), see link. - Benoit Jubin, Sep 16 2014
The position of where n first appears: 0, 1, 4, 6, 10, 13, 15, 18, 21, 23, 27, 30, 32, 34, 37, 39, 43, 46, 48, 51, 54, 56, 60, 63, 66, 69, ... - Robert G. Wilson v, Sep 19 2014
The (10^k)-th term: 0, 3, 36, 355, 3549, 35494, 354942, ... - Robert G. Wilson v, Sep 19 2014

Examples

			a(2) = a(1) + a(0) = 1 = 1 + 0;
a(3) = a(2) + a(0) = 1 = 1 + 0;
a(4) = a(2) + a(1) = 2 = 1 + 1;
a(5) = a(4) + a(0) = 2 = 2 + 0;
a(6) = a(4) + a(1) = 3 = 2 + 1;
a(7) = a(4) + a(2) = 3 = 2 + 1;
a(8) = a(4) + a(3) = 3 = 2 + 1;
a(9) = a(8) + a(0) = 3 = 3 + 0; ...
The terms fall naturally into blocks of sizes 1,1,1,2,4,8,16,32,...:
0,
1,
1,
1, 2,
2, 3, 3, 3,
3, 4, 4, 4, 5, 5, 6, 6,
6, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 12,
12, 13, 13, 13, 14, 14, ...
Then the definition says that the k-th block is the final term of the previous block added to the sequence starting from the beginning (e.g., 34445566 = 3 + 01112233).
The final terms of the blocks, a(2^k), appear to be given by A164363. - _N. J. A. Sloane_, Aug 27 2014
		

Crossrefs

Programs

  • Haskell
    import Data.Function (on); import Data.List (genericIndex)
    a101402 = genericIndex a101402_list
    a101402_list = 0 : 1 : zipWith ((+) `on` a101402)
                           (tail a053644_list) a053645_list
    -- Reinhard Zumkeller, Aug 27 2014
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = Block[{p = 2^(Ceiling[Log[2, n]] - 1)}, a[p] + a[n - 1 - p]]; Table[ a@n, {n, 0, 100}] (* Robert G. Wilson v, Aug 17 2009 *)
  • PARI
    a(n)=if(n<4, n>0, my(k=2^(log(n-.5)\log(2))); a(k) + a(n-1-k)) \\ Charles R Greathouse IV, Aug 25 2014
    

Formula

For n > 1: a(n) = a(A053644(n-1)) + a(A053645(n-1)). - Reinhard Zumkeller, Aug 27 2014

Extensions

Offset corrected by R. J. Mathar, Aug 17 2009
More terms from Robert G. Wilson v, Aug 17 2009

A160855 a(n) is the smallest positive integer not occurring earlier in the sequence such that Sum_{k=1..n} a(k) written in binary contains binary n as a substring.

Original entry on oeis.org

1, 3, 2, 6, 8, 4, 5, 11, 10, 24, 12, 13, 7, 9, 28, 17, 36, 14, 20, 46, 22, 44, 25, 18, 15, 16, 19, 21, 23, 26, 38, 33, 68, 30, 37, 29, 65, 39, 27, 57, 50, 88, 45, 85, 47, 83, 48, 34, 49, 51, 79, 53, 56, 32, 31, 35, 40, 41, 42, 63, 58, 72, 64, 66, 69, 61, 129, 93, 106, 60, 86
Offset: 1

Views

Author

Leroy Quet, May 28 2009

Keywords

Comments

Is this a permutation of the positive integers?
The smallest number not in {a(n) | n<=8000000} is 5083527. It appears that the quotient (a(1)+...+a(n))/n^2 meanders around between 1/2 (=perfect permutation) and 2/3: at n=8000000 the value is approximately 0.5866 (does it converge? 1/2? Golden ratio?).
The scatterplot of the first 100000 terms (see "graph") has some remarkable features which have not yet been explained. - Leroy Quet, Jul 05 2009
The lines that appear in the scatterplot seem to be related to the position of n in the sum of the first n terms; see colorized scatterplots in the Links section. - Rémy Sigrist, May 08 2017
From Michael De Vlieger, May 09 2017: (Start)
Starting positions of n in Sum_{k=1..n} a(k) written in binary: {1, 1, 1, 2, 1, 1, 1, 3, 2, 4, 3, 1, 1, 1, 5, 3, 2, 4, 3, 5, 4, 5, ...}.
Running total of a(n) in binary: {1, 100, 110, 1100, 10100, 11000, 11101, 101000, 110010, 1001010, 1010110, 1100011, 1101010, 1110011, ...}.
(End)

Examples

			From _Michael De Vlieger_, May 09 2017: (Start)
a(1) = 1 since binary n = "1" appears in the binary total of all numbers in the sequence "1" at position 1.
a(2) = 3 since binary n = "10" appears in the binary total of all numbers in the sequence (1 + 3) = "100" starting at position 1.
a(3) = 2 since binary n = "11" appears in the binary total of all numbers in the sequence (1 + 3 + 2) = "110" starting at position 1.
a(4) = 6 since binary n = "100" appears in the binary total of all numbers in the sequence (1 + 3 + 2 + 6) = "1100" starting at position 2.
...
(End)
		

Crossrefs

Cf. A160856.
Cf. A062383, A236341 (putative inverse).

Programs

  • Haskell
    import Data.List (delete)
    a160855 n = a160855_list !! (n - 1)
    a160855_list = 1 : f 2 1 [2..] where
       f x sum zs = g zs where
         g (y:ys) = if binSub x (sum + y)
                       then y : f (x + 1) (sum + y) (delete y zs) else g ys
       binSub u = sub where
          sub w = mod w m == u || w > u && sub (div w 2)
          m = a062383 u
    -- Reinhard Zumkeller, Jul 12 2015
  • Mathematica
    a = {}; Do[k = 1; While[Or[MemberQ[a, k], SequencePosition[ IntegerDigits[Total@ a + k, 2], #] == {}], k++] &@ IntegerDigits[n, 2]; AppendTo[a, k], {n, 71}]; a (* Michael De Vlieger, May 09 2017, Version 10.1 *)

Formula

a(A236341(n)) = n. - Reinhard Zumkeller, Jul 12 2015

Extensions

Extended by Ray Chandler, Jun 15 2009

A054243 Number of partitions of n into distinct positive parts <= n, where parts are combined by XOR.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 8, 16, 16, 32, 64, 128, 256, 512, 1024, 2048, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 67108864, 134217728, 268435456, 536870912
Offset: 0

Views

Author

Marc LeBrun, Feb 08 2000

Keywords

Comments

Usually successive powers of 2, but "stutters" when n is power of 2. (G.f. must satisfy some interesting functional equations!). Empty partition of 0 defined as 1.
This is an instance of what I like to call "numbral theory": whenever you have a set of indexed objects that you can do some kind of arithmetic on, then the indices act as "shadows" of the objects and you can generally talk about lots of analogs, such as partitions, primes, even generating functions, etc. It would be worthwhile to systematically "fill out" the entries for as many of these systems as possible in the OEIS.
The "AND" version is just the all-ones sequence. - Christian G. Bower, Jun 07 2005
a(n) is the number of orbits of the FlipAfter1 map on integers with n+1 binary digits. The FlipAfter1 map on an integer in binary form is: flip each bit that is immediately preceded by a "1". For example, the orbits on 4-bit numbers are 1000 -> 1100 -> 1010 -> 1111 and 1001 -> 1101 -> 1011 -> 1110. The orbits on n-bit numbers are all of length 2^floor(log_2(n-1)+1) (for n >= 2), A062383. There is precisely one member of each orbit in the following set: integers in binary form such that each bit at distance a power of two from the leading "1" is 0. This set of orbit representatives begins 1, 10, 100, 1000, 1001, 10000, 10010, 100000, 100001, 100100, 100101. - David Callan, Oct 13 2012

Examples

			a(5)=4 thus: 5 4+1 5+3+2+1 4+3+2 (where "+" = XOR).
		

Crossrefs

Inclusive-OR (or IOR) version: A054244.
Cf. A160473.

Programs

Formula

a(n) = 2^floor(n - log_2(n) - 1) = A000079(n)/A062383(n). - Henry Bottomley, Nov 22 2001

A162440 The pg(n) sequence that is associated with the Eta triangle A160464.

Original entry on oeis.org

2, 16, 144, 4608, 115200, 4147200, 203212800, 26011238400, 2106910310400, 210691031040000, 25493614755840000, 3671080524840960000, 620412608698122240000, 121600871304831959040000
Offset: 2

Views

Author

Johannes W. Meijer, Jul 06 2009

Keywords

Comments

The EG1 matrix coefficients are defined by EG1[2m-1,1] = 2*eta(2m-1) and the recurrence relation EG1[2m-1,n] = EG1[2m-1,n-1] - EG1[2m-3,n-1]/(n-1)^2 with m = .., -2, -1, 0, 1, 2, ... and n = 1, 2, 3, ... . As usual, eta(m) = (1-2^(1-m))*zeta(m) with eta(m) the Dirichlet eta function and zeta(m) the Riemann zeta function. For the EG2 matrix, the even counterpart of the EG1 matrix, see A008955.
The coefficients in the columns of the EG1 matrix, for m >= 1 and n >= 2, can be generated with GFE(z;n) = ((-1)^(n-1)*r(n)*CFN1(z,n)*GFE(z;n=1) + ETA(z,n))/pg(n) for n >= 2.
The CFN1(z,n) polynomials depend on the central factorial numbers A008955 and the ETA(z,n) are the Eta polynomials which led to the Eta triangle, see for both A160464.
The pg(n) sequence can be generated with the first Maple program and the EG1[2m-1,n] matrix coefficients can be generated with the second Maple program.
The EG1 matrix is related to the ES1 matrix, see A160464 and the formulas below.

Examples

			The first few generating functions GFE(z;n) are:
GFE(z;n=2) = ((-1)*2*(z^2 - 1)*GFE(z;n=1) + (-1))/2,
GFE(z;n=3) = ((+1)*4*(z^4 - 5*z^2 + 4)*GFE(z;n=1) + (-11 + 2*z^2))/16,
GFE(z;n=4) = ((-1)*4*(z^6-14*z^4+49*z^2-36)*GFE(z;n=1) + (-114+29*z^2-2*z^4))/144.
		

References

  • Mohammad K. Azarian, Problem 1218, Pi Mu Epsilon Journal, Vol. 13, No. 2, Spring 2010, p. 116. Solution published in Vol. 13, No. 3, Fall 2010, pp. 183-185.

Crossrefs

The ETA(z, n) polynomials and the ES1 matrix lead to the Eta triangle A160464.
The CFN1(z, n), the t1(n, m) and the EG2 matrix lead to A008955.
The EG1[ -1, n] equal (1/2)*A001803(n-1)/A046161(n-1).
The r(n) sequence equals A062383(n) (n>=1).
The e(n) sequence equals A029837(n) (n>=1).
Cf. A160473 (p(n) sequence).
Cf. A162443 (BG1 matrix), A162446 (ZG1 matrix) and A162448 (LG1 matrix).

Programs

  • Maple
    nmax := 16; seq((n-1)!^2*2^floor(ln(n-1)/ln(2)+1), n=2..nmax);
    # End program 1
    nmax1 := 5; coln := 4; mmax1 := nmax1: for n from 0 to nmax1 do t1(n, 0) := 1 end do: for n from 0 to nmax1 do t1(n, n) := (n!)^2 end do: for n from 1 to nmax1 do for m from 1 to n-1 do t1(n, m) := t1(n-1, m-1)*n^2 + t1(n-1, m) end do: end do: for m from 1 to mmax1 do EG1[1-2*m, 1] := evalf((2^(2*m)-1)* bernoulli(2*m)/(m)) od: EG1[1, 1] := evalf(2*ln(2)): for m from 2 to mmax1 do EG1[2*m-1, 1] := evalf(2*(1-2^(1-(2*m-1))) * Zeta(2*m-1)) od: for m from -mmax1+coln to mmax1 do EG1[2*m-1, coln]:= (-1)^(coln+1)*sum((-1)^k*t1(coln-1, k) * EG1[1-2*coln+2*m+2*k, 1], k=0..coln-1)/(coln-1)!^2 od;
    # End program 2 (Edited by Johannes W. Meijer, Sep 21 2012)

Formula

pg(n) = (n-1)!^2*2^floor(log(n-1)/log(2)+1) for n >= 2.
r(n) = 2^e(n) = 2^floor(log(n-1)/log(2)+1) for n >= 2.
EG1[ -1,n] = 2^(1-2*n)*(2*n-1)!/((n-1)!^2) for n >= 1.
GFE(z;n) = sum (EG1[2*m-1,n]*z^(2*m-2), m=1..infinity).
GFE(z;n) = (1-z^2/(n-1)^2)*GFE(z;n-1)-EG1[ -1,n-1]/(n-1)^2 for n = >2. with GFE(z;n=1) = 2*log(2)-Psi(z)-Psi(-z)+Psi(z/2)+Psi(-z/2) and Psi(z) is the digamma function.
EG1[2m-1,n] = (2*2^(1-2*n)*(2*n-1)!/((n-1)!^2)) * ES1[2m-1,n].

A180076 a(n+1) = if it exists, smallest number not occurring earlier that is contained in binary representation of a(n), otherwise: a(n+1) = 3*a(n)+1; a(0) = 0.

Original entry on oeis.org

0, 1, 4, 2, 7, 3, 10, 5, 16, 8, 25, 6, 19, 9, 28, 12, 37, 18, 55, 11, 34, 17, 52, 13, 40, 20, 61, 14, 43, 21, 64, 32, 97, 24, 73, 36, 109, 22, 67, 33, 100, 50, 151, 23, 70, 35, 106, 26, 79, 15, 46, 139, 69, 208, 80, 241, 30, 91, 27, 82, 41, 124, 31, 94, 47, 142, 71, 214, 53, 160
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 14 2010

Keywords

Comments

Permutation of the natural numbers with inverse A180077;
if a(n-1) > a(n) then a(n) < a(n+1) = 3*a(n)+1;
see A180110 for m with a(m-2) < a(m-1) < a(m);
A180078(n) = a(a(n));
a(A180079(n)) = A180079(a(n)) = A180077(n);
A180080 and A180081 give record values and where they occur.

Crossrefs

Cf. A030308.
Cf. A062383.

Programs

  • Haskell
    import Data.List (delete)
    a180076 n = a180076_list !! n
    a180076_list :: [Integer]
    a180076_list = 0 : f 0 [1..] where
       f x zs = y : f y (delete y zs) where
         y = if null ys then 3 * x + 1 else head ys
         ys = [y | y <- takeWhile (< x) zs, binInfix y x]
       binInfix u v = ib v where
         ib w = w `mod` m == u || w > u && ib (w `div` 2)
         m = a062383 u
    -- Reinhard Zumkeller, Mar 13 2014, Feb 19 2013

A142151 a(n) = OR{k XOR (n-k): 0<=k<=n}.

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 6, 7, 14, 13, 14, 11, 14, 13, 14, 15, 30, 29, 30, 27, 30, 29, 30, 23, 30, 29, 30, 27, 30, 29, 30, 31, 62, 61, 62, 59, 62, 61, 62, 55, 62, 61, 62, 59, 62, 61, 62, 47, 62, 61, 62, 59, 62, 61, 62, 55, 62, 61, 62, 59, 62, 61, 62, 63, 126, 125, 126, 123, 126, 125
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Bits (xor, (.|.))
    a142151 :: Integer -> Integer
    a142151 = foldl (.|.) 0 . zipWith xor [0..] . reverse . enumFromTo 1
    -- Reinhard Zumkeller, Mar 31 2015
    
  • Julia
    using IntegerSequences
    A142151List(len) = [Bits("CIMP", n, n+1) for n in 0:len]
    println(A142151List(69))  # Peter Luschny, Sep 25 2021
    
  • Maple
    A142151 := n -> n + Bits:-Nor(n, n+1):
    seq(A142151(n), n=0..69); # Peter Luschny, Sep 26 2019
  • Python
    from functools import reduce
    from operator import or_
    def A142151(n): return 0 if n == 0 else reduce(or_,(k^n-k for k in range(n+1))) if n % 2 else (1 << n.bit_length()-1)-1 <<1 # Chai Wah Wu, Jun 30 2022

Formula

a(2*n) = 2*(A062383(n)-1);
A023416(a(n)) <= 1.
Previous Showing 21-30 of 66 results. Next