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

A255068 a(n) is the largest k such that A255070(k) = n.

Original entry on oeis.org

2, 5, 6, 10, 11, 13, 14, 18, 21, 22, 23, 26, 27, 29, 30, 34, 37, 38, 42, 43, 45, 46, 47, 50, 53, 54, 55, 58, 59, 61, 62, 66, 69, 70, 74, 75, 77, 78, 82, 85, 86, 87, 90, 91, 93, 94, 95, 98, 101, 102, 106, 107, 109, 110, 111, 114, 117, 118, 119, 122, 123, 125, 126, 130, 133, 134, 138, 139, 141, 142, 146, 149, 150
Offset: 0

Views

Author

Antti Karttunen, Feb 21 2015

Keywords

Crossrefs

First differences are A106836 (from its second term onward).
Sequence A341522 sorted into ascending order.

Programs

  • PARI
    a(n) = my(t=1); n=2*n+2; forstep(i=logint(n,2),0,-1, if(bittest(n,i)==t, n++;t=!t)); n-1; \\ Kevin Ryde, Mar 21 2021
  • Scheme
    (define (A255068 n) (- (A091067 (+ n 1)) 1))
    

Formula

a(n) = A091067(n+1) - 1.

A269367 Suspected permutation of natural numbers: a(n) = A255070(A269363(n)).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 11, 6, 8, 12, 17, 13, 10, 21, 23, 19, 14, 18, 16, 28, 20, 15, 35, 30, 41, 24, 39, 27, 22, 42, 25, 36, 26, 47, 40, 29, 34, 32, 33, 37, 55, 38, 51, 49, 43, 59, 67, 57, 68, 58, 69, 64, 65, 75, 119, 76, 66, 74, 52, 46, 44, 50, 87, 90, 56, 71, 111, 45, 85, 60, 72, 54, 77, 104, 79, 99, 88, 95, 48, 53, 78, 102, 82, 31
Offset: 1

Views

Author

Antti Karttunen, Feb 27 2016

Keywords

Comments

Lexicographically first injection of natural numbers beginning with a(1)=1 such that for all n >= 1, A091067(a(n))*A091067(a(n+1)) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.

Crossrefs

Left inverse: A269368 (also the right inverse if this is a permutation of natural numbers).

Formula

a(n) = A255070(A269363(n)).

A091067 Numbers whose odd part is of the form 4k+3.

Original entry on oeis.org

3, 6, 7, 11, 12, 14, 15, 19, 22, 23, 24, 27, 28, 30, 31, 35, 38, 39, 43, 44, 46, 47, 48, 51, 54, 55, 56, 59, 60, 62, 63, 67, 70, 71, 75, 76, 78, 79, 83, 86, 87, 88, 91, 92, 94, 95, 96, 99, 102, 103, 107, 108, 110, 111, 112, 115, 118, 119, 120, 123, 124, 126, 127, 131
Offset: 1

Views

Author

Ralf Stephan, Feb 22 2004

Keywords

Comments

Either of form 2*a(m) or 4k+3, k >= 0, 0 < m < n.
A000265(a(n)) is an element of A004767.
a(n) such that A038189(a(n)) = 1.
Numbers n such that Kronecker(-n, m) = Kronecker(m, n) for all m. - Michael Somos, Sep 22 2005
From Antti Karttunen, Feb 20-21 2015: (Start)
Gives all n for which A005811(n) - A005811(n-1) = -1, from which follows that a(n) = the least k such that A255070(k) = n.
Gives the positions of even terms in A003602. (End)
Indices of negative terms in A164677. - M. F. Hasler, Aug 06 2015
Indices of the 0's in A014577. - Gabriele Fici, Jun 02 2016
Also indices of -1 in A034947. - Jianing Song, Apr 24 2021
Conjecture: alternate definition of same sequence is that a(1)=3 and a(n) is the smallest number > a(n-1) so that no number that is the sum of at most 2 terms in this sequence is a power of 2. - J. Lowell, Jan 20 2024
The asymptotic density of this sequence is 1/2. - Amiram Eldar, Aug 31 2024

Crossrefs

Essentially one less than A060833.
Characteristic function: A038189.
Complement of A091072.
First differences are in A106836 (from its second term onward).
Sequence A246590 gives the even terms.
Gives the positions of records (after zero) for A255070 (equally, the position of the first n there).
Cf. A106837 (gives n such that both n and n+1 are terms of this sequence).
Cf. A098502 (gives n such that both n and n+2 are, but n+1 is not in this sequence).

Programs

  • Haskell
    import Data.List (elemIndices)
    a091067 n = a091067_list !! (n-1)
    a091067_list = map (+ 1) $ elemIndices 1 a014707_list
    -- Reinhard Zumkeller, Sep 28 2011
    (Scheme, with Antti Karttunen's IntSeq-library, two versions)
    (define A091067 (MATCHING-POS 1 1 (COMPOSE even? A003602)))
    (define A091067 (NONZERO-POS 1 0 A038189))
    ;; Antti Karttunen, Feb 20 2015
  • Mathematica
    Select[Range[150], Mod[# / 2^IntegerExponent[#, 2], 4] == 3 &] (* Amiram Eldar, Aug 31 2024 *)
  • PARI
    for(n=1,200,if(((n/2^valuation(n,2)-1)/2)%2,print1(n",")))
    
  • PARI
    {a(n) = local(m, c); if( n<1, 0, c=0; m=1; while( cMichael Somos, Sep 22 2005 */
    
  • PARI
    is_A091067(n)=bittest(n,valuation(n,2)+1) \\ M. F. Hasler, Aug 06 2015
    
  • PARI
    a(n) = my(t=1); n<<=1; forstep(i=logint(n,2),0,-1, if(bittest(n,i)==t, n++;t=!t)); n; \\ Kevin Ryde, Mar 21 2021
    

Formula

a(n) = A060833(n+1) - 1. [See N. Sato's Feb 12 2013 comment in A060833.]
Other identities. For all n >= 1 it holds that:
A014707(a(n) + 1) = 1. - Reinhard Zumkeller, Sep 28 2011
A055975(a(n)) < 0. - Reinhard Zumkeller, Apr 28 2012
From Antti Karttunen, Feb 20-21 2015: (Start)
a(n) = A246590(n)/2.
A255070(a(n)) = n, or equally, A236840(a(n)) = 2n.
a(n) = 1 + A255068(n-1). (End)

A236840 n minus number of runs in the binary expansion of n: a(n) = n - A005811(n).

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 4, 6, 6, 6, 6, 8, 10, 10, 12, 14, 14, 14, 14, 16, 16, 16, 18, 20, 22, 22, 22, 24, 26, 26, 28, 30, 30, 30, 30, 32, 32, 32, 34, 36, 36, 36, 36, 38, 40, 40, 42, 44, 46, 46, 46, 48, 48, 48, 50, 52, 54, 54, 54, 56, 58, 58, 60, 62, 62, 62, 62, 64, 64, 64
Offset: 0

Views

Author

Antti Karttunen, Apr 18 2014

Keywords

Comments

All terms are even. Used by the "number-of-runs beanstalk" sequence A255056 and many of its associated sequences.

Crossrefs

Cf. A091067 (the positions of records), A106836 (run lengths).
Cf. A255070 (terms divided by 2).

Programs

  • Maple
    A236840 := proc(n) local i, b; if n=0 then 0 else b := convert(n, base, 2); select(i -> (b[i-1]<>b[i]), [$2..nops(b)]); n-1-nops(%) fi end: seq(A236840(i), i=0..69); # Peter Luschny, Apr 19 2014
  • Mathematica
    a[n_] := n - Length@ Split[IntegerDigits[n, 2]]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jul 16 2023 *)
  • Scheme
    (define (A236840 n)  (- n (A005811 n)))

Formula

a(n) = n - A005811(n) = n - A000120(A003188(n)).
a(n) = 2*A255070(n).

A106836 First differences of A060833 and (from a(2) onward) also of A091067 and A255068.

Original entry on oeis.org

3, 3, 1, 4, 1, 2, 1, 4, 3, 1, 1, 3, 1, 2, 1, 4, 3, 1, 4, 1, 2, 1, 1, 3, 3, 1, 1, 3, 1, 2, 1, 4, 3, 1, 4, 1, 2, 1, 4, 3, 1, 1, 3, 1, 2, 1, 1, 3, 3, 1, 4, 1, 2, 1, 1, 3, 3, 1, 1, 3, 1, 2, 1, 4, 3, 1, 4, 1, 2, 1, 4, 3, 1, 1, 3, 1, 2, 1, 4, 3, 1, 4, 1, 2, 1, 1, 3, 3, 1, 1, 3, 1, 2, 1, 1, 3, 3, 1, 4, 1, 2, 1
Offset: 1

Views

Author

Ralf Stephan, May 03 2005

Keywords

Comments

From Antti Karttunen, Feb 20 2015: (Start)
Among the terms a(1) .. a(8192), 1 occurs 4095 times, 2 occurs 1024 times, 3 occurs 2048 times and 4 occurs 1025 times. No larger numbers can ever occur.
That these are the first differences of not just A091067 and A255068, but also of A060833 follows from N. Sato's Feb 12 2013 comment in the latter that "For n > 1, n is in the sequence (A060833) if and only if A038189(n-1) = 1."
Also length of runs in A236840 and A255070.
(End)

Crossrefs

Programs

Formula

a(1) = 3, and for n > 1: a(n) = A091067(n) - A091067(n-1). - Antti Karttunen, Feb 20 2015

Extensions

Name edited by Antti Karttunen, Feb 20 2015

A269363 Lexicographically first injection of natural numbers beginning with a(1)=3 such that for all n >= 1, a(n)*a(n+1) is a fibbinary number (A003714), i.e., has no adjacent 1's in its base-2 representation.

Original entry on oeis.org

3, 6, 7, 12, 11, 15, 22, 24, 14, 19, 27, 38, 28, 23, 46, 48, 43, 30, 39, 35, 59, 44, 31, 75, 62, 87, 51, 83, 56, 47, 88, 54, 76, 55, 96, 86, 60, 71, 67, 70, 78, 112, 79, 107, 102, 91, 120, 139, 118, 140, 119, 142, 131, 134, 155, 240, 156, 135, 152, 108, 95, 92, 103, 179, 184, 115, 147, 224, 94, 175, 123, 150, 111, 158, 214, 163, 203
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

The sequence is conjectured to be a permutation of A091067.
The scatter plot is quite interesting (essentially the same as A269367). Compare also to the graph of A269361.

Crossrefs

Cf. A269367 (the terms ranked with A255070).

Programs

  • Mathematica
    fibbinaryQ[n_] := BitAnd[n, 2 n]==0; a[1]=3; a[n_] := a[n] = For[k=1, True, k++, If[Mod[k, 4] != 1, If[fibbinaryQ[a[n-1] k], If[FreeQ[Array[a, n-1], k], Return[k]]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 02 2016 *)
Showing 1-6 of 6 results.