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

A286365 Compound filter: a(n) = 2*A286364(n) + A000035(A007814(n)).

Original entry on oeis.org

2, 3, 4, 2, 6, 5, 4, 3, 14, 7, 4, 4, 6, 5, 10, 2, 6, 15, 4, 6, 32, 5, 4, 5, 20, 7, 58, 4, 6, 11, 4, 3, 32, 7, 10, 14, 6, 5, 10, 7, 6, 33, 4, 4, 24, 5, 4, 4, 14, 21, 10, 6, 6, 59, 10, 5, 32, 7, 4, 10, 6, 5, 134, 2, 42, 33, 4, 6, 32, 11, 4, 15, 6, 7, 28, 4, 32, 11, 4, 6, 242, 7, 4, 32, 42, 5, 10, 5, 6, 25, 10, 4, 32, 5, 10, 5, 6, 15, 134, 20, 6, 11, 4, 7, 46, 7
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also information whether the exponent of the highest power of 2 dividing n is even or odd, which is stored in the least significant bit of a(n). Thus, for example, all squares (A000290) can be obtained by listing such numbers n that a(n) is even and both A002260(a(n)/2) & A004736(a(n)/2) are perfect squares.

Crossrefs

Cf. A286366, A286367 (similar, but contain more information).

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return 2*a286364(n) + a007814(n)%2 # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286365 n) (+ (* 2 (A286364 n)) (A000035 (A007814 n))))
    

Formula

a(n) = (2*A286364(n)) + (1 - A035263(n)) = 2*A286364(n) + A000035(A007814(n)).

A286369 Compound filter: a(n) = 2*A286364(n) + floor(A072400(n)/4).

Original entry on oeis.org

2, 2, 4, 2, 7, 5, 5, 2, 14, 6, 4, 4, 7, 5, 11, 2, 6, 14, 4, 7, 33, 5, 5, 5, 20, 6, 58, 5, 7, 11, 5, 2, 32, 6, 10, 14, 7, 5, 11, 6, 6, 32, 4, 4, 25, 5, 5, 4, 14, 20, 10, 7, 7, 59, 11, 5, 32, 6, 4, 11, 7, 5, 135, 2, 42, 32, 4, 6, 33, 11, 5, 14, 6, 6, 28, 4, 33, 11, 5, 7, 242, 6, 4, 33, 43, 5, 11, 5, 6, 24, 10, 5, 33, 5, 11, 5, 6, 14, 134, 20, 7, 11, 5, 6, 46, 6
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). In contrast to A286366, the parity of the highest power of 2 dividing n is not stored.
Thus we have (among other such identities) the following two identities related to equivalence class partitioning:
For all odd i, odd j: a(i) = a(j) <=> A286366(i) = A286366(j).
For all odd i, odd j: a(i) = a(j) => A010877(i) = A010877(j). [On odd numbers the information contained in a(n) is sufficient to determine the value of n modulo 8, one of the 1, 3, 5 or 7.]

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8
    def a(n): return 2*a286364(n) + int(a072400(n)/4) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286369 n) (+ (* 2 (A286364 n)) (floor->exact (/ (A072400 n) 4))))
    

Formula

a(n) = 2*A286364(n) + floor(A072400(n)/4).

A286367 Compound filter: a(n) = P(A001511(n), A286364(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 3, 2, 6, 4, 5, 2, 10, 22, 8, 2, 9, 4, 5, 11, 15, 4, 30, 2, 13, 121, 5, 2, 14, 46, 8, 407, 9, 4, 17, 2, 21, 121, 8, 11, 39, 4, 5, 11, 19, 4, 138, 2, 9, 67, 5, 2, 20, 22, 57, 11, 13, 4, 437, 11, 14, 121, 8, 2, 24, 4, 5, 2212, 28, 211, 138, 2, 13, 121, 17, 2, 49, 4, 8, 92, 9, 121, 17, 2, 26, 7261, 8, 2, 156, 211, 5, 11, 14, 4, 80, 11, 9, 121, 5, 11, 27, 4, 30
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027), also the highest power of 2 dividing n. Note that this is more information than A286365, as it stores only the parity of the exponent of 2.
For all i, j: a(i) = a(j) => A286161(i) = A286161(j).

Crossrefs

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a286364(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286367 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A286364 n)) 2) (- (A001511 n)) (- (* 3 (A286364 n))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A286364(n))^2) - A001511(n) - 3*A286364(n)).

A286461 Compound filter (2-adic valuation of n & 4k+1,4k+3 prime-signature combination of 2n-1): a(n) = P(A001511(n), A286364((2*n)-1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 4, 9, 22, 5, 4, 32, 4, 5, 121, 9, 46, 437, 4, 20, 121, 17, 4, 24, 4, 5, 67, 14, 22, 17, 4, 24, 121, 5, 4, 2562, 211, 5, 121, 9, 4, 107, 121, 14, 7261, 5, 211, 24, 4, 17, 121, 41, 4, 2280, 4, 9, 254, 5, 4, 32, 4, 17, 67, 24, 22, 17, 631, 35, 121, 5, 121, 783, 4, 5, 121, 32, 211, 2280, 4, 9, 67, 17, 4, 41, 121, 5, 254, 9, 46, 2280, 4, 140, 121, 5, 4, 24
Offset: 1

Views

Author

Antti Karttunen, May 10 2017

Keywords

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A001511(n)+A286364((2*n)-1))^2) - A001511(n) - 3*A286364((2*n)-1)).

A286361 Least number with the same prime signature as {the largest divisor of n with only prime factors of the form 4k+1} has: a(n) = A046523(A170818(n)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 4, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 6, 1, 1, 2, 1, 2, 1, 1, 2, 2, 4, 1, 1, 2, 1, 2, 1, 2, 1, 1, 6, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 4, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Differs from A063014 for the first time at n=25, where a(25) = 4, while A063014(25) = 3.

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a072438(n):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==1 else i**f[i] for i in f])
    def a(n): return a046523(n/a072438(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286361 n) (A046523 (A170818 n)))
    

Formula

a(n) = A046523(A170818(n)).
a(n) = A286363(A267099(n)).

A286363 Least number with the same prime signature as {the largest divisor of n with only prime factors of the form 4k+3} has: a(n) = A046523(A097706(n)).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 4, 1, 2, 2, 1, 2, 2, 1, 1, 4, 2, 1, 6, 2, 2, 2, 1, 1, 8, 2, 1, 2, 2, 1, 6, 1, 2, 4, 1, 2, 2, 1, 1, 6, 2, 2, 4, 2, 2, 2, 4, 1, 2, 1, 1, 8, 2, 2, 6, 1, 2, 2, 1, 2, 12, 1, 1, 6, 2, 1, 6, 2, 2, 4, 1, 1, 2, 2, 6, 2, 2, 1, 16, 1, 2, 6, 1, 2, 2, 2, 1, 4, 2, 2, 6, 2, 2, 2, 1, 4, 12, 1, 1, 2, 2, 1, 6, 1, 2, 8, 1, 2, 2, 2, 1, 6, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a072436(n):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==3 else i**f[i] for i in f])
    def a(n): return a046523(n/a072436(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286363 n) (A046523 (A097706 n)))
    

Formula

a(n) = A046523(A097706(n)).
a(n) = A286361(A267099(n)).

A286366 Compound filter: a(n) = 2*A286365(n) + floor(A072400(n)/4).

Original entry on oeis.org

4, 6, 8, 4, 13, 11, 9, 6, 28, 14, 8, 8, 13, 11, 21, 4, 12, 30, 8, 13, 65, 11, 9, 11, 40, 14, 116, 9, 13, 23, 9, 6, 64, 14, 20, 28, 13, 11, 21, 14, 12, 66, 8, 8, 49, 11, 9, 8, 28, 42, 20, 13, 13, 119, 21, 11, 64, 14, 8, 21, 13, 11, 269, 4, 84, 66, 8, 12, 65, 23, 9, 30, 12, 14, 56, 8, 65, 23, 9, 13, 484, 14, 8, 65, 85, 11, 21, 11, 12, 50, 20, 9, 65, 11, 21, 11
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

Each term of this sequence contains, in addition to the information contained in A286365 (which packs the values of A286361(n) and A286363(n) and parity of the exponent of the highest power of 2 dividing n) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). Note that the whole A072400(n) can be recovered based on the other information contained in a(n). Together all this information is enough - by Lagrange's "Four Squares theorem" - to determine what is the least number of squares that add up to n. Thus it follows that for all i, j: a(i) = a(j) => A002828(i) = A002828(j).
A286369 is similar, but without the parity of the 2-adic value present.

Crossrefs

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def A(n, k):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a286365(n): return 2*a286364(n) + a007814(n)%2
    def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8
    def a(n): return 2*a286365(n) + int(a072400(n)/4) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286366 n) (+ (* 2 (A286365 n)) (floor->exact (/ (A072400 n) 4))))
    

Formula

a(n) = 2*A286365(n) + floor(A072400(n)/4).
Showing 1-7 of 7 results.