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-5 of 5 results.

A233655 Sum of parts power divisors of canonical representation of n (A233569).

Original entry on oeis.org

1, 2, 4, 4, 9, 9, 11, 8, 17, 12, 26, 17, 26, 26, 26, 16, 33, 26, 48, 26, 45, 45, 63, 33, 48, 45, 63, 48, 63, 63, 57, 32, 65, 50, 92, 40, 97, 97, 115, 50, 97, 54, 120, 97, 120, 120, 140, 65, 92, 97, 115, 97, 120, 120, 140, 92, 115, 120, 140, 115, 140, 140, 120, 64
Offset: 1

Views

Author

Vladimir Shevelev, Dec 14 2013

Keywords

Comments

If the canonical representation of n is A233569(n)=(1)^k_1[*](10)^k_2[*]...[*](10...0)^k_t, where [*] means concatenation, then we say that a number (1)^r_1[*](10)^r_2[*]...[*](10...0)^r_t is a parts power divisor of canonical representation of n, iff all r_i<=k_i.
Note that, by agreement, (10...0)^0 means the absence of the corresponding part.

Examples

			Since A233569(5)=6, then the canonical representation of 5 is (1)^1[*](10)^1 which has parts power divisors 0, (1)^1, (10)^1, (1)^1[*](10)^1. Converting to decimal, they are 0,1,2,6 with sum 9. So a(5)=9. Note that 6 is a parts power divisor of 5, but not a c-divisors of 5 (see comment in A124771).
Analogously, 12 = (1)^1[*](10)^0[*](100)^1 is a parts power divisor of 52 = (1)^1[*](10)^1[*](100)^1, but not a c-divisor of 52.
		

Crossrefs

Formula

a((10...0[m zeros])^k) = 2^m/(2^(m+1)-1)^2 * (2^((m+1)*(k+1)) - 1) - (k+1)*2^m/(2^(m+1)-1). For example, a(101010)[here m=1,k=3] = 2/9*(2^8-1) - 4*2/3 = 54.
Thus a(42)=54. What is a general formula for a(n)?

A233564 c-squarefree numbers: positive integers which in binary are concatenation of distinct parts of the form 10...0 with nonnegative number of zeros.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 12, 16, 17, 18, 20, 24, 32, 33, 34, 37, 38, 40, 41, 44, 48, 50, 52, 64, 65, 66, 68, 69, 70, 72, 80, 81, 88, 96, 98, 104, 128, 129, 130, 132, 133, 134, 137, 140, 144, 145, 152, 160, 161, 176, 192, 194, 196, 200, 208, 256, 257, 258, 260, 261
Offset: 1

Views

Author

Vladimir Shevelev, Dec 13 2013

Keywords

Comments

Number of terms in interval [2^(n-1), 2^n) is the number of compositions of n with distinct parts (cf. A032020). For example, if n=6, then interval [2^5, 2^6) contains 11 terms {32,...,52}. This corresponds to 11 compositions with distinct parts of 6: 6, 5+1, 1+5, 4+2, 2+4, 3+2+1, 3+1+2, 2+3+1, 2+1+3, 1+3+2, 1+2+3.
From Gus Wiseman, Apr 06 2020: (Start)
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. This sequence lists all numbers k such that the k-th composition in standard order is strict. For example, the sequence together with the corresponding strict compositions begins:
0: () 38: (3,1,2) 98: (1,4,2)
1: (1) 40: (2,4) 104: (1,2,4)
2: (2) 41: (2,3,1) 128: (8)
4: (3) 44: (2,1,3) 129: (7,1)
5: (2,1) 48: (1,5) 130: (6,2)
6: (1,2) 50: (1,3,2) 132: (5,3)
8: (4) 52: (1,2,3) 133: (5,2,1)
9: (3,1) 64: (7) 134: (5,1,2)
12: (1,3) 65: (6,1) 137: (4,3,1)
16: (5) 66: (5,2) 140: (4,1,3)
17: (4,1) 68: (4,3) 144: (3,5)
18: (3,2) 69: (4,2,1) 145: (3,4,1)
20: (2,3) 70: (4,1,2) 152: (3,1,4)
24: (1,4) 72: (3,4) 160: (2,6)
32: (6) 80: (2,5) 161: (2,5,1)
33: (5,1) 81: (2,4,1) 176: (2,1,5)
34: (4,2) 88: (2,1,4) 192: (1,7)
37: (3,2,1) 96: (1,6) 194: (1,5,2)
(End)

Examples

			49 in binary has the following parts of the form 10...0 with nonnegative number of  zeros: (1),(1000),(1). Two of them are the same. So it is not in the sequence. On the other hand, 50 has distinct parts (1)(100)(10), thus it is a term.
		

Crossrefs

A subset of A333489 and superset of A333218.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Weighted sum is A029931.
- Partial sums from the right are A048793.
- Sum is A070939.
- Runs are counted by A124767.
- Reversed initial intervals A164894.
- Initial intervals are A246534.
- Constant compositions are A272919.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are counted by A333381.
- Anti-runs are A333489.

Programs

  • Mathematica
    bitPatt[n_]:=bitPatt[n]=Split[IntegerDigits[n,2],#1>#2||#2==0&];
    Select[Range[0,300],bitPatt[#]==DeleteDuplicates[bitPatt[#]]&] (* Peter J. C. Moses, Dec 13 2013 *)
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],UnsameQ@@stc[#]&] (* Gus Wiseman, Apr 04 2020 *)

Extensions

More terms from Peter J. C. Moses, Dec 13 2013
0 prepended by Gus Wiseman, Apr 04 2020

A124771 Number of distinct subsequences for compositions in standard order.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 4, 4, 2, 4, 3, 6, 4, 6, 6, 5, 2, 4, 4, 6, 4, 6, 6, 8, 4, 6, 6, 9, 6, 9, 8, 6, 2, 4, 4, 6, 3, 7, 7, 8, 4, 7, 4, 9, 7, 8, 9, 10, 4, 6, 7, 9, 7, 9, 8, 12, 6, 9, 9, 12, 8, 12, 10, 7, 2, 4, 4, 6, 4, 7, 7, 8, 4, 6, 6, 10, 6, 10, 10, 10, 4, 7, 6, 10, 6, 8, 9, 12, 7, 10, 9, 12, 10, 12, 12, 12, 4
Offset: 0

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
From Vladimir Shevelev, Dec 18 2013: (Start)
Every number in binary is a concatenation of parts of the form 10...0 with k>=0 zeros. For example, 5=(10)(1), 11=(10)(1)(1), 7=(1)(1)(1). We call d>0 a c-divisor of m, if d consists of some consecutive parts of m taking from the left to the right. Note that, to d=0 corresponds an empty set of parts. So it is natural to consider 0 as a c-divisor of every m. For example, 5=(10)(1) is a divisor of 23=(10)(1)(1)(1). Analogously, 1,2,3,7,11,23 are c-divisors of 23. But 6=(1)(10) is not a c-divisor of 23.
One can prove a one-to-one correspondence between distinct subsequences for composition no. n in standard order and c-divisors of n. So, the sequence lists also numbers of c-divisors of nonnegative integers.
(End)
These are contiguous subsequences, or restrictions to a subinterval. The case for all subsequences is A334299. - Gus Wiseman, Jun 02 2020

Examples

			Composition number 11 is 2,1,1; the subsequences are (empty); 1; 2; 1,1; 2,1; 2,1,1; so a(11) = 6.
The table starts:
1
2
1 2
1 3 3 3
Let n=11=(10)(1)(1). We have the following c-divisors of 11: 0,1,2,3,5,11. Thus a(11)=6. Note, that 3=(1)(1) is not a c-divisor of 13=(1)(10)(1) since, although it contains parts of 3=(1)(1), but in non-consecutive order. The c-divisors of 13 are 0,1,2,5,6,13. So, a(13)=6.
From _Gus Wiseman_, Jun 01 2020: (Start)
The c-divisors of n are given in column n below:
  0  0  0  0  0  0  0  0  0  0  0   0   0   0   0   0   0   0   0
     1  2  1  4  1  1  1  8  1  2   1   1   1   1   1   16  1   2
           3     2  2  3     4  10  2   4   2   2   3       8   4
                 5  6  7     9      3   12  5   3   7       17  18
                                    5       6   6   15
                                    11      13  14
(End)
		

Crossrefs

Cf. A000005, A011782 (row lengths), A066099, A114994, A233249, A233312.
Not allowing empty subsequences gives A124770.
Dominates A333257.
The case for not just contiguous subsequences is A334299.
Positions of first appearances are A335279.
Compositions where every subinterval has a different sum are A333222.
Knapsack compositions are A333223.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[ReplaceList[stc[n],{_,s___,_}:>{s}]]],{n,0,100}] (* Gus Wiseman, Jun 01 2020 *)

Formula

a(n) = A124770(n) + 1.
From Vladimir Shevelev, Dec 18 2013: (Start)
a(2^n) = 2. Note that in concatenation representations of integers in binary, numbers {2^k}, k>=0, play the role of primes. So the formula is an analog of A000005(prime(n))=2.
a(2^n-1) = n+1; for n>=2, a(2^n+1) = 4.
For c-equivalent numbers n_1 and n_2 (i.e., differed only by order of parts) we have a(n_1) = a(n_2). For example, a(24)=a(17)=4. If the canonical representation of n is n=(1)^k_1[*](10)^k_2[*](100)^k_3[*]... , where [*] denotes operation of concatenation (cf. A233569), then a(n)<=(k_1+1)*(k_2+1)*...
(End)

A162439 Write down the binary representation of n. Partition the string which is this binary representation by placing a '+' just left of every 1. Add the resulting base 2 numbers. a(n) = decimal equivalent of this sum.

Original entry on oeis.org

1, 2, 2, 4, 3, 3, 3, 8, 5, 4, 4, 5, 4, 4, 4, 16, 9, 6, 6, 6, 5, 5, 5, 9, 6, 5, 5, 6, 5, 5, 5, 32, 17, 10, 10, 8, 7, 7, 7, 10, 7, 6, 6, 7, 6, 6, 6, 17, 10, 7, 7, 7, 6, 6, 6, 10, 7, 6, 6, 7, 6, 6, 6, 64, 33, 18, 18, 12, 11, 11, 11, 12, 9, 8, 8, 9, 8, 8, 8, 18, 11, 8, 8, 8, 7, 7, 7, 11, 8, 7, 7, 8, 7, 7
Offset: 1

Views

Author

Leroy Quet, Jul 03 2009

Keywords

Comments

From Vladimir Shevelev, Dec 11 2014: (Start)
Or, sum of parts of the form 10...0 with nonnegative number of zeros in binary representation of n as the corresponding powers of 2. For example, n=50 in binary is a concatenation of parts (1)(100)(10). Then a(50)=1+4+2=7.
Every positive number k occurs a finite number of times, such that the position of the last appearance of k is 2^k-1.
Moreover, the number of times of appearances of k is the number of compositions of k into powers of 2, i.e., it is A023359(k), k>0. (End)

Examples

			52 in binary is 110100. Placing the +'s before every 1, we get +1+10+100, which is 1+2+4 = 7 in decimal. So a(52) = 7.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local l, s, i, j; l:= convert(n, base, 2); s:= 0; i:=1; for j from nops(l)-1 to 1 by -1 do if l[j]=0 then i:= i*2; else s:= s+i; i:= 1 fi od; s+i end: seq(a(n), n=1..150); # Alois P. Heinz, Jul 28 2009
    Lton := proc(L) local i ; add(op(i,L)*2^(i-1),i=1..nops(L)) ; end: A162439 := proc(n) local a,lef,b2,ri ; a := 0 ; lef := 0; b2 := convert(n,base,2) ; for ri from lef+1 do if op(ri,b2) = 1 then a := a+Lton([op(lef+1..ri,b2)]) ; lef := ri ; fi; if ri =nops(b2) then break; fi; od: a ; end: seq(A162439(n),n=1..100) ; # R. J. Mathar, Jul 30 2009
  • Mathematica
    a[n_] := FromDigits[#, 2]& /@ Split[IntegerDigits[n, 2] , #2==0&] // Total; Array[a, 100] (* Jean-François Alcover, Jan 07 2016 *)

Formula

Let, for k_1>k_2>...>k_r, n = 2^k_1 + 2^k_2 +...+ 2^k_r. Then a(n) = 2^(k_1-k_2-1) + 2^(k_2-k_3-1) + 2^(k_(r-1)-k_r-1) + 2^k_r. - Vladimir Shevelev, Dec 11 2013

Extensions

More terms from Alois P. Heinz and R. J. Mathar, Jul 28 2009

A235669 Sum of parts of the form 10...0 and 20...0 with nonnegative number of zeros in ternary representation of n as the corresponding numbers 3^n and 2*3^n.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 6, 3, 4, 9, 4, 5, 4, 3, 4, 7, 4, 5, 18, 7, 8, 5, 4, 5, 8, 5, 6, 27, 10, 11, 6, 5, 6, 9, 6, 7, 10, 5, 6, 5, 4, 5, 8, 5, 6, 19, 8, 9, 6, 5, 6, 9, 6, 7, 54, 19, 20, 9, 8, 9, 12, 9, 10, 11, 6, 7, 6, 5, 6, 9, 6, 7, 20, 9, 10, 7, 6, 7, 10, 7, 8, 81, 28, 29, 12
Offset: 0

Views

Author

Vladimir Shevelev, Jan 13 2014

Keywords

Comments

The number of appearances of k is the number of compositions of k into numbers of the form 3^n and 2*3^n, A235684(k).

Crossrefs

Programs

  • Mathematica
    bitPatt[n_,b_]:=Split[IntegerDigits[n,b ],#2==0&]; Map[Plus@@Map[FromDigits[#,3]&,bitPatt[#,3]]&,Range[0,50]] (* Peter J. C. Moses, Jan 13 2014 *)
Showing 1-5 of 5 results.