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.

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).

A286371 a(n) = A286369(A003961(n)).

Original entry on oeis.org

2, 4, 7, 14, 5, 11, 4, 58, 20, 33, 7, 25, 6, 32, 10, 242, 4, 28, 5, 135, 11, 11, 7, 77, 14, 10, 73, 134, 5, 46, 7, 994, 42, 32, 33, 50, 6, 33, 43, 555, 4, 47, 5, 25, 29, 11, 7, 277, 14, 134, 11, 24, 4, 89, 10, 554, 10, 33, 7, 160, 4, 11, 28, 4034, 11, 54, 5, 134, 42, 873, 6, 118, 5, 10, 25, 135, 11, 55, 4, 2259, 272, 32, 6, 161, 33, 33, 10, 77, 6, 81, 10, 25
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A286369(A003961(n)).

A286373 a(n) = A286366(A048673(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A286366(A048673(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)).

A286452 Compound filter (largest prime factor of n & prime signature of 2n-1): a(n) = P(A061395(n), A046523(2n-1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 2, 5, 2, 18, 5, 14, 16, 5, 9, 50, 5, 42, 59, 9, 2, 73, 23, 44, 31, 14, 20, 199, 5, 18, 61, 5, 40, 115, 9, 77, 67, 50, 35, 40, 5, 90, 179, 61, 9, 391, 14, 185, 50, 9, 100, 205, 23, 14, 94, 35, 27, 1006, 5, 20, 40, 44, 115, 395, 31, 228, 131, 59, 2, 61, 20, 295, 442, 54, 14, 320, 23, 346, 265, 9, 44, 125, 61, 275, 31, 23, 104, 1349, 14, 52, 314, 65, 125, 430
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy import primepi, primefactors, factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    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 a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    def a(n): return T(a061395(n), a046523(2*n - 1)) # Indranil Ghosh, May 14 2017
  • Scheme
    (define (A286452 n) (* (/ 1 2) (+ (expt (+ (A061395 n) (A046523 (+ n n -1))) 2) (- (A061395 n)) (- (* 3 (A046523 (+ n n -1)))) 2)))
    

Formula

a(n) = (1/2)*(2 + ((A061395(n)+A046523(2n-1))^2) - A061395(n) - 3*A046523(2n-1)).

A286453 Compound filter: a(n) = P(A061395(n), A286465(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 2, 5, 11, 94, 5, 14, 254, 17, 9, 195, 47, 259, 500, 9, 11, 413, 138, 44, 303, 32, 20, 2784, 47, 354, 216, 5, 329, 506, 9, 77, 3161, 356, 35, 175, 107, 202, 2709, 216, 24, 11188, 14, 420, 356, 24, 285, 450, 498, 70, 2349, 35, 51, 115937, 5, 20, 329, 74, 310, 3420, 864, 1243, 336, 500, 11, 384, 20, 580, 47285, 87, 14, 615, 498, 1296, 3015, 9, 74, 3491, 216
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A061395(n)+A286465(n))^2) - A061395(n) - 3*A286465(n)).
Showing 1-6 of 6 results.