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

A187224 Rank transform of the sequence floor(3*n/2).

Original entry on oeis.org

1, 3, 5, 7, 8, 11, 12, 14, 16, 18, 19, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 40, 41, 43, 45, 47, 48, 51, 52, 54, 56, 58, 60, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 92, 94, 96, 98, 100, 102, 103, 105, 107, 109, 110, 113, 114, 116, 118, 120, 121, 123, 125, 127, 129, 131, 132, 135, 136, 138, 140, 142, 143, 145, 147, 149, 151, 153, 154, 156, 158, 160, 162, 163, 165, 167, 169, 171, 172, 175, 176, 178, 180, 182, 183, 185, 187, 189, 191, 193, 194, 196, 198, 200
Offset: 1

Views

Author

Clark Kimberling, Mar 07 2011

Keywords

Comments

Complement of A187225.
The notion of the rank transform of a sequence is introduced as follows. Suppose that a=(a(n)), for n>=1, is a nondecreasing sequence of nonnegative integers, where a(1)<=1, and suppose that b=(b(n)), for n>=1, is an increasing sequence of positive integers.
Define h(1)=a(1), and for n>1, define h(n)=the number of numbers b(i) satisfying a(n-1)<=b(i)
Define r(1)=1, and for n>1, define r(n)=b(n-1)+h(n)+1.
The sequence r is the adjusted rank sequence when a and b are jointly ranked, with a(i) before b(j) when a(i)=b(j). (For a discussion of adjusted joint rank sequences, see A186219 and A186350.)
If r(n)=b(n) for all n>=1, we call r the rank transform of a and denote it by R(a). To summarize,
(1) initial values: r(1)=1, h(1)=a(1);
(2) counting function: h(n)= # r(i) in the half-open
interval [a(n-1),a(n));
(3) recurrence: r(n)=r(n-1)+h(n)+1.
Assuming a unbounded, let c be the number of a(i)<=1, let c(1)=c+1, and for n>1, let c(n) be the rank of r(n) when all the numbers a(i)<=r(n) and r(1),...,r(n-1), r(n) are jointly ranked. Then, clearly, a(n)<=r(n)<=c(n) for n>=1, and the sequences r and c are a complementary pair.
What conditions on the sequence a will ensure that R(a) exists? That is, what conditions will ensure that the counting function in (2) can be determined inductively, so that the recurrence (3) can be used to self-generate the sequence r? The answer is this: a(n)<=c(n-1)+1; viz., if a(n)>c(n-1)+1, then c(n-1)+1=r(n), but then a(n)>r(n), a contradiction, but if a(n)<=c(n-1)+1, there is no such obstacle.
Examples:
R(A000027)=A000201, the lower Wythoff sequence
Returning now to a and b as above, let (r(1,k)) be the adjusted joint rank sequence (AJRS) of a and b, with a(i) before b(j) when a(i)=b(j). Let (r(2,k)) be the AJRS of a and (r(1,k)); and inductively, let (r(n,k)) be the AJRS of a and (r(n-1,k)). If R(a) exists, then the limit of (r(n,k)) is R(a).
Thus, any choice of initial sequence b can be used to determine the first thousand terms of R(a). In the Mathematica program below, b=(1,2,3,4,...)=A000027.

Examples

			a... 1..3..4..6..7...9...10..12..13..15..16..18..19..
r... 1..3..5..7..8...11..12..14..16..18..19..21..23..
c... 2..4..6..9..10..13..15..17..20..22..24..26..28..
h... 1..1..1..1..0...2...0...1...1...1...0...1...1...
The sequences which converge to R(a), starting with
a=A187224 and b=A000027:
a(k)....1..3..4..6..7...9...10..12..13..15...
b(k)....1..2..3..4..5...6...7...8...9...10...
r(1,k)..1..4..6..9..11..14..16..19..21..24...
r(2,k)..1..3..4..6..8...9...11..13..14..16...
r(3,k)..1..3..5..7..9...11..13..15..16..19...
r(4,k)..1..3..5..7..8...10..12..14..15..17...
r(5,k)..1..3..5..7..8...11..12..14..16..18...
		

Crossrefs

Programs

  • Mathematica
    seqA=Table[Floor[3*n/2], {n,1,220}]     (* A032766 *)
    seqB=Table[n, {n,1,120}];               (* A000027 *)
    jointRank[{seqA_,seqB_}]:={Flatten@Position[#1,{,1}],Flatten@Position[#1,{,2}]}&[Sort@Flatten[{{#1,1}&/@seqA,{#1,2}&/@seqB},1]];
    limseqU=FixedPoint[jointRank[{seqA,#1[[1]]}]&,jointRank[{seqA,seqB}]][[1]]                     (* A187224 *)
    Complement[Range[Length[seqA]],limseqU] (* A187225 *)
    (* by Peter J. C. Moses, Mar 07 2011 *)

A178225 Characteristic function of A006995 (binary palindromes).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0
Offset: 0

Author

Jeremy Gardiner, May 23 2010

Keywords

Comments

a(n)=1 if n is in A006995, a(n)=0 otherwise.
For n<43, identical to parity of A175096.
Comment by Franklin T. Adams-Watters: (Start)
Any permutation of the runs of n gives another such permutation when reversed. This pairs up all non-palindromic permutations of the runs of n. Thus the parity of A175096(n) is the parity of the number of palindromic run-permutations of n. For small n, this is 1 when n is a binary palindrome, and 0 otherwise.
The first exception is 43, binary 101011, which has a nontrivial palindromic run-permutation 45, binary 101101. Another kind of exception occurs first for n = 365, binary 101101101, which is a palindrome, but has another palindromic run-permutation 427, binary 110101011. (End)
Given an index n such that a(n)=1, then the following A164126(A206915(n))-1 terms will be 0. n'=A164126(A206915(n)) is the next term with a(n')=1. Therefore, if we subtract 1 from each term of A164126, we get the sequence of run lengths of 0's. - Hieronymus Fischer, Feb 19 2012.
Given an index n such that a(n)=0, then p=A206913(n) is the greatest index pA206914(n) is the least index q>n such that a(q)=1, which implies a(k)=0 for all k with n<=kHieronymus Fischer, Feb 19 2012.
Binary palindromes are distributed symmetrically with respect to threefold multiples of powers of 2. This becomes obvious by the generating function g(x) below. Example for the resulting factors of x^(3*2^5)=x^96: the factors are x^q and x^(-q) for q=3,11,23,31. Thus, the palindromes are 96+3, 96-3, 96+11, 96-11, 96+23, 96-23, 96+31, 96-31. The respective number of palindromes with this property is 2^(floor(m/2)), where m is the exponent of the corresponding power of 2. - Hieronymus Fischer, Apr 04 2012

Examples

			a(3)=1, since 3 is binary palindromic;
a(4)=0, since 4 is not palindromic.
		

Crossrefs

Cf. A136522. See A206915 for the partial sums.

Programs

  • Haskell
    a178225 n = fromEnum $ n == a030101 n  -- Reinhard Zumkeller, Oct 21 2011
    
  • Mathematica
    A178225[n_]:=Boole[PalindromeQ[IntegerDigits[n,2]]];
    Array[A178225,100,0] (* Paolo Xausa, Oct 15 2023 *)
  • PARI
    a(n) = my(b=binary(n)); b == Vecrev(b); \\ Michel Marcus, Feb 13 2019
    
  • Python
    a187225 = lambda n: int(bin(n)[2:] == bin(n)[:1:-1]) # David Radcliffe, May 05 2023

Formula

a(A006995(n)) = 1; a(A154809(n)) = 0. - Reinhard Zumkeller, Oct 21 2011
a(n) = if A030101(n) = n then 1, otherwise 0. - Reinhard Zumkeller, Jan 17 2012
a(n) = 1 - (A206916(n) - A206915(n)). - Hieronymus Fischer, Feb 18 2012
G.f.: g(x) = 1 + x + x^3 + Sum{j>=1} x^(3*2^j)*(f_j(x)+f_j(1/x)), where the f_j(x) are defined as follows:
f_1(x)=x, and for j > 1,
f_j(x) = x^3*Product_{k=1..floor((j-1)/2)} (1+x^b(j,k)), where b(j,k) = 2^(floor((j-1)/2)-k)*((3+(-1)^j)*2^(2*k+1)+4) for k > 1, and b(j,1) = (2+(-1)^j)*2^(floor((j-1)/2)+1). The first explicit terms of this g.f. are
g(x) = 1 + x + x^3 + (f_1(x) + f_1(1/x))*x^6 + (f_2(x) + f_2(1/x))*x^12 + (f_3(x)+f_3(1/x))*x^24 + (f_4(x) + f_4(1/x))*x^48 + (f_5(x) + f_5(1/x))*x^96 + ... = 1 + x + x^3 + (x+1/x)*x^6 + (x^3+1/x^3)*x^12 + (x^3*(1+x^4) + (1+1/x^4)/x^3)*x^24 + (x^3*(1+x^12) + (1+1/x^12)/x^3)*x^48 + (x^3*(1+x^8)(1+x^20) + (1+1/x^20)(1+1/x^8)/x^3)*x^96 + ... - Hieronymus Fischer, Apr 02 2012

A187908 Complement of A187907.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 17, 18, 21, 22, 25, 27, 29, 31, 33, 35, 37, 39, 42, 44, 45, 47, 50, 52, 54, 56, 58, 60, 62, 65, 67, 69, 70, 72, 75, 77, 79, 81, 83, 85, 87, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 140, 142, 144, 146, 148, 150, 152
Offset: 1

Author

Clark Kimberling, Mar 15 2011

Keywords

Comments

A187908 gives the ranks of the numbers in the rank transform R(a) when all the numbers in a and R(a) are jointly ranked, where a=A187907. For the definition and basic properties of rank transform, see A187224.
A187233(n)=A187908(n) for n=1,2,...,18; A187233(19)=40 and A187908(19)=39. The closeness of A187908 to A187233 and the closeness of their complements result from the closeness of 7/4 to 4-sqrt(5).

Crossrefs

Programs

Showing 1-3 of 3 results.