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 11-20 of 22 results. Next

A243503 Sums of parts of partitions (i.e., their sizes) as ordered in the table A241918: a(n) = Sum_{i=A203623(n-1)+2..A203623(n)+1} A241918(i).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 05 2014

Keywords

Comments

Each n occurs A000041(n) times in total.
Where are the first and the last occurrence of each n located?

Crossrefs

Cf. A243504 (the products of parts), A241918, A000041, A227183, A075158, A056239, A241909.
Sum of prime indices of A241916, the even bisection of A358195.
Sums of even-indexed rows of A358172.
A112798 lists prime indices, length A001222, sum A056239, max A061395.

Programs

  • Mathematica
    Table[If[n==1,0,With[{y=Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]},Last[y]*Length[y]+Last[y]-Total[y]+Length[y]-1]],{n,100}] (* Gus Wiseman, Jan 09 2023 *)

Formula

a(n) = Sum_{i=A203623(n-1)+2..A203623(n)+1} A241918(i).
a(n) = A056239(A241909(n)).
a(n) = A227183(A075158(n-1)).
a(A000040(n)) = a(A000079(n)) = n for all n >= 1.
a(A122111(n)) = a(n) for all n.
a(A243051(n)) = a(n) for all n, and likewise for A243052, A243053 and other rows of A243060.
a(n) = A061395(n) * A001222(n) + A061395(n) - A056239(n) + A001222(n) - 1. - Gus Wiseman, Jan 09 2023
a(n) = A326844(2n) + A001222(n). - Gus Wiseman, Jan 09 2023

A322827 A permutation of A025487: Sequence of least representatives of distinct prime signatures obtained from the run lengths present in the binary expansion of n.

Original entry on oeis.org

1, 2, 6, 4, 36, 30, 12, 8, 216, 180, 210, 900, 72, 60, 24, 16, 1296, 1080, 1260, 5400, 44100, 2310, 6300, 27000, 432, 360, 420, 1800, 144, 120, 48, 32, 7776, 6480, 7560, 32400, 264600, 13860, 37800, 162000, 9261000, 485100, 30030, 5336100, 1323000, 69300, 189000, 810000, 2592, 2160, 2520, 10800, 88200, 4620, 12600
Offset: 0

Views

Author

Antti Karttunen, Jan 16 2019

Keywords

Comments

A101296(a(n)) gives a permutation of natural numbers.

Examples

			The sequence can be represented as a binary tree:
                                      1
                                      |
                   ...................2...................
                  6                                       4
       36......../ \........30                 12......../ \........8
       / \                 / \                 / \                 / \
      /   \               /   \               /   \               /   \
     /     \             /     \             /     \             /     \
   216      180         210    900         72       60         24       16
etc.
Both children are multiples of their common parent, see A323503, A323504 and A323507.
The value of a(n) is computed from the binary expansion of n as follows: Starting from the least significant end of the binary expansion of n (A007088), we record the successive run lengths, subtract one from all lengths except the first one, and use the reversed partial sums of these adjusted values as the exponents of successive primes.
For 11, which is "1011" in base 2, we have run lengths [2, 1, 1] when scanned from the right, and when one is subtracted from all except the first, we have [2, 0, 0], partial sums of which is [2, 2, 2], which stays same when reversed, thus a(11) = 2^2 * 3^2 * 5^2 = 900.
For 13, which is "1101" in base 2, we have run lengths [1, 1, 2] when scanned from the right, and when one is subtracted from all except the first, we have [1, 0, 1], partial sums of which is [1, 1, 2], reversed [2, 1, 1], thus a(13) = 2^2 * 3^1 * 5^1 = 60.
Sequence A227183 is based on the same algorithm.
		

Crossrefs

Cf. A000079 (right edge), A000400 (left edge, apart from 2), A005811, A046523, A101296, A227183, A322585, A322825, A323503, A323504, A323507.
Other rearrangements of A025487 include A036035, A059901, A063008, A077569, A085988, A086141, A087443, A108951, A181821, A181822.
Cf. A005940, A283477, A323505 for other similar trees.

Programs

  • Mathematica
    {1}~Join~Array[Times @@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ Accumulate@ MapIndexed[Length[#1] - Boole[First@ #2 > 1] &, Split@ Reverse@ IntegerDigits[#, 2]]] &, 54] (* Michael De Vlieger, Feb 05 2020 *)
  • PARI
    A322827(n) = if(!n,1,my(bits = Vecrev(binary(n)), rl=1, o = List([])); for(i=2,#bits,if(bits[i]==bits[i-1], rl++, listput(o,rl))); listput(o,rl); my(es=Vecrev(Vec(o)), m=1); for(i=1,#es,m *= prime(i)^es[i]); (m));

Formula

a(n) = A046523(a(n)) = A046523(A322825(n)).
A001221(a(n)) = A005811(n).
A001222(a(n)) = A227183(n).
A322585(a(n)) = 1.

A227184 a(n) = product of parts of the unordered partition encoded with the runlengths of binary expansion of n.

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 2, 3, 9, 4, 1, 8, 6, 2, 3, 4, 16, 9, 4, 18, 16, 1, 8, 27, 12, 6, 2, 12, 8, 3, 4, 5, 25, 16, 9, 32, 36, 4, 18, 48, 81, 16, 1, 32, 54, 8, 27, 64, 20, 12, 6, 24, 24, 2, 12, 36, 15, 8, 3, 16, 10, 4, 5, 6, 36, 25, 16, 50, 64, 9, 32, 75, 144, 36, 4, 72
Offset: 0

Views

Author

Antti Karttunen, Jul 04 2013

Keywords

Comments

a(0) = 1, as 0 is here considered to encode an empty partition {}, and the empty product is one.
Like A129594, this sequence is based on the fact that compositions (i.e., ordered partitions) can be mapped 1-to-1 to partitions by taking the partial sums of the list where one is subtracted from each composant except the first (originally explained by Marc LeBrun in his Jan 11 2006 post on SeqFan mailing list, with an additional twist involving factorization and prime exponents, cf. A129595). The example below show how this works.
Compare the scatterplot of this sequence to those of A002487, A243353, A243499 and A253552.

Examples

			8 has binary expansion "1000", whose runs have lengths [3,1] when arranged from the least significant to the most significant end. Taking partial sums of 3 and 0, we get 3 and 3, whose product is 9, thus a(8) = 9.
For 44, in binary "101100", the run lengths are [2,2,1,1] (from the least significant end), and subtracting one from all terms except the first one, we get [2,1,0,0], whose partial sums are [2,3,3,3], and 2*3*3*3 = 54, thus a(44)=54.
		

Crossrefs

For n>=1, a(n) gives the product of nonzero terms on row n of table A227189/A227739.
Cf. A227183 (gives the corresponding sums).
See also A167489 for a similar sequence, which gives the product of parts of the compositions (ordered partitions).
Cf. A243499, A003963, A243504 (other such product sequences) and A003188, A243353, A075157 (associated permutations mapping between these schemes).
Cf. also A002487, A243353, A253552.

Programs

  • Mathematica
    Table[Function[b, Times @@ Accumulate@ Prepend[If[Length@ b > 1, Rest[b] - 1, {}], First@ b]]@ Map[Length, Split@ Reverse@ IntegerDigits[n, 2]], {n, 0, 75}] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • Python
    def A227184(n):
      '''Product of parts of the unique unordered partition encoded in the run lengths of the binary expansion of n.'''
      p = 1
      b = n%2
      i = 1
      while (n != 0):
        n >>= 1
        if ((n%2) == b): i += 1
        else:
          b = n%2
          p *= i
      return(p)
  • Scheme
    (define (A227184 n) (if (zero? n) 1 (apply * (binexp_to_ascpart n))))
    (define (binexp_to_ascpart n) (let ((runlist (reverse! (binexp->runcount1list n)))) (PARTSUMS (cons (car runlist) (map -1+ (cdr runlist))))))
    (define (binexp->runcount1list n) (if (zero? n) (list) (let loop ((n n) (rc (list)) (count 0) (prev-bit (modulo n 2))) (if (zero? n) (cons count rc) (if (eq? (modulo n 2) prev-bit) (loop (floor->exact (/ n 2)) rc (1+ count) (modulo n 2)) (loop (floor->exact (/ n 2)) (cons count rc) 1 (modulo n 2)))))))
    (define (PARTSUMS a) (cdr (reverse! (fold-left (lambda (psums n) (cons (+ n (car psums)) psums)) (list 0) a))))
    

Formula

Can be also obtained by mapping with an appropriate permutation from the products of parts of each partition computed for other enumerations similar to A227739:
a(n) = A243499(A003188(n)).
a(n) = A003963(A243353(n)).
a(n) = A243504(1+A075157(n)).

A243354 Permutation of natural numbers which maps between the partitions as encoded in A112798 (prime-index based system, one-based) to A227739 (binary based system, zero-based).

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 15, 5, 4, 14, 31, 13, 63, 30, 12, 10, 127, 9, 255, 29, 28, 62, 511, 26, 8, 126, 11, 61, 1023, 25, 2047, 21, 60, 254, 24, 18, 4095, 510, 124, 58, 8191, 57, 16383, 125, 27, 1022, 32767, 53, 16, 17, 252, 253, 65535, 22, 56, 122, 508, 2046, 131071
Offset: 1

Views

Author

Antti Karttunen, Jun 05 2014

Keywords

Comments

Note the indexing: the domain starts from one, but the range also includes zero.

Crossrefs

Programs

Formula

a(n) = A006068(A156552(n)).
a(n) = A075158(A241909(n)-1). [With A075158's original starting offset].
For all n >= 1, A243353(a(n)) = n.
A056239(n) = A227183(a(n)).
A003963(n) = A227184(a(n)).
A037481(n) = a(A002110(n)).

A163575 Remove all trailing bits equal to (n mod 2) in binary representation of n.

Original entry on oeis.org

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

Views

Author

Helmut Kreindl (euler(AT)chello.at), Jul 31 2009

Keywords

Comments

The original name was: "The changepoint a(n) is the first predecessor from n in a binary tree with: a(n) mod 2 <> n mod 2."
In a binary tree (node(row,col)=2^(row-1)+(col-1))
_________________2__________________________________3________________
____8_______9_______10_______11_______12_______13_______14_______15__
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
any node has 2 successors and one predecessor. a(n) is the first predecessor from n (going back, step by step) with another last digit (in binary sight) as n.
The subsequences from a(2^k) to a(2^(k+1) - 1) are permutations from the natural numbers from 0 to 2^k-1.

Examples

			a(7) = a(111_2) = 0_2 = 0 (when the rightmost and only run of bits in 7's binary representation has been shifted off, only zero remains).
a(17) = a(10001_2) = 1000_2 = 8.
a(8) = a(1000_2) = 1_2 = 1.
		

Crossrefs

Bisections: A000265, A153733. Cf. also A227183.
Cf. A136480.

Programs

  • BASIC
    FUNCTION CHANGEPOINT
    INPUT n
    IF EVEN(n)
      WHILE EVEN(n)
        n = n/2
    ELSE
      WHILE NOT EVEN(n)
        n = (n-1)/2
    OUTPUT n
    
  • Haskell
    a163575 n = f n' where
       f 0 = 0
       f x = if b == parity then f x' else x  where (x', b) = divMod x 2
       (n', parity) = divMod n 2
    -- Reinhard Zumkeller, Jul 22 2014
  • Mathematica
    f[n_] := Block[{idn = IntegerDigits[n, 2], m = Mod[n, 2]}, While[ idn[[-1]] == m, idn = Most@ idn]; FromDigits[ idn, 2]]; Array[f, 83] (* or *)
    f[n_] := Block[{m = n}, If[ OddQ@ m, While[OddQ@m, m--; m /= 2], While[ EvenQ@ m, m /= 2]]; m]; Array[f, 83] (* Robert G. Wilson v, Jul 04 2015 *)
  • PARI
    a(n) = {odd = n%2; while (n%2 == odd, n \= 2); return(n);} \\ Michel Marcus, Jun 20 2013
    
  • PARI
    a(n)=if(n%2,(n+1)>>valuation(n+1,2)-1,n>>valuation(n,2)) \\ Charles R Greathouse IV, Jul 05 2013
    (MIT/GNU Scheme) (define (A163575 n) (floor->exact (/ n (expt 2 (A136480 n))))) ;; Antti Karttunen, Jul 05 2013
    

Formula

a(A042963(n)) = n - 1. - Reinhard Zumkeller, Jul 22 2014
a(2^n -1) = 0 and a(2^n) = 1. a(2n-1) is 2x and a(2n) is 2x+1. - Robert G. Wilson v, Jul 04 2015
a(n) = floor(n/(2^A136480(n))). - Antti Karttunen, Jul 05 2013

Extensions

Name changed and b-file computed by Antti Karttunen, Jul 05 2013

A227185 The largest part in the unordered partition encoded in the runlengths of the binary expansion of n.

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 3, 3, 2, 1, 2, 3, 2, 3, 4, 4, 3, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 3, 4, 5, 5, 4, 3, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 3, 4, 5, 4, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 4, 5, 6, 6, 5, 4, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 4, 5, 4, 3, 2, 3, 2, 1, 2
Offset: 0

Views

Author

Antti Karttunen, Jul 05 2013

Keywords

Comments

The bijective encoding of nonordered partitions via compositions (ordered partitions) present in the binary expansion of n is explained in A227184.
It appears that a(4n+2) = a(2n+1). - Ralf Stephan, Jul 20 2013

Examples

			12 has binary expansion "1100", for which the lengths of runs (consecutive blocks of 0- or 1-bits) are [2,2]. Converting this to a partition in the manner explained in A227184 gives the partition {2+3}. Its largest part is 3, thus a(12)=3, which is actually the first time when this sequence differs from A043276.
		

Crossrefs

For all n, A005811(n) = a(A129594(n)). Cf. also A136480 (for n>= 1, gives the smallest part) and A227183, A227184, A226062, A092339, A227147.
a(n) gives the rightmost nonzero term on the n-th row of A227189.

Programs

  • Mathematica
    Table[Function[b, Max@ Accumulate@ Prepend[If[Length@ b > 1, Rest[b] - 1, {}], First@ b] - Boole[n == 0]]@ Map[Length, Split@ Reverse@ IntegerDigits[ n, 2]], {n, 0, 120}] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • Scheme
    (define (A227185 n) (if (zero? n) n (+ 1 (- (A029837 (+ 1 n)) (A005811 n)))))
    (define (A227185v2 n) (if (zero? n) n (car (reverse (binexp_to_ascpart n))))) ;; Alternative definition, using the auxiliary functions given in A227184.

Formula

Defining formula:
a(0)=0; and for n>=1, a(n) = A029837(n+1) - (A005811(n)-1). [Because the largest part in the unordered partition in this encoding scheme is computed as (c_1 + (c_2-1) + (c_3-1) + ... + (c_k-1)) where c_1 .. c_k are the parts of the k-part composition that sum together as c_1 + c_2 + ... + c_k = A029837(n+1) (the binary width of n), so we subtract from the total binary width of n the number of runs (A005811) minus 1.]
Equivalently: a(n) = A092339(n)+1 for n>0.
a(n) = A005811(A129594(n)). [This just states the fact that when conjugating a partition, the largest part of an old partition will be the number of the parts in the new, conjugated partition.]

A227186 Array A(n,k) read by antidiagonals: the length of the (k+1)-th run (k>=0) of binary digits of n, first run starting from the least significant bit of n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Jul 06 2013

Keywords

Comments

A(n,k) is set to zero if there are less than k+1 runs.
The irregular table A101211 gives the nonzero terms of each row in reverse order. The terms on row n sum to A029837(n+1). The product of nonzero terms on row n>0 is A167489(n). Number of nonzero terms on each row: A005811.

Examples

			The top-left corner of the array:
0, 0, 0, 0, 0, ... (0, in binary 0, has no runs (by convention), thus at first we have all-0 sequence)
1, 0, 0, 0, 0, ... (1, in binary 1, has one run of length 1)
1, 1, 0, 0, 0, ... (2, in binary 10, has two runs of length 1 both)
2, 0, 0, 0, 0, ... (3, in binary 11, has one run of length 2)
2, 1, 0, 0, 0, ... (4, in binary 100, the rightmost run of length 2 given first, then the second run of length 1)
1, 1, 1, 0, 0, ... (5, in binary 101, has three runs of one bit each)
1, 2, 0, 0, 0, ...
3, 0, 0, 0, 0, ...
3, 1, 0, 0, 0, ...
1, 2, 1, 0, 0, ...
1, 1, 1, 1, 0, ...
2, 1, 1, 0, 0, ...
2, 2, 0, 0, 0, ...
1, 1, 2, 0, 0, ...
1, 3, 0, 0, 0, ...
4, 0, 0, 0, 0, ...
		

Crossrefs

Used to compute A227183. Cf. also A163575, A227188, A227189.

Programs

  • Maple
    A227186 := proc(n,k)
        local bdgs,ru,i,b,a;
        bdgs := convert(n,base,2) ;
        if nops(bdgs) = 0 then
            return 0 ;
        end if;
        ru := 0 ;
        i := 1 ;
        b := op(i,bdgs) ;
        a := 1 ;
        for i from 2 to nops(bdgs) do
            if op(i,bdgs) <> op(i-1,bdgs) then
                if ru = k then
                    return a;
                end if;
                a := 1 ;
                ru := ru+1 ;
            else
                a := a+1 ;
            end if;
        end do:
        if ru =k then
            a ;
        else
            0 ;
        end if;
    end proc: # R. J. Mathar, Jul 23 2013
  • PARI
    A227186(n,k)=while(k>=0,for(c=1,n,bittest(n,0)==bittest(n\=2,0)&next;k&break;return(c));n||return;k--) \\ To let A(0,0)=1 add "!n||!" in front of while(...). TO DO: add default value k=-1 and implement "flattened" sequence, such that A227186(n) yields a(n). M. Hasler, Jul 21 2013
  • Scheme
    (define (A227186 n) (A227186bi (A002262 n) (A025581 n)))
    (define (A227186bi n k) (cond ((< (A005811 n) (+ 1 k)) 0) ((zero? k) (A136480 n)) (else (A227186bi (A163575 n) (- k 1)))))
    

Formula

A(n,0) = A136480(n), n>0.

A227192 Sum of the partial sums of the run lengths of binary expansion of n, when starting scanning from the least significant end; Row sums of A227188 and A227738.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 3, 7, 8, 10, 9, 6, 7, 5, 4, 9, 10, 12, 11, 14, 15, 13, 12, 8, 9, 11, 10, 7, 8, 6, 5, 11, 12, 14, 13, 16, 17, 15, 14, 18, 19, 21, 20, 17, 18, 16, 15, 10, 11, 13, 12, 15, 16, 14, 13, 9, 10, 12, 11, 8, 9, 7, 6, 13, 14, 16, 15, 18, 19, 17, 16
Offset: 1

Views

Author

Antti Karttunen, Jul 06 2013

Keywords

Comments

Equivalently, sum of bit-indices in binary expansion of n (counted from the right hand end, with the least significant bit having bit-index 0) of the positions where a bit differs from its immediate right-hand neighbor, counted up to the first leading zero.
a(0) could be 0 or 1, depending on how the binary expansion of zero is conceived, thus its value is left unspecified here.
From Jason Kimberley, Feb 22 2022: (Start)
Also, the total length of string movement required to display the binary expansion of n by the positions of the vanes of vertical blinds (starting with all 0).
The transitions from 0000 to 1011 are:
0001, 0011, 0111, 1111;
1110, 1100, 1000;
The transitions from 0000 to 1101 are:
0001, 0011, 0111, 1111;
1110, 1100;
1101. (End)

Examples

			For 11, whose binary expansion is "1011", the run lengths, when starting scanning from the right, are: [2,1,1]. Their partial sums are [2,2+1,2+1+1] = [2,3,4] which sum to total 9, thus a(11)=9. Equivalently, the zero-based positions (counted from the right) where bits change from one to zero or vice versa in "...01011" are 2, 3, 4 and 2+3+4 = 9.
For 13, whose binary expansion is "1101", the run lengths similarly scanned are [1,1,2]. Their partial sums are [1,1+1,1+1+2] = [1,2,4] which sum to total 7, thus a(13)=7. Equivalently, the positions where bits change in "...01101" are 1, 2, 4 and 1+2+4 = 7.
		

Crossrefs

Cf. A005811, A227183. Row sums of A227188 and A227738.

Programs

  • Mathematica
    Table[Tr[FoldList[Plus,0,Length /@ Split[Reverse[IntegerDigits[n,2]]]] ],{n,71}] (* Wouter Meeussen, Aug 22 2013 *)
  • PARI
    a(n)=local(b,s,t);b=binary(n);s=#b;t=b[#b];forstep(i=#b-1,1,-1,if(b[i]!=t,s=s+#b-i;t=!t));s /* Ralf Stephan, Sep 04 2013 */
    
  • Python
    def A227192(n):
      '''Sum of the partial sums of the run lengths of binary expansion of n, starting from the least significant end.'''
      s = 0
      b = n%2
      i = 0
      while (n != 0):
        n >>= 1
        i += 1
        if((n%2) != b):
          b = n%2
          s += i
      return(s)
    
  • Ruby
    def a(n)
      k = n.to_s(2).scan(/((\d)\2*)/)
      k.each_index.map { |i| (i + 1) * k[i][0].size }.reduce(:+)
    end # Peter Kagey, Aug 06 2015
  • Scheme
    (define (A227192 n) (let loop ((i (- (A005811 n) 1)) (s 0)) (cond ((< i 0) s) (else (loop (- i 1) (+ s (A227188bi n i))))))) ;; This version sums the nonzero terms of the n-th row of table A227188.
    (define (A227192v2 n) (+ (A227183 n) (A000217 (- (A005811 n) 1)))) ;; Another variant.
    (define (A227192v3 n) (add A227738 (+ 1 (A173318 (- n 1))) (A173318 n))) ;; This sums terms of table A227738.
    ;; With the help of this function that implements Sum_{i=lowlim..uplim} intfun(i)
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i)))))))
    

Formula

a(n) = Sum_{i=0..A005811(n)-1} A227188(n,i). [Row sums of A227188]
Equivalently, for n>=1, a(n) = Sum_{i=(A173318(n-1)+1)..A173318(n)} A227738(i). [Row sums of A227738]
a(n) = A227183(n) + A000217(A005811(n)-1). [Alternative definition]
a(n) = A029931(A003188(n)).
Recurrence: a(2n) = a(n) + 2*A069010(n), a(2n+1) = a(2n) +1 or -1, according to if n is even or odd. - Ralf Stephan, Sep 04 2013

A227370 Permutation which maps between A227368 and A227369.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 08 2013

Keywords

Comments

Conjecture 1: This is an involution (self-inverse permutation) of nonnegative integers. (Which would imply that both formulas given in A227368 and A227369 involving A227370 are valid).
Conjecture 2: (which would automatically imply the conjecture 1): the only transpositions (used to compose the permutation) are of adjacent terms 2k-1 and 2k, where A061887 gives the values of k. This is true at least for the first 35 transpositions (up to k=60).
See the example section of A227368 to get a grasp of the problem.

Crossrefs

Programs

Formula

a(n) = A227183(A227369(n)).

A225794 Sizes of Garden of Eden partitions in Bulgarian Solitaire, given in the same order as the runlength codes of the corresponding partitions (A227753).

Original entry on oeis.org

3, 4, 6, 8, 5, 7, 5, 7, 9, 6, 10, 8, 6, 9, 11, 8, 12, 10, 13, 10, 14, 12, 7, 11, 15, 12, 9, 13, 11, 8, 10, 7, 11, 9, 7, 10, 12, 14, 9, 13, 11, 14, 16, 11, 15, 18, 13, 8, 14, 17, 12, 16, 13, 15, 10, 14, 12, 9, 11, 13, 8, 12, 10, 8, 12, 14, 16, 11, 15, 13, 16, 18
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2013

Keywords

Comments

Each n occurs A123975(n) times in total.

Crossrefs

Programs

Formula

a(n) = A227183(A227753(n)).
Previous Showing 11-20 of 22 results. Next