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 25 results. Next

A341392 a(n) = A284005(n) / (1 + A000120(n))!.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 8, 4, 6, 2, 9, 3, 4, 1, 16, 8, 12, 4, 18, 6, 8, 2, 27, 9, 12, 3, 16, 4, 5, 1, 32, 16, 24, 8, 36, 12, 16, 4, 54, 18, 24, 6, 32, 8, 10, 2, 81, 27, 36, 9, 48, 12, 15, 3, 64, 16, 20, 4, 25, 5, 6, 1, 64, 32, 48, 16, 72, 24, 32, 8, 108, 36, 48, 12, 64, 16, 20, 4, 162, 54, 72, 18, 96, 24, 30, 6, 128
Offset: 0

Views

Author

Mikhail Kurkov, Feb 10 2021 [verification needed]

Keywords

Comments

From Antti Karttunen, Feb 10 2021: (Start)
This sequence can be represented as a binary tree. Each child to the left is obtained by multiplying its parent with (1+{binary weight of its breadth-first-wise index in the tree}), while each child to the right is just a clone of its parent:
1
|
...................1...................
2 1
4......../ \........2 3......../ \........1
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 4 6 2 9 3 4 1
16 8 12 4 18 6 8 2 27 9 12 3 16 4 5 1
etc.
(End)
This sequence and A243499 have the same set of values on intervals from 2^m to 2^(m+1) - 1 for m >= 0. - Mikhail Kurkov, Jun 18 2021 [verification needed]
FindStat provides a sequence of mappings between this sequence and A000110 starting from collection [Set partitions] (see Links section for illustration). - Mikhail Kurkov, May 20 2023 [verification needed]

Crossrefs

Cf. A000120, A000142, A007814, A036987, A053645, A243499, A284005, A329369 (similar recurrence).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          a(iquo(n, 2, 'd'))*`if`(d=1, 1, add(i, i=Bits[Split](n+1))))
        end:
    seq(a(n), n=0..120);  # Alois P. Heinz, Jun 23 2021
  • Mathematica
    Array[DivisorSigma[0, Apply[Times, Map[#1^#2 & @@ # &, FactorInteger[#1] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]]]/#2 & @@ {Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ #, (1 + Count[#, 1])!} &@ IntegerDigits[#, 2] &, 89, 0] (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    A284005(n) = { my(k=if(n, logint(n, 2)), s=1); prod(i=0, k, s+=bittest(n, k-i)); }; \\ From A284005
    A341392(n) = (A284005(n)/((1 + hammingweight(n))!)); \\ Antti Karttunen, Feb 10 2021
    
  • PARI
    A341392(n) = if(!n,1,if(n%2, A341392((n-1)/2), (1+hammingweight(n))*A341392(n/2))); \\ Antti Karttunen, Feb 10 2021

Formula

a(n) = A284005(n) / (1 + A000120(n))! = A284005(n) / A000142(1 + A000120(n)).
a(2n+1) = a(n) for n >= 0.
a(2n) = (1 + A000120(n))*a(n) = A243499(2*A059894(n)) = a(n) + a(2n - 2^A007814(n)) for n > 0 with a(0) = 1.
[2*a(n) - 1 = A329369(n)] = A036987(A053645(n)).
From Mikhail Kurkov, Apr 24 2023: (Start)
a(2^m*(2n+1)) = Sum_{k=0..m} binomial(m, k)*a(2^k*n) for m >= 0, n >= 0 with a(0) = 1.
a(n) = a(f(n)) + Sum_{k=0..floor(log_2(n))-1} (1 - T(n, k))*a(f(n) + 2^k*(1 - T(n, k))) for n > 1 with a(0) = 1, a(1) = 1, where f(n) = A053645(n) and where T(n, k) = floor(n/2^k) mod 2. (End) [verification needed]

A153151 Rotated binary decrementing: For n<2 a(n) = n, if n=2^k, a(n) = 2*n-1, otherwise a(n) = n-1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 20 2008

Keywords

Comments

Without the initial 0, a(n) is the lexicographically minimal sequence of distinct positive integers such that all values of a(n) mod n are distinct and nonnegative. - Ivan Neretin, Apr 27 2015
A002487(n)/A002487(n+1), n > 0, runs through all the reduced nonnegative rationals exactly once. A002487 is the Stern's sequence. Permutation from denominators (A002487(n+1))
1 2 1 3 2 3 1 4 3 5 2 5 3 4 1
where labels are
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
to numerators (A002487(n))
1 1 2 1 3 2 3 1 4 3 5 2 5 3 4
where changed labels are
1 3 2 7 4 5 6 15 8 9 10 11 12 13 14
Thus, b(n) = A002487(n+1), b(a(n)) = A002487(n), n>0. - Yosu Yurramendi, Jul 07 2016

Crossrefs

Programs

  • Maple
    a := n -> if n < 2 then n elif convert(convert(n, base, 2), `+`) = 1 then 2*n-1 else n-1 fi: seq(a(n), n=0..70); # Peter Luschny, Jul 16 2016
  • Mathematica
    Table[Which[n < 2, n, IntegerQ[Log[2, n]], 2 n - 1, True, n - 1], {n, 0, 70}] (* Michael De Vlieger, Apr 27 2015 *)
  • Python
    def ok(n): return n&(n - 1)==0
    def a(n): return n if n<2 else 2*n - 1 if ok(n) else n - 1 # Indranil Ghosh, Jun 09 2017
    
  • R
    nmax <- 126 # by choice
    a <- c(1,3,2)
    for(n in 3:nmax) a[n+1] <- n
    for(m in 0:floor(log2(nmax))) a[2^m] <- 2^(m+1) - 1
    a <- c(0, a)
    # Yosu Yurramendi, Sep 05 2020

Formula

A234027 Self-inverse permutation of nonnegative integers, A054429-conjugate of blue code: a(n) = A054429(A193231(A054429(n))).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 28 2013

Keywords

Crossrefs

Programs

  • Python
    def a065621(n): return n^(2*(n - (n&-n)))
    def a048724(n): return n^(2*n)
    def a054429(n): return 1 if n==1 else 2*a054429(int(n/2)) + 1 - n%2
    def a193231(n):
        if n<2: return n
        if n%2==0: return a048724(a193231(n/2))
        else: return a065621(1 + a193231((n - 1)/2))
    def a(n): return n if n<2 else a054429(a193231(a054429(n))) # Indranil Ghosh, Jun 05 2017
  • Scheme
    (define (A234027 n) (A054429 (A193231 (A054429 n))))
    

Formula

a(n) = A054429(A193231(A054429(n))).
a(n) = A234025(A054429(n)).
a(n) = A054429(A234026(n)).
a(n) = A059894(A234024(A059894(n))).

A347205 a(2n+1) = a(n) for n >= 0, a(2n) = a(n) + a(n - 2^A007814(n)) for n > 0 with a(0) = 1.

Original entry on oeis.org

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

Views

Author

Mikhail Kurkov, Aug 23 2021

Keywords

Comments

Scatter plot might be called "Cypress forest on a windy day". - Antti Karttunen, Nov 30 2021

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = If[OddQ[n], a[(n - 1)/2], a[n/2] + a[n/2 - 2^IntegerExponent[n/2, 2]]]; Array[a, 100, 0] (* Amiram Eldar, Sep 06 2021 *)
  • PARI
    a(n) = if (n==0, 1, if (n%2, a(n\2), a(n/2) + a(n/2 - 2^valuation(n/2, 2)))); \\ Michel Marcus, Sep 09 2021

Formula

a(2n+1) = a(n) for n >= 0.
a(2n) = a(n) + a(n - 2^A007814(n)) = a(2*A059894(n)) for n > 0 with a(0) = 1.
Sum_{k=0..2^n - 1} a(k) = A000108(n+1) for n >= 0.
a((4^n - 1)/3) = A000108(n) for n >= 0.
a(2^m*(2^n - 1)) = binomial(n + m, n) for n >= 0, m >= 0.
Generalization:
b(2n+1, p, q) = b(n, p, q) for n >= 0.
b(2n, p, q) = p*b(n, p, q) + q*b(n - 2^A007814(n), p, q) = for n > 0 with b(0, p, q) = 1.
Conjectured formulas: (Start)
Sum_{k=0..2^n - 1} b(k, 2, 1) = A006318(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 2, 2) = A115197(n) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 1) = A108524(n+1) for n >= 0.
Sum_{k=0..2^n - 1} b(k, 3, 3) = A116867(n) for n >= 0.
b((4^n - 1)/3, p, q) is generalized Catalan number C(p, q; n). (End)
Conjecture: a(n) = T(n, wt(n)+1), a(2n) = Sum_{k=1..wt(n)+1} T(n, k) where T(2n+1, k) = T(n, k) for 1 <= k <= wt(n)+1, T(2n+1, wt(n)+2) = T(n, wt(n)+1), T(2n, k) = Sum_{i=1..k} T(n, i) for 1 <= k <= wt(n)+1 with T(0, 1) = 1. - Mikhail Kurkov, Dec 13 2024

A234024 Self-inverse permutation of nonnegative integers, A059893-conjugate of blue code: a(n) = A059893(A193231(A059893(n))).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 28 2013

Keywords

Crossrefs

Programs

Formula

a(n) = A059893(A193231(A059893(n))).
a(n) = A059894(A234027(A059894(n))).

A153152 Rotated binary incrementing: For n<2 a(n)=n, if n=(2^k)-1, a(n)=(n+1)/2, otherwise a(n)=n+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 20 2008

Keywords

Comments

A002487(n)/A002487(n+1), n > 0, runs through all the reduced nonnegative rationals exactly once. A002487 is the Stern's sequence. A002487(a(n)) = A002487(n+1) n>0 . - Yosu Yurramendi, Jul 07 2016

Crossrefs

Inverse: A153151.

Programs

  • Maple
    a := n -> if n < 2 then n elif convert(convert(n+1, base, 2), `+`) = 1 then (n+1)/2 else n+1 fi: seq(a(n), n=0..71); # Peter Luschny, Jul 16 2016
  • Mathematica
    Table[If[IntegerQ@ Log2[n + 1], (n + 1)/2, n + 1], {n, 0, 71}] /. Rational -> 0 (* _Michael De Vlieger, Jul 13 2016 *)
  • Python
    def ok(n): return n&(n - 1)==0
    def a(n): return n if n<2 else (n + 1)/2 if ok(n + 1) else n + 1 # Indranil Ghosh, Jun 09 2017
    
  • R
    maxlevel <- 5 # by choice
    a <- 1
    for(m in 1:maxlevel){
     a[2^m        ] <- 2^m + 1
     a[2^(m+1) - 1] <- 2^m
     for (k in 0:(2^m-2)){
       a[2^(m+1) + 2*k + 1] <- 2*a[2^m + k]
       a[2^(m+1) + 2*k + 2] <- 2*a[2^m + k] + 1}
    }
    a <- c(0, a)
    # Yosu Yurramendi, Sep 05 2020

A307540 Irregular triangle T(n,k) such that squarefree m with gpf(m) = prime(n) in each row are arranged according to increasing values of phi(m)/m.

Original entry on oeis.org

1, 2, 6, 3, 30, 10, 15, 5, 210, 42, 70, 14, 105, 21, 35, 7, 2310, 330, 462, 66, 770, 110, 154, 1155, 22, 165, 231, 33, 385, 55, 77, 11, 30030, 2730, 4290, 6006, 390, 546, 858, 10010, 78, 910, 1430, 2002, 130, 15015, 182, 286, 1365, 2145, 26, 3003, 195, 273, 429
Offset: 0

Views

Author

Michael De Vlieger, Apr 13 2019

Keywords

Comments

Let gpf(m) = A006530(m) and let phi(m) = A000010(m) for m in A005117.
Row n contains m in A005117 such that A000720(A006530(m)) = n, sorted such that phi(m)/m increases as k increases.
Let m be the squarefree kernel A007947(m') of m'. We only consider squarefree m since phi(m)/m = phi(m')/m'. Let prime p | n and prime q be a nondivisor of n.
Since m is squarefree, we might encode the multiplicities of its prime divisors in a positional notation M that is finite at n significant digits. For example, m = 42 can be encoded reverse(A067255(42)) = 1,0,1,1 = 7^1 * 5^0 * 3^1 * 2^1. It is necessary to reverse row m of A067255 (hereinafter simply A067255(m)) so as to preserve zeros in M = A067255(m) pertaining to small nondivisor primes q < p. The code M is a series of 0's and 1's since m is squarefree. Then it is clear that row n contains all m such that A067255(m) has n terms, and there are 2^(n - 1) possible terms for n >= 1.
We may use an approach that generates the binary expansion of the range 2^(n - 1) < M < 2^n - 1, or we may append 1 to the reversed (n - 1)-tuples of {1, 0} to achieve codes M -> m for each row n, which is tantamount to ordering according to A059894.
Originally it was thought that the codes M were in order of the latter algorithm, and we could avoid sorting. Observation shows that the m still require sorting by the function phi(m)/m indeed to be in increasing order in row n. Still, the latter approach is slightly more efficient than the former in generating the sequence.

Examples

			Triangle begins:
1;
2;
6, 3;
30, 10, 15, 5;
210, 42, 70, 14, 105, 21, 35, 7;
...
First terms of this sequence appear bottom to top in the chart below. The
values of n appear in the header, values m = T(n,k) followed
parenthetically by phi(m)/m appear in column n. The x axis plots
according to primepi(gpf(m)), while the y axis plots k according to
phi(m)/m:
    0       1          2             3             4
    .       .          .             .             .
--- 1 ------------------------------------------------
  (1/1)     .          .             .             .
    .       .          .             .             .
    .       .          .             .             .
    .       .          .             .             7
    .       .          .             5           (6/7)
    .       .          .           (4/5)           .
    .       .          .             .             .
    .       .          .             .            35
    .       .          3             .          (24/35)
    .       .        (2/3)           .             .
    .       .          .             .             .
    .       .          .             .             .
    .       .          .             .            21
    .       .          .             .           (4/7)
    .       .          .            15             .
    .       .          .          (8/15)           .
    .       2          .             .             .
    .     (1/2)        .             .             .
    .       .          .             .             .
    .       .          .             .            105
    .       .          .             .          (16/35)
    .       .          .             .            14
    .       .          .            10           (3/7)
    .       .          .           (2/5)           .
    .       .          .             .             .
    .       .          .             .            70
    .       .          6             .          (12/35)
    .       .        (1/3)           .             .
    .       .          .             .            42
    .       .          .            30           (2/7)
    .       .          .          (4/15)           .
    .       .          .             .            210
    .       .          .             .           (8/35)
...
		

Crossrefs

Programs

  • Mathematica
    Prepend[Array[SortBy[#, Last] &@ Map[{#1, #2, EulerPhi[#1]/#1} & @@ {Times @@  MapIndexed[Prime[First@ #2]^#1 &, Reverse@ #], FromDigits@ #} &, Map[Prepend[Reverse@ #, 1] &, Tuples[{1, 0}, # - 1]]] &, 6], {{1, 0, 1}}][[All, All, 1]] // Flatten

Formula

For n > 0, row lengths = A000079(n - 1).
T(n, 1) = A002110(n) = p_n#.
T(n, 2) = A306237(n) = p_n#/prime(n - 1).
T(n, 2^(n - 1) - 1) = A006094(n).
T(n, 2^(n - 1)) = A000040(n) = prime(n) for n >= 1.
Last even term in row n = A077017(n).
First odd term in row n = A070826(n).

A273494 a(n) = A245325(n) + A245326(n).

Original entry on oeis.org

2, 3, 3, 5, 4, 5, 4, 8, 7, 7, 5, 8, 7, 7, 5, 13, 11, 12, 9, 11, 10, 9, 6, 13, 11, 12, 9, 11, 10, 9, 6, 21, 18, 19, 14, 19, 17, 16, 11, 18, 15, 17, 13, 14, 13, 11, 7, 21, 18, 19, 14, 19, 17, 16, 11, 18, 15, 17, 13, 14, 13, 11, 7, 34, 29, 31, 23, 30, 27, 25, 17, 31, 26, 29, 22, 25, 23, 20, 13, 29, 25, 26, 19, 27, 24, 23, 16, 23
Offset: 1

Views

Author

Yosu Yurramendi, May 23 2016

Keywords

Comments

The terms (n>0) may be written as a left-justified array with rows of length 2^m, m >= 0:
2,
3, 3,
5, 4, 5, 4,
8, 7, 7, 5, 8, 7, 7, 5,
13,11,12, 9,11,10, 9, 6,13,11,12, 9,11,10, 9, 6,
21,18,19,14,19,17,16,11,18,15,17,13,14,13,11, 7,21,18,19,14,19,17,...
All columns have the Fibonacci sequence property: a(2^(m+2) + k) = a(2^(m+1) + k) + a(2^m + k), m >= 0, 0 <= k < 2^m (empirical observations).
The terms (n>0) may also be written as a right-justified array with rows of length 2^m, m >= 0:
2,
3, 3,
5, 4, 5, 4,
8, 7, 7, 5, 8, 7, 7, 5,
13,11,12, 9,11,10, 9, 6,13,11,12, 9,11,10, 9, 6,
..., 18,15,17,13,14,13,11, 7,21,18,19,14,19,17,16,11,18,15,17,13,14,13,11, 7,
Each column is an arithmetic sequence. The differences of the arithmetic sequences give the sequence A071585: a(2^(m+1)-1-k) - a(2^m-1-k) = A071585(k), m >= 0, 0 <= k < 2^m.
n > 1 occurs in this sequence phi(n) = A000010(n) times, as it occurs in A007306 (Franklin T. Adams-Watters's comment), which is the sequence obtained by adding numerator and denominator in the Calkin-Wilf enumeration system of positive rationals. A245325(n)/A245326(n) is also an enumeration system of all positive rationals, and in each level m >= 0 (ranks between 2^m and 2^(m+1)-1) rationals are the same in both systems. Thus a(n) has the same terms in each level as A007306.
The same property occurs in all numerator+denominator sequences of enumeration systems of positive rationals, as, for example, A007306 (A007305+A047679), A071585 (A229742+A071766), A086592 (A020650+A020651), A268087 (A162909+A162910).

Crossrefs

Programs

  • PARI
    a(n) = my(x=1, y=1); for(i=0, logint(n, 2), if(bittest(n, i), [x, y]=[x+y, y], [x, y]=[y, x+y])); x \\ Mikhail Kurkov, Mar 10 2023

Formula

a(n) = A273493(A059893(n)), a(A059893(n)) = A273493(n), n > 0. - Yosu Yurramendi, May 30 2017
a(n) = A007306(A059893(A180200(n))) = A007306(A059894(A154435(n))). - Yosu Yurramendi, Sep 20 2021

A329718 The number of open tours by a biased rook on a specific f(n) X 1 board, where f(n) = A070941(n) and cells are colored white or black according to the binary representation of 2n.

Original entry on oeis.org

1, 2, 4, 4, 8, 6, 14, 8, 16, 10, 24, 10, 46, 24, 46, 16, 32, 18, 44, 14, 84, 34, 68, 18, 146, 68, 138, 44, 230, 84, 146, 32, 64, 34, 84, 22, 160, 54, 112, 22, 276, 106, 224, 54, 376, 106, 192, 34, 454, 192, 406, 112, 690, 224, 406, 84, 1066, 376, 690, 160
Offset: 0

Views

Author

Mikhail Kurkov, Nov 19 2019 [verification needed]

Keywords

Comments

A cell is colored white if the binary digit is 0 and a cell is colored black if the binary digit is 1. A biased rook on a white cell moves only to the left and otherwise moves only to the right.

Examples

			a(1) = 2 because the binary expansion of 2 is 10 and there are 2 open biased rook's tours, namely 12 and 21.
a(2) = 4 because the binary expansion of 4 is 100 and there are 4 open biased rook's tours, namely 132, 213, 231 and 321.
a(3) = 4 because the binary expansion of 6 is 110 and there are 4 open biased rook's tours, namely 123, 132, 231 and 312.
		

Crossrefs

Formula

a(n) = f(n) + f(A059894(n)) = f(n) + f(2*A053645(n)) for n > 0 with a(0) = 1 where f(n) = A329369(n).
Sum_{k=0..2^n-1} a(k) = 2*(n+1)! - 1 for n >= 0.
a((4^n-1)/3) = 2*A110501(n+1) for n > 0.
a(2^1*(2^n-1)) = A027649(n),
a(2^2*(2^n-1)) = A027650(n),
a(2^3*(2^n-1)) = A027651(n),
a(2^4*(2^n-1)) = A283811(n),
and more generally, a(2^m*(2^n-1)) = T(n,m+1) for n >= 0, m >= 0 where T(n,m) = Sum_{k=0..n} k!*(k+1)^m*Stirling2(n,k)*(-1)^(n-k).

A290254 The viabin numbers of the self-conjugate integer partitions.

Original entry on oeis.org

0, 1, 5, 6, 19, 21, 26, 28, 71, 75, 85, 89, 102, 106, 116, 120, 271, 279, 299, 307, 333, 341, 361, 369, 398, 406, 426, 434, 460, 468, 488, 496, 1055, 1071, 1111, 1127, 1179, 1195, 1235, 1251, 1309, 1325, 1365, 1381, 1433, 1449, 1489, 1505, 1566, 1582, 1622
Offset: 1

Views

Author

Emeric Deutsch, Aug 23 2017

Keywords

Comments

For the definition of viabin number see comment in A290253.
The binary representation of a(n) is obtained by concatenating the binary representation of (n-1) and the reversed bit-flipped binary representation of (n-1) and then dropping the last bit. This suggests that it would have been more natural to index from 0. - Peter J. Taylor, Sep 24 2021

Examples

			19 is in the sequence. Indeed, binary (19) = 10011 and so the southeast border of the Ferrers board of the corresponding integer partition is ENNEEN, where E = (1,0) and N = (0,1). This leads to the self-conjugate integer partition [3,1,1].
		

Crossrefs

Programs

  • Maple
    a := proc (n) local i, m, r: m, r := n, 0: for i from 0 while 1 < m do r := 2*r+1-irem(m, 2, 'm') end do: r+2^i end proc: SC := {0}: for n to 3000 do if a(n) = n then SC := `union`(SC, {n}) else  end if end do: SC; # first part of the program taken from A059894.
  • Mathematica
    nmax = 3000; (* nmax=3000 gives 64 terms *)
    a[n_] := Module[{i, m = n, r = 0}, For[i = 0, 1 < m, i++, r = 2*r + 1 - Mod[m, 2]; m = Quotient[m, 2]]; r + 2^i];
    SC = {0};
    For[n = 1, n <= nmax, n++, If[a[n] == n, SC = Union[SC, {n}]]];
    SC (* Jean-François Alcover, Dec 16 2020, after Maple *)
  • PARI
    a(n) = my(v=binary(max(1,n-1))[^1]); n<<#v + bitneg(fromdigits(Vecrev(v),2)); \\ Kevin Ryde, Nov 30 2021
  • Python
    a = lambda n: int(bin(n-1)[2:] + ''.join(str(1 ^ int(ch)) for ch in bin(n-1)[-1:2:-1]), 2) # Peter J. Taylor, Sep 24 2021
    

Formula

{ 0 } union fixed points of A059894. - Alois P. Heinz, Aug 24 2017
a(n) = a(n-1) + 2*4^(f(n-1) - 1) + 3*2^(f(n-1) - 1) - 1 if n = 2^k + 1, k > 0, otherwise a(n-1) + (2^(A007814(n-1) + 2) - 3)*2^f(A025480(n-2)) with a(1) = 0, a(2) = 1 where f(n) = A000523(n) for n > 0 with f(0) = 0. - Mikhail Kurkov, Sep 24 2021 [verification needed]
Previous Showing 11-20 of 25 results. Next