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.

A286161 Compound filter: a(n) = T(A001511(n), A046523(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 18, 2, 23, 2, 59, 7, 23, 2, 94, 2, 23, 16, 195, 2, 80, 2, 94, 16, 23, 2, 355, 7, 23, 29, 94, 2, 467, 2, 672, 16, 23, 16, 706, 2, 23, 16, 355, 2, 467, 2, 94, 67, 23, 2, 1331, 7, 80, 16, 94, 2, 302, 16, 355, 16, 23, 2, 1894, 2, 23, 67, 2422, 16, 467, 2, 94, 16, 467, 2, 2779, 2, 23, 67, 94, 16, 467, 2, 1331, 121, 23, 2, 1894, 16, 23, 16, 355, 2, 1832
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286161(n) = (2 + ((A001511(n)+A046523(n))^2) - A001511(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286161.txt", n, " ", A286161(n)));
    
  • Python
    from sympy import 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 a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a046523(n)) # Indranil Ghosh, May 06 2017
  • Scheme
    (define (A286161 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A046523 n)) 2) (- (A001511 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A291761 Restricted growth sequence transform of ((-1)^n)*A046523(n); filter combining the parity and the prime signature of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Comments

Equally, restricted growth sequence transform of sequence b defined as b(1) = 1, and for n > 1, b(n) = A046523(n) + A000035(n), which starts as 1, 2, 3, 4, 3, 6, 3, 8, 5, 6, 3, 12, 3, 6, 7, 16, 3, 12, 3, 12, ...

Crossrefs

Cf. A291767, A291768 (bisections), A147516.
Cf. A046523, A101296, A286161, A286251, A286367, A291762 (related or similar filtering sequences).
Cf. A065091 (positions of 3's), A100484 (of 4 and 5's), A001248 (of 4 and 7's), A046388 (of 9's), A030078 (of 6 and 12's).
Cf. A098108 (one of the matching sequences).

Programs

  • PARI
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    write_to_bfile(1,rgs_transform(vector(65537,n,((-1)^n)*A046523(n))),"b291761.txt");
    \\ Or alternatively:
    f(n) = if(1==n,n,A046523(n)+(n%2));
    write_to_bfile(1,rgs_transform(vector(16385,n,f(n))),"b291761.txt");

A286252 Compound filter: a(n) = P(A001511(1+n), A278222(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 2, 18, 2, 23, 7, 59, 2, 23, 16, 94, 7, 80, 29, 195, 2, 23, 16, 94, 16, 467, 67, 355, 7, 80, 67, 706, 29, 302, 121, 672, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 7, 80, 67, 706, 67, 1832, 631, 2779, 29, 302, 277, 2704, 121, 1178, 497, 2422, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 16, 467, 436
Offset: 0

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A278222(n) = A046523(A005940(1+n));
    A286252(n) = (2 + ((A001511(1+n)+A278222(n))^2) - A001511(1+n) - 3*A278222(n))/2;
    for(n=0, 16384, write("b286252.txt", n, " ", A286252(n)));
    
  • Python
    from sympy import prime, factorint
    import math
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    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 a278222(n): return a046523(a005940(n + 1))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n + 1), a278222(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286252 n) (* (/ 1 2) (+ (expt (+ (A001511 (+ 1 n)) (A278222 n)) 2) (- (A001511 (+ 1 n))) (- (* 3 (A278222 n))) 2)))
    

Formula

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

A286253 Compound filter: a(n) = P(A055396(n), A001511(1+n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 1, 8, 1, 9, 1, 25, 1, 5, 1, 26, 1, 27, 1, 17, 1, 35, 1, 53, 1, 5, 1, 75, 1, 9, 1, 8, 1, 65, 1, 131, 1, 5, 1, 13, 1, 90, 1, 12, 1, 104, 1, 134, 1, 5, 1, 186, 1, 14, 1, 8, 1, 152, 1, 18, 1, 5, 1, 188, 1, 189, 1, 30, 1, 9, 1, 229, 1, 5, 1, 273, 1, 252, 1, 8, 1, 14, 1, 347, 1, 5, 1, 323, 1, 9, 1, 12, 1, 324, 1, 19, 1, 5, 1, 31, 1, 350, 1, 8, 1, 377, 1, 462, 1, 5
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
    A286253(n) = (2 + ((A055396(n)+A001511(1+n))^2) - A055396(n) - 3*A001511(1+n))/2;
    for(n=1, 10000, write("b286253.txt", n, " ", A286253(n)));
    
  • Python
    from sympy import primepi, isprime, primefactors
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a055396(n), a001511(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286253 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A001511 (+ 1 n))) 2) (- (A055396 n)) (- (* 3 (A001511 (+ 1 n)))) 2)))
    

Formula

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

A286254 Compound filter: a(n) = P(A001511(n), A055396(1+n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 1, 13, 1, 12, 1, 14, 1, 17, 1, 31, 1, 5, 1, 60, 1, 38, 1, 9, 1, 47, 1, 19, 1, 5, 1, 69, 1, 68, 1, 27, 1, 8, 1, 94, 1, 5, 1, 124, 1, 107, 1, 9, 1, 122, 1, 33, 1, 5, 1, 156, 1, 8, 1, 14, 1, 155, 1, 193, 1, 5, 1, 43, 1, 192, 1, 9, 1, 212, 1, 280, 1, 5, 1, 18, 1, 255, 1, 20, 1, 278, 1, 13, 1, 5, 1, 355, 1, 12, 1, 9, 1, 8, 1, 441, 1, 5, 1, 381, 1, 380, 1, 14
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A001511(n) = (1+valuation(n,2));
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
    A286254(n) = (2 + ((A001511(n)+A055396(1+n))^2) - A001511(n) - 3*A055396(1+n))/2;
    for(n=1, 10000, write("b286254.txt", n, " ", A286254(n)));
    
  • Python
    from sympy import primepi, isprime, primefactors
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return T(a001511(n), a055396(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286254 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A055396 (+ 1 n))) 2) (- (A001511 n)) (- (* 3 (A055396 (+ 1 n)))) 2)))
    

Formula

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

A286362 Compound filter: a(n) = P(A089309(n), A046523(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 7, 2, 23, 9, 29, 7, 16, 5, 80, 2, 31, 40, 121, 2, 67, 5, 67, 16, 23, 9, 302, 7, 16, 38, 94, 2, 532, 20, 497, 16, 16, 23, 631, 2, 23, 31, 277, 2, 436, 5, 80, 67, 31, 14, 1178, 7, 67, 23, 67, 2, 302, 31, 328, 16, 16, 5, 1957, 2, 50, 142, 2017, 16, 436, 5, 67, 16, 467, 9, 2557, 2, 16, 80, 80, 16, 499, 14, 1129, 121, 16, 5, 1771, 16, 23, 31, 302, 2, 1771
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

For all odd i, odd j: a(i) = a(j) <=> A286251(i) = A286251(j).

Crossrefs

Programs

Formula

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