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.

A286258 Compound filter: a(n) = P(A046523(n), A046523(2n+1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

2, 5, 5, 25, 5, 27, 23, 44, 14, 61, 5, 117, 38, 27, 27, 226, 23, 90, 23, 90, 27, 142, 5, 375, 40, 27, 86, 148, 5, 495, 80, 698, 27, 61, 27, 702, 80, 61, 27, 765, 5, 625, 23, 90, 148, 61, 23, 1224, 109, 90, 27, 832, 5, 324, 61, 324, 61, 142, 23, 2013, 23, 84, 90, 2410, 27, 625, 302, 90, 27, 625, 23, 2998, 80, 27, 90, 265, 61, 495, 23, 1426, 152, 601, 5, 2013, 142, 27, 142
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A005384 (gives the positions of 5's), A234095 (of 23's).

Programs

  • PARI
    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
    A286258(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)+1))^2) - A046523(n) - 3*A046523((2*n)+1));
    for(n=1, 10000, write("b286258.txt", n, " ", A286258(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 a(n): return T(a046523(n), a046523(2*n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286258 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 1 n n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 1 n n)))) 2)))
    

Formula

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

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

Original entry on oeis.org

2, 5, 12, 14, 23, 42, 59, 44, 23, 61, 142, 117, 109, 183, 261, 152, 23, 61, 142, 148, 601, 850, 607, 375, 109, 265, 1093, 939, 473, 765, 1097, 560, 23, 61, 142, 148, 601, 850, 607, 430, 601, 1741, 3946, 2545, 2497, 3463, 2509, 1323, 109, 265, 1093, 1117, 2497, 4525, 5707, 3153, 473, 1105, 4489, 3813, 1969, 3129, 4497, 2144, 23, 61, 142, 148, 601, 850, 607, 430, 601, 1741
Offset: 0

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A088705 (one of the matches not matched by A278222 alone. Thus also the whole A007814 (A001511) family is included).

Programs

  • PARI
    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));
    A286240(n) = (2 + ((A278222(n)+A278222(1+n))^2) - A278222(n) - 3*A278222(1+n))/2;
    for(n=0, 16383, write("b286240.txt", n, " ", A286240(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 a(n): return T(a278222(n), a278222(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286240 n) (* (/ 1 2) (+ (expt (+ (A278222 n) (A278222 (+ 1 n))) 2) (- (A278222 n)) (- (* 3 (A278222 (+ 1 n)))) 2)))
    

Formula

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

A286257 Compound filter: a(n) = P(A046523(n), A046523(2n-1)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 5, 14, 12, 27, 5, 86, 14, 27, 23, 90, 12, 84, 27, 152, 23, 148, 5, 148, 27, 27, 80, 324, 25, 61, 44, 148, 23, 495, 5, 935, 61, 27, 61, 702, 5, 142, 61, 324, 138, 495, 23, 148, 90, 61, 23, 1426, 14, 265, 27, 90, 467, 324, 27, 430, 27, 61, 80, 2140, 12, 61, 183, 2144, 61, 495, 23, 607, 27, 495, 23, 2998, 23, 142, 90, 90, 142, 625, 5, 1426, 226, 27, 467
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A005382 (gives the positions of 5's), A067756 (of 12's), A234098 (of 23's).

Programs

  • PARI
    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
    A286257(n) = (1/2)*(2 + ((A046523(n)+A046523((2*n)-1))^2) - A046523(n) - 3*A046523((2*n)-1));
    for(n=1, 10000, write("b286257.txt", n, " ", A286257(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 a(n): return T(a046523(n), a046523(2*n - 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286257 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ -1 n n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ -1 n n)))) 2)))
    

Formula

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

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

Original entry on oeis.org

2, 12, 5, 40, 5, 84, 12, 86, 14, 142, 5, 148, 23, 216, 27, 367, 5, 265, 23, 148, 27, 412, 12, 430, 59, 142, 44, 832, 5, 1860, 23, 698, 61, 826, 27, 856, 23, 412, 27, 1402, 5, 850, 80, 148, 90, 1384, 12, 1759, 40, 265, 27, 607, 23, 1105, 61, 430, 27, 2086, 5, 2140, 80, 2352, 148, 4342, 27, 850, 23, 832, 27, 5080, 5, 2998, 80, 142, 148, 832, 27, 2956, 138, 1426
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Cf. A001359 (gives the positions of 5's), A049002 (of 12's), A115093 (of 23's).

Programs

  • PARI
    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
    A286256(n) = (2 + ((A046523(n)+A046523(2+n))^2) - A046523(n) - 3*A046523(2+n))/2;
    for(n=1, 10000, write("b286256.txt", n, " ", A286256(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 a(n): return T(a046523(n), a046523(n + 2)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286256 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A046523 (+ 2 n))) 2) (- (A046523 n)) (- (* 3 (A046523 (+ 2 n)))) 2)))
    

Formula

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

A083261 a(n) = gcd(A046523(n+1), A046523(n)).

Original entry on oeis.org

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

Views

Author

Labos Elemer, May 09 2003

Keywords

Crossrefs

Programs

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

Original entry on oeis.org

2, 12, 14, 12, 59, 86, 27, 12, 109, 363, 269, 86, 142, 148, 27, 12, 109, 1093, 1117, 363, 1097, 1517, 489, 86, 601, 1408, 619, 148, 142, 148, 27, 12, 109, 1093, 1117, 1093, 5707, 8587, 2545, 363, 1969, 6153, 4529, 1517, 4489, 4537, 489, 86, 601, 3946, 3976, 1408, 2509, 5719, 2545, 148, 601, 1408, 619, 148, 142, 148, 27, 12, 109, 1093, 1117, 1093, 5707, 8587
Offset: 0

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; g[n_] := If[n == 1, 1, Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]]; h[n_] := g@ f[BitXor[n, Floor[n/2]], 1, 1]; Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ # &, Table[{h[n], h[n + 1]}, {k, 12}, {n, k (k - 1)/2, k (k + 1)/2 - 1}]] // Flatten (* Michael De Vlieger, May 09 2017 *)
  • PARI
    A003188(n) = bitxor(n, n>>1);
    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));
    A278219(n) = A278222(A003188(n));
    A286241(n) = (2 + ((A278219(n)+A278219(1+n))^2) - A278219(n) - 3*A278219(1+n))/2;
    for(n=0, 16383, write("b286241.txt", n, " ", A286241(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 a003188(n): return n^int(n/2)
    def a243353(n): return a005940(1 + a003188(n))
    def a278219(n): return a046523(a243353(n))
    def a(n): return T(a278219(n), a278219(n + 1)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A286241 n) (* (/ 1 2) (+ (expt (+ (A278219 n) (A278219 (+ 1 n))) 2) (- (A278219 n)) (- (* 3 (A278219 (+ 1 n)))) 2)))
    

Formula

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