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

A356419 Inverse of A067576 considered as a permutation of the positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 7, 12, 17, 9, 23, 13, 18, 10, 11, 30, 38, 24, 47, 31, 39, 14, 57, 48, 58, 19, 69, 25, 32, 15, 16, 68, 80, 81, 93, 94, 108, 40, 107, 123, 139, 49, 156, 59, 70, 20, 122, 174, 193, 82, 213, 95, 109, 26, 234, 124, 140, 33, 157, 41, 50, 21, 22, 138, 155, 256
Offset: 1

Views

Author

Jianing Song, Aug 06 2022

Keywords

Examples

			A067576(12) = 9, so a(9) = 12.
		

Crossrefs

Programs

  • PARI
    a(n)=my(w=hammingweight(n), p=sum(i=1, n-1, hammingweight(i)==w)); binomial(w+p+1, 2) - p
    
  • Python
    from math import comb
    def A356419(n):
        c, k = 0, 0
        for i,j in enumerate(bin(n)[-1:1:-1]):
            if j == '1':
                k += 1
                c += comb(i,k)
        return comb(n.bit_count()+c+1,2)-c # Chai Wah Wu, Mar 02 2023

Formula

Let w(n) = A000120(n) be the Hamming weight of n, p(n) = A068076(n), then a(n) = binomial(w(n)+p(n)+1, 2) - p(n).

A083140 Sieve of Eratosthenes arranged as an array and read by antidiagonals in the up direction; n-th row has property that smallest prime factor is prime(n).

Original entry on oeis.org

2, 3, 4, 5, 9, 6, 7, 25, 15, 8, 11, 49, 35, 21, 10, 13, 121, 77, 55, 27, 12, 17, 169, 143, 91, 65, 33, 14, 19, 289, 221, 187, 119, 85, 39, 16, 23, 361, 323, 247, 209, 133, 95, 45, 18, 29, 529, 437, 391, 299, 253, 161, 115, 51, 20, 31, 841, 667, 551, 493, 377, 319, 203, 125, 57, 22
Offset: 2

Views

Author

Yasutoshi Kohmoto, Jun 05 2003

Keywords

Comments

A permutation of natural numbers >= 2.
The proportion of integers in the n-th row of the array is given by A005867(n-1)/A002110(n) = A038110(n)/A038111(n). - Peter Kagey, Jun 03 2019, based on comments by Jamie Morken and discussion with Tom Hanlon.
The proportion of the integers after the n-th row of the array is given by A005867(n)/A002110(n). - Tom Hanlon, Jun 08 2019

Examples

			Array begins:
   2   4   6   8  10  12  14  16  18  20  22  24 .... (A005843 \ {0})
   3   9  15  21  27  33  39  45  51  57  63  69 .... (A016945)
   5  25  35  55  65  85  95 115 125 145 155 175 .... (A084967)
   7  49  77  91 119 133 161 203 217 259 287 301 .... (A084968)
  11 121 143 187 209 253 319 341 407 451 473 517 .... (A084969)
  13 169 221 247 299 377 403 481 533 559 611 689 .... (A084970)
		

Crossrefs

Cf. A083141 (main diagonal), A083221 (transpose), A004280, A038179, A084967, A084968, A084969, A084970, A084971.
Arrays of integers grouped into rows by various criteria:
by greatest prime factor: A125624,
by lowest prime factor: this sequence (upward antidiagonals), A083221 (downward antidiagonals),
by number of distinct prime factors: A125666,
by number of prime factors counted with multiplicity: A078840,
by prime signature: A095904,
by ordered prime signature: A096153,
by number of divisors: A119586,
by number of 1's in binary expansion: A066884 (upward), A067576 (downward),
by distance to next prime: A192179.

Programs

  • Mathematica
    a = Join[ {Table[2n, {n, 1, 12}]}, Table[ Take[ Prime[n]*Select[ Range[100], GCD[ Prime[n] #, Product[ Prime[i], {i, 1, n - 1}]] == 1 &], 12], {n, 2, 12}]]; Flatten[ Table[ a[[i, n - i]], {n, 2, 12}, {i, n - 1, 1, -1}]]
    (* second program: *)
    rows = 12; Clear[T]; Do[For[m = p = Prime[n]; k = 1, k <= rows, m += p, If[ FactorInteger[m][[1, 1]] == p, T[n, k++] = m]], {n, rows}]; Table[T[n - k + 1, k], {n, rows}, {k, n}] // Flatten (* Jean-François Alcover, Mar 08 2016 *)

Extensions

More terms from Hugo Pfoertner and Robert G. Wilson v, Jun 13 2003

A066884 Square array read by upward antidiagonals where the n-th row contains the positive integers with n binary 1's.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 15, 11, 6, 8, 31, 23, 13, 9, 16, 63, 47, 27, 14, 10, 32, 127, 95, 55, 29, 19, 12, 64, 255, 191, 111, 59, 30, 21, 17, 128, 511, 383, 223, 119, 61, 39, 22, 18, 256, 1023, 767, 447, 239, 123, 62, 43, 25, 20, 512, 2047, 1535, 895, 479, 247, 125, 79, 45, 26, 24, 1024
Offset: 1

Views

Author

Jared Benjamin Ricks (jaredricks(AT)yahoo.com), Jan 21 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A067587.

Examples

			Column: 1   2   3   4   5   6
-----------------------------
Row 1:| 1   2   4   8  16  32
Row 2:| 3   5   6   9  10  12
Row 3:| 7  11  13  14  19  21
Row 4:|15  23  27  29  30  39
Row 5:|31  47  55  59  61  62
Row 6:|63  95 111 119 123 125
		

Crossrefs

Selected rows: A000079 (1), A018900 (2), A014311 (3), A014312 (4), A014313 (5), A023688 (6), A023689 (7), A023690 (8), A023691 (9), A038461 (10), A038462 (11), A038463 (12). For decimal analogs, see A011557 and A038444-A038452.
Selected columns: A000225 (1), A055010 (2).
Selected diagonals: A036563 (main), A000918 (1st upper), A153894 (2nd upper). [Franklin T. Adams-Watters, Apr 22 2009]
Cf. A067576 (the same array read by downward antidiagonals).
Antidiagonal sums give A361074.

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, Last[ Take[ Take[ Select[ Range[2^12], Count[ IntegerDigits[ #, 2], 1] == j - i + 1 & ], j], i]]], {j, 1, 11}, {i, 1, j}]; a

Extensions

Corrected and extended by Henry Bottomley, Jan 27 2002

A035073 a(n) is root of square starting with digit 6: first term of runs.

Original entry on oeis.org

8, 25, 78, 245, 775, 2450, 7746, 24495, 77460, 244949, 774597, 2449490, 7745967, 24494898, 77459667, 244948975, 774596670, 2449489743, 7745966693, 24494897428, 77459666925, 244948974279, 774596669242, 2449489742784, 7745966692415, 24494897427832, 77459666924149
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Crossrefs

Subsequence of A045860.
Cf. A067576 (squares), A035076 (2..9).

Programs

  • Python
    from math import isqrt
    def a(n): return isqrt(6*10**n) + 1
    print([a(n) for n in range(1, 28)]) # Michael S. Branicky, Aug 25 2021

Formula

a(n) = ceiling(sqrt(6*10^n)), n > 0.

A207800 Permutation of positive numbers. See comments.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 5, 16, 15, 32, 6, 64, 11, 128, 9, 256, 31, 512, 10, 1024, 13, 2048, 12, 4096, 23, 8192, 17, 16384, 14, 32768, 18, 65536, 63, 131072, 20, 262144, 19, 524288, 24, 1048576, 27, 2097152, 33, 4194304, 21, 8388608, 34, 16777216, 47, 33554432, 36, 67108864, 22, 134217728, 40
Offset: 1

Views

Author

Keywords

Comments

a(1)=1; on places 2,4,6,8,... we put 2^m, m=1,2,3,..., i.e., numbers n with A000120(n)=1; on places 3,7,11,15,... we put numbers n with A000120(n)=2; on places 5,13,21,29,... we put numbers n with A000120(n)=3; etc.
For general description of the order, see comment in A207790.

Crossrefs

Cf. A207790.

Formula

a(n) = A066884(A209268(A065190(n))). Equivalently, a(n) = A067576(A249725(A065190(n))). - Ivan Neretin, Apr 30 2016

Extensions

a(30) corrected by Ivan Neretin, Apr 30 2016

A361074 Sum of the j-th number with binary weight n-j+1 over all j in [n].

Original entry on oeis.org

0, 1, 5, 16, 40, 92, 193, 401, 812, 1632, 3261, 6526, 13030, 26049, 52013, 103974, 207797, 415496, 830636, 1661086, 3321498, 6642591, 13283920, 26567121, 53131653, 106261922, 212518857, 425034976, 850060303, 1700115399, 3400211408, 6800412866, 13600787296
Offset: 0

Views

Author

Alois P. Heinz, Mar 01 2023

Keywords

Examples

			a(0) = 0 (empty sum).
a(1) = 1 = 1_2.
a(2) = 5 = 2 + 3 = 10_2 + 11_2.
a(3) = 16 = 4 + 5 + 7 = 100_2 + 101_2 + 111_2.
a(4) = 40 = 8 + 6 + 11 + 15 = 1000_2 + 110_2 + 1011_2 + 1111_2.
		

Crossrefs

Antidiagonal sums of A066884 or of A067576.

Programs

  • Maple
    b:= proc(i, j) option remember; uses Bits: local c, l, k;
          if j=1 then 2^i-1
        else c, l:= 0, [Split(b(i, j-1))[], 0];
             for k while l[k]<>1 or l[k+1]<>0 do c:=c+l[k] od;
             Join([1$c, 0$k-c, 1, l[k+2..-1][]])
          fi
        end:
    a:= n-> add(b(j, n-j+1), j=1..n):
    seq(a(n), n=0..32);

Formula

a(n) = Sum_{j=1..n} A066884(j,n-j+1) = Sum_{j=1..n} A067576(j,n-j+1).
Conjecture: a(n) ~ 19 * 2^n / 6. - Vaclav Kotesovec, Mar 04 2023

A086772 Store the natural numbers in a triangular array such that values on each row have the same number of bits. Start a new row with the smallest number not yet recorded. a(n) represents the initial terms in the resulting array.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 15, 21, 24, 31, 41, 45, 63, 64, 72, 74, 83, 94, 127, 139, 140, 173, 197, 207, 234, 255, 268, 284, 288, 339, 349, 390, 426, 445, 467, 511, 522, 553, 569, 634, 689, 706, 734, 797, 838, 934, 950, 951, 1023, 1036, 1052, 1078, 1179, 1236
Offset: 0

Views

Author

Alford Arnold, Aug 03 2003

Keywords

Comments

A067576 describes the sequences with a fixed number of binary bits using antidiagonals.

Examples

			The array begins:
   0
   1  2
   3  5  6
   4  8 16 32
   7 11 13 14 19
   9 10 12 17 18 20
  15 23 27 29 30 39 43
  ...
so the initial terms are 0 1 3 4 7 9 15 ...
		

Crossrefs

Programs

  • Maple
    A086772aux := proc(n,k)
        option remember;
        local a,npr,kpr,fnd ;
        if n = 0 then
            return 0;
        end if;
        if k = 0 then
            for a from 1 do
                fnd := false;
                for npr from 1 to n-1 do
                    for kpr from 0 to npr do
                        if procname(npr,kpr) = a then
                            fnd := true;
                            break;
                        end if;
                    end do:
                end do:
                if not fnd then
                    return a;
                end if;
            end do:
        else
            for a from 1 do
                if wt(a) = wt(procname(n,0)) then
                    fnd := false;
                    for npr from 1 to n-1 do
                        for kpr from 0 to npr do
                            if procname(npr,kpr) = a then
                                fnd := true;
                                break;
                            end if;
                        end do:
                    end do:
                    for kpr from 0 to k-1 do
                        if procname(n,kpr) = a then
                            fnd := true;
                            break;
                        end if;
                    end do:
                    if not fnd then
                        return a;
                    end if;
                end if;
            end do:
        end if;
    end proc:
    A086772 := proc(n)
        A086772aux(n,0) ;
    end proc: # R. J. Mathar, Sep 15 2012

A134562 Array T by antidiagonals: T(n,k) = k-th number whose formal base-3 representation has exactly n terms. ("Formal" means that all the nonzero coefficients are 1's.).

Original entry on oeis.org

1, 3, 2, 9, 4, 5, 27, 6, 7, 8, 81, 10, 11, 14, 17, 243, 12, 13, 16, 23, 26, 729, 18, 15, 20, 25, 44, 53, 2187, 28, 19, 22, 35, 50, 71
Offset: 1

Views

Author

Clark Kimberling, Nov 01 2007

Keywords

Comments

A permutation of the natural numbers. Except for initial terms in some cases, (Row 1) = A000244, (Row 2) = A055235, (Col 1) = A062318. For the analogous base-2 array, see A067576.

Examples

			11 = 9 + 1 + 1 is the 3rd largest number (after 5 and 7) that has
a 3-term formal base-3 representation.
Northwest corner:
1 3 9 27 81
2 4 6 10 12
5 7 11 13 15
8 14 16 20 22
		

Crossrefs

Showing 1-8 of 8 results.