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 51-60 of 94 results. Next

A284268 Sum of coefficients > 1 in the Stern polynomial B(2n+1,x): a(n) = A275812(A277324(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 25 2017

Keywords

Comments

Sum of terms larger than one on row 2n+1 of table A125184.

Crossrefs

Odd bisection of A284272.

Programs

Formula

a(n) = A284272((2*n)+1).
a(n) = A275812(A277324(n)).
Other identities. For all n >= 0:
A007306(1+n) = A284267(n) + a(n).

A284565 Bisection of A000360.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 2, 2, 4, 4, 3, 4, 4, 3, 3, 3, 4, 6, 5, 5, 7, 6, 4, 5, 6, 6, 6, 5, 5, 5, 3, 3, 6, 7, 6, 8, 9, 8, 7, 7, 9, 11, 9, 8, 10, 8, 5, 6, 8, 9, 9, 9, 10, 10, 7, 6, 9, 9, 7, 7, 7, 5, 4, 4, 6, 9, 8, 9, 12, 11, 8, 10, 13, 14, 13, 12, 13, 12, 8, 8, 13, 15, 13, 15, 17, 15, 12, 11, 14, 16, 13, 11, 13, 10, 6, 7, 10
Offset: 0

Views

Author

Antti Karttunen, Apr 05 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A000360(2n).
a(n) = A001222(A284563(n)).
Other identities. For all n >= 1:
A007306(n) = a(n-1) + A284566(n-1).

A284566 Odd bisection of A284556.

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 2, 2, 3, 3, 4, 4, 3, 4, 4, 2, 3, 5, 5, 5, 6, 6, 6, 5, 4, 6, 7, 5, 5, 6, 4, 3, 4, 5, 7, 7, 7, 9, 9, 6, 7, 10, 10, 9, 9, 9, 8, 6, 5, 8, 10, 8, 9, 11, 9, 7, 7, 8, 9, 8, 6, 7, 6, 3, 4, 7, 8, 8, 10, 11, 11, 9, 9, 13, 15, 12, 12, 14, 11, 8, 9, 12, 15, 14, 14, 17, 16, 11, 11, 15, 15, 13, 12, 12, 10, 7, 6
Offset: 0

Views

Author

Antti Karttunen, Apr 05 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Which[n < 2, n, EvenQ@ n, a[n/2], True, a[(n - 1)/2] + a[(n + 1)/2]]; Table[(a[#] - JacobiSymbol[#, 3])/2 &[2 n + 1], {n, 0, 96}] (* Michael De Vlieger, Apr 05 2017 *)
  • Scheme
    (define (A284566 n) (A284556 (+ n n 1)))
    (define (A284566 n) (A001222 (A284564 n)))

Formula

a(n) = A284556((2*n)+1).
a(n) = A001222(A284564(n)).
Other identities. For all n >= 1:
A007306(n) = a(n-1) + A284565(n-1).

A285106 a(n) = A001222(A284576(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 11 2017

Keywords

Crossrefs

Programs

  • Scheme
    (define (A285106 n) (A001222 (A284576 n)))
    ;; A more practical version, needing only an implementation of A003986bi (bitwise-or, A003986) and memoization-macro definec:
    (define (A285106 n) (apply + (bitwise_or_of_exp_lists (A260443as_coeff_list n) (A260443as_coeff_list (+ 1 n)))))
    (define (bitwise_or_of_exp_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (bitwise_or_of_exp_lists nums2 nums1)) (else (map A003986bi nums1 (append nums2 (make-list (- len1 len2) 0)))))))
    (definec (A260443as_coeff_list n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_coeff_list (/ n 2)))) (else (add_two_lists (A260443as_coeff_list (/ (- n 1) 2)) (A260443as_coeff_list (/ (+ n 1) 2))))))
    (define (add_two_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (add_two_lists nums2 nums1)) (else (map + nums1 (append nums2 (make-list (- len1 len2) 0)))))))

Formula

a(n) = A001222(A284576(n)).
a(n) = A285107(n) + A285108(n).
Other identities. For all n >= 0:
A007306(1+n) = a(n) + A285108(n).

A285107 a(n) = A001222(A284577(n)).

Original entry on oeis.org

1, 2, 1, 3, 4, 5, 1, 4, 5, 7, 6, 5, 7, 8, 1, 5, 6, 7, 5, 8, 9, 7, 4, 7, 7, 8, 7, 7, 10, 11, 1, 6, 7, 7, 8, 7, 13, 14, 11, 13, 14, 7, 9, 16, 11, 13, 4, 9, 9, 6, 11, 11, 12, 13, 11, 12, 9, 9, 8, 9, 13, 14, 1, 7, 8, 7, 11, 10, 11, 15, 20, 17, 17, 14, 19, 25, 20, 13, 17, 16, 17, 13, 20, 19, 21, 26, 9, 21, 18, 11, 21, 26, 17, 19, 4, 11, 11, 6, 17, 17, 18, 15, 9
Offset: 0

Views

Author

Antti Karttunen, Apr 11 2017

Keywords

Crossrefs

Programs

  • Scheme
    (define (A285107 n) (A001222 (A284577 n)))
    ;; A more practical version, needing only an implementation of A003987bi (bitwise-xor, A003987) and memoization-macro definec:
    (define (bitwise_xor_of_exp_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (bitwise_xor_of_exp_lists nums2 nums1)) (else (map A003987bi nums1 (append nums2 (make-list (- len1 len2) 0)))))))
    (definec (A260443as_coeff_list n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_coeff_list (/ n 2)))) (else (add_two_lists (A260443as_coeff_list (/ (- n 1) 2)) (A260443as_coeff_list (/ (+ n 1) 2))))))
    (define (add_two_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (add_two_lists nums2 nums1)) (else (map + nums1 (append nums2 (make-list (- len1 len2) 0)))))))

Formula

a(n) = A001222(A284577(n)).
a(n) = A285106(n) - A285108(n).
Other identities. For all n >= 0:
A007306(1+n) = a(n) + 2*A285108(n).

A285108 a(n) = A001222(A284578(n)).

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 1, 3, 1, 1, 3, 4, 1, 1, 2, 3, 2, 0, 0, 4, 0, 0, 2, 3, 3, 1, 2, 3, 0, 0, 6, 6, 1, 3, 3, 6, 1, 1, 5, 4, 3, 3, 4, 4, 1, 2, 4, 5, 3, 0, 0, 5, 0, 0, 3, 3, 3, 4, 4, 1, 0, 1, 6, 5, 0, 2, 7, 3, 0, 0, 6, 5, 4, 4, 4, 11, 1, 2, 9, 5, 0, 3, 3, 8, 1, 1, 7, 4, 3, 4, 8, 10, 3, 3, 11, 6, 3, 4, 9, 4, 1, 1, 5, 5, 3, 3, 5, 4, 1
Offset: 0

Views

Author

Antti Karttunen, Apr 11 2017

Keywords

Crossrefs

Programs

  • Scheme
    (define (A285108 n) (A001222 (A284578 n)))
    ;; A more practical version, needing only an implementation of A004198bi (bitwise-and, A004198) and memoization-macro definec:
    (define (A285108 n) (apply + (bitwise_and_of_exp_lists (A260443as_coeff_list n) (A260443as_coeff_list (+ 1 n)))))
    (define (bitwise_and_of_exp_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (bitwise_and_of_exp_lists nums2 nums1)) (else (map A004198bi nums1 (append nums2 (make-list (- len1 len2) 0)))))))
    (definec (A260443as_coeff_list n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) ((even? n) (cons 0 (A260443as_coeff_list (/ n 2)))) (else (add_two_lists (A260443as_coeff_list (/ (- n 1) 2)) (A260443as_coeff_list (/ (+ n 1) 2))))))
    (define (add_two_lists nums1 nums2) (let ((len1 (length nums1)) (len2 (length nums2))) (cond ((< len1 len2) (add_two_lists nums2 nums1)) (else (map + nums1 (append nums2 (make-list (- len1 len2) 0)))))))

Formula

a(n) = A001222(A284578(n)).
a(n) = A285106(n) - A285107(n).
Other identities. For all n >= 0:
A007306(1+n) = A285106(n) + a(n) = A285107(n) + 2*a(n).

A054427 Permutation of natural numbers: maps the fractions A038567/A038566 to the right side (n/m > 1) of Stern-Brocot tree.

Original entry on oeis.org

1, 2, 4, 3, 8, 5, 16, 7, 6, 9, 32, 17, 64, 15, 13, 12, 10, 33, 128, 14, 11, 65, 256, 31, 25, 24, 18, 129, 512, 29, 20, 257, 1024, 63, 30, 28, 49, 48, 21, 19, 34, 513, 2048, 26, 23, 1025, 4096, 127, 61, 57, 27, 97, 96, 22, 40, 36, 66, 2049, 8192, 62, 56, 41, 35, 4097
Offset: 1

Views

Author

Keywords

Examples

			Right side of Stern-Brocot tree: 1/1 2/1 3/2 3/1 4/3 5/3 5/2 4/1 5/4 7/5 8/5 7/4 7/3 8/3 7/2 5/1
A038567/A038566: 1/1 2/1 3/1 3/2 4/1 4/3 5/1 5/2 5/3 5/4 6/1 6/5 7/1 7/2 7/3 7/4
		

Crossrefs

Inverse permutation: A054428.

Programs

  • Maple
    A038567_A038566_to_SternBrocot_permutation := proc(u) local a,n,i; a := []; for n from 1 to u do for i from 1 to n do if (1 = igcd(n,i)) then a := [op(a),cfrac2binexp(convert((n/i),confrac))+1]; fi; od; od; RETURN(a); end; # cfrac2binexp given in A054424.

A273493 a(n) = A245327(n) + A245328(n).

Original entry on oeis.org

2, 3, 3, 5, 5, 4, 4, 8, 8, 7, 7, 7, 7, 5, 5, 13, 13, 11, 11, 12, 12, 9, 9, 11, 11, 10, 10, 9, 9, 6, 6, 21, 21, 18, 18, 19, 19, 14, 14, 19, 19, 17, 17, 16, 16, 11, 11, 18, 18, 15, 15, 17, 17, 13, 13, 14, 14, 13, 13, 11, 11, 7, 7, 34, 34, 29, 29, 31, 31, 23, 23, 30, 30, 27, 27, 25, 25, 17, 17, 31, 31, 26, 26, 29, 29, 22, 22, 25
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, 5, 4, 4,
8, 8, 7, 7, 7, 7, 5, 5,
13,13,11,11,12,12, 9, 9,11,11,10,10, 9, 9, 6, 6,
21,21,18,18,19,19,14,14,19,19,17,17,16,16,11,11,18,18,15,15,17,17,13,13,14,14,...
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, 5, 4, 4,
8, 8, 7, 7, 7, 7, 5, 5,
13,13,11,11,12,12, 9, 9,11,11,10,10, 9, 9, 6, 6,
...,19,19,17,17,16,16,11,11,18,18,15,15,17,17,13,13,14,14,13,13,11,11, 7, 7,
Each column is an arithmetic sequence. The differences of the arithmetic sequences repeat the sequence A071585: a(2^(m+2) -1 - 2k) - a(2^(m+1) -1 - 2k) = A071585(k-1), m > 0, 0 <= k < 2^m ; a(2^(m+2) -1 - 2k - 1) - a(2^(m+1) -1 - 2k - 1) = A071585(k-1), 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' comment), that is the sequence obtained by adding numerator and denominator in the Calkin-Wilf enumeration system of positive rationals. A245327(n)/A245328(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.
a(n) = A273494(A059893(n)), a(A059893(n)) = A273494(n), n > 0. - Yosu Yurramendi, May 30 2017

Crossrefs

Programs

  • PARI
    b(n) = my(b=binary(n)); fromdigits(concat(b[1], Vecrev(vector(#b-1, k, b[k+1]))), 2); \\ from A059893
    a(n) = my(n=b(n), 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 11 2023

Formula

a(n) = A007306(A284459(n)), n > 0. - Yosu Yurramendi, Aug 23 2021

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

A282714 Base-2 generalized Pascal triangle P_2 read by rows (see Comments for precise definition).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 02 2017

Keywords

Comments

List the binary numbers in their natural order as binary strings, beginning with the empty string epsilon, which represents 0. Row n of the triangle gives the number of times the k-th string occurs as a (scattered) substring of the n-th string.
Row n has sum n+1.

Examples

			Triangle begins:
  1,
  1,1,
  1,1,1,
  1,2,0,1,
  1,1,2,0,1,
  1,2,1,1,0,1,
  1,2,2,1,0,0,1,
  1,3,0,3,0,0,0,1,
  1,1,3,0,3,0,0,0,1
  1,2,2,1,1,2,0,0,0,1
  1,2,3,1,1,1,1,0,0,0,1
  1,3,1,3,0,2,0,1,0,0,0,1
  1,2,4,1,2,0,2,0,0,0,0,0,1
  ...
The binary numbers are epsilon, 1, 10, 11, 100, 101, 110, 111, 1000, ...
The fifth number 101 contains
eps 1 10 11 100 101 respectively
.1..2..1..1...0...1 times, which is row 5 of the triangle.
		

Crossrefs

A007306 gives (essentially) the number of nonzero entries in the rows.

Programs

  • Maple
    Nscatsub := proc(subw,w)
        local lsubw,lw,N,wri,wr,i ;
        lsubw := nops(subw) ;
        lw := nops(w) ;
        N := 0 ;
        if lsubw = 0 then
            return 1 ;
        elif lsubw > lw then
            return 0 ;
        else
            for wri in combinat[choose](lw,lsubw) do
                wr := [] ;
                for i in wri do
                    wr := [op(wr),op(i,w)] ;
                end do:
                if verify(subw,wr,'sublist') then
                    N := N+1 ;
                end if;
            end do:
        end if;
        return N ;
    end proc:
    P := proc(n,k,b)
        local n3,k3 ;
        n3 := convert(n,base,b) ;
        k3 := convert(k,base,b) ;
        Nscatsub(k3,n3) ;
    end proc:
    A282714 := proc(n,k)
        P(n,k,2) ;
    end proc: # R. J. Mathar, Mar 03 2017
  • Mathematica
    nmax = 12;
    row[n_] := Module[{bb, ss}, bb = Table[IntegerDigits[k, 2], {k, 0, n}]; ss = Subsets[Last[bb]]; Prepend[Count[ss, #]& /@ bb // Rest, 1]];
    Table[row[n], {n, 0, nmax}] // Flatten (* Jean-François Alcover, Dec 14 2017 *)

Extensions

More terms from Lars Blomberg, Mar 03 2017
Previous Showing 51-60 of 94 results. Next