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

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 *)

A331580 Smallest number whose unsorted prime signature is the reversed unsorted prime signature of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 18, 2, 6, 6, 16, 2, 12, 2, 18, 6, 6, 2, 54, 4, 6, 8, 18, 2, 30, 2, 32, 6, 6, 6, 36, 2, 6, 6, 54, 2, 30, 2, 18, 18, 6, 2, 162, 4, 12, 6, 18, 2, 24, 6, 54, 6, 6, 2, 150, 2, 6, 18, 64, 6, 30, 2, 18, 6, 30, 2, 108, 2, 6, 12, 18, 6
Offset: 1

Views

Author

Gus Wiseman, Apr 18 2020

Keywords

Comments

Unsorted prime signature (A124010) is the sequence of exponents in a number's prime factorization.

Examples

			The prime signature of 12345678 = 2*3*3*47*14593 is (1,2,1,1), and the least number with prime signature (1,1,2,1) is 1050 = 2*3*5*5*7, so a(12345678) = 1050.
		

Crossrefs

The range is A055932.
The non-reversed version is A071364.
Unsorted prime signature is A124010.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Mathematica
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    Table[Times@@Prime/@ptnToNorm[Reverse[Last/@If[n==1,{},FactorInteger[n]]]],{n,100}]

A334031 The smallest number whose unsorted prime signature is the reversed n-th composition in standard order.

Original entry on oeis.org

1, 2, 4, 6, 8, 18, 12, 30, 16, 54, 36, 150, 24, 90, 60, 210, 32, 162, 108, 750, 72, 450, 300, 1470, 48, 270, 180, 1050, 120, 630, 420, 2310, 64, 486, 324, 3750, 216, 2250, 1500, 10290, 144, 1350, 900, 7350, 600, 4410, 2940, 25410, 96, 810, 540, 5250, 360, 3150
Offset: 0

Views

Author

Gus Wiseman, Apr 17 2020

Keywords

Comments

All terms are normal (A055932), meaning their prime indices cover an initial interval of positive integers.
Unsorted prime signature is the sequence of exponents in a number's prime factorization.
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.

Examples

			The sequence of terms together with their prime indices begins:
       1: {}
       2: {1}
       4: {1,1}
       6: {1,2}
       8: {1,1,1}
      18: {1,2,2}
      12: {1,1,2}
      30: {1,2,3}
      16: {1,1,1,1}
      54: {1,2,2,2}
      36: {1,1,2,2}
     150: {1,2,3,3}
      24: {1,1,1,2}
      90: {1,2,2,3}
      60: {1,1,2,3}
     210: {1,2,3,4}
      32: {1,1,1,1,1}
     162: {1,2,2,2,2}
For example, the 13th composition in standard order is (1,2,1), and the least number with prime signature (1,2,1) is 90 = 2^1 * 3^2 * 5^1, so a(13) = 90.
		

Crossrefs

The range is A055932.
The non-reversed version is A057335.
Unsorted prime signature is A124010.
Numbers whose prime signature is aperiodic are A329139.
Normal numbers with standard compositions as prime signature are A334032.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Aperiodic compositions are A328594.
- Normal compositions are A333217.
- Heinz number is A333219.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Product[Prime[i]^stc[n][[-i]],{i,DigitCount[n,2,1]}],{n,0,100}]

Formula

a(n) = A057335(A059893(n)).

A334033 The a(n)-th composition in standard order (graded reverse-lexicographic) is the reversed unsorted prime signature of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 6, 1, 3, 3, 8, 1, 5, 1, 6, 3, 3, 1, 12, 2, 3, 4, 6, 1, 7, 1, 16, 3, 3, 3, 10, 1, 3, 3, 12, 1, 7, 1, 6, 6, 3, 1, 24, 2, 5, 3, 6, 1, 9, 3, 12, 3, 3, 1, 14, 1, 3, 6, 32, 3, 7, 1, 6, 3, 7, 1, 20, 1, 3, 5, 6, 3, 7, 1, 24, 8, 3, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 18 2020

Keywords

Comments

Unsorted prime signature (A124010) is the sequence of exponents in a number's prime factorization.
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.

Examples

			The unsorted prime signature of 12345678 is (1,2,1,1), whose reverse (1,1,2,1) is the 29th composition in standard order, so a(12345678) = 29.
		

Crossrefs

Positions of first appearances are A334031.
The non-reversed version is A334032.
Unsorted prime signature is A124010.
Least number with reversed prime signature is A331580.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Aperiodic compositions are A328594.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.

Programs

  • Mathematica
    stcinv[q_]:=Total[2^Accumulate[Reverse[q]]]/2;
    Table[stcinv[Reverse[Last/@If[n==1,{},FactorInteger[n]]]],{n,100}]

Formula

a(A334031(n)) = n.
A334031(a(n)) = A071364(n).
a(A057335(n))= A059893(n).
A057335(a(n)) = A331580(n).

A267508 Smallest number "c-equivalent" to n.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 7, 8, 9, 10, 11, 9, 11, 11, 15, 16, 17, 18, 19, 18, 21, 21, 23, 17, 19, 21, 23, 19, 23, 23, 31, 32, 33, 34, 35, 36, 37, 37, 39, 34, 37, 42, 43, 37, 43, 43, 47, 33, 35, 37, 39, 37, 43, 43, 47, 35, 39, 43, 47, 39, 47, 47, 63, 64, 65, 66, 67, 68, 69, 69, 71, 68, 73
Offset: 1

Views

Author

Jörgen Backelin, Jan 16 2016

Keywords

Comments

For c-equivalence, see the comments to A233249. Briefly put, two positive integers m and n are c-equivalent in the sense of Vladimir Shevelev, if they have ordinary binary representations with the same multisets of substrings resulting from cutting the full strings immediately before each bit 1. A(n) is defined as the smallest positive integer, which is c-equivalent to n. Alternatively, in the manners of A114994, the lengths of these substrings can be considered as representing ways to write integers as sums of positive integers with arbitrarily ordered sums, and a(n) as the unique integer whose corresponding substring lengths form the corresponding integer partition.
For instance, the ordinary binary representations of 11, 13, and 14 are 1011, 1101, and 1110, respectively, which yields the equal multisets {"10","1","1"}, and {"1","10","1"}, and {"1","1","10"} of strings, respectively; whence 11, 13, and 14 are c-equivalent.
A(n) is an odd number if and only if the substring "1" appears at least once in the multiset. Since this is the case if and only if it also holds for the binary representation of n concatenated with itself, and A233312(n) = a(m) for the number m whose binary representation is this concatenation, we have a(n) == A233312(n) (mod 2) for all n. Moreover, empirical data has suggested that perhaps A233312(n)+1 == A171791(n+1) (mod 2) for all n >= 1. This relation holds in general if and only if a(n)+1 == A171791(n+1) for the same n, which in its turn is true if and only if the relation with fibbinary numbers first empirically observed by Paul D. Hanna in the comments to A171791 holds in general.
The sequence A163382 also maps n to a c-equivalent integer <=n; however, here, only cyclic permutations of the sequences of substrings are allowed. Thus, a more restricted equivalence relation is used; whence a(n) <= A163382(n) for all n. Equality holds for infinitely many n, including n = 1..37.

Examples

			The set of integers c-equivalent to 38 is {37,38,41,44,50,52} (with the binary representations 100101, 100110, 101001, 101100, 110010, and 110100, respectively). The smallest of these numbers is 37. Thus, a(38) = 37. Alternatively, the substrings of 100110_binary = 38 correspond to writing 6 as the sum of 3+1+2, which is a permutation of the partition 6 = 3+2+1, where the right hand side corresponds to 37. (On the other hand, only 41 and 52 may be achieved from 38 by cyclic permutations of the bits, whence A163382(38) = 38.)
		

Crossrefs

A114994 = range(a), A233312(n) = a(A020330(n)).
Previous Showing 21-26 of 26 results.