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-10 of 17 results. Next

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

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

Original entry on oeis.org

2, 5, 7, 9, 16, 12, 29, 14, 16, 23, 67, 18, 67, 38, 121, 20, 16, 23, 67, 31, 436, 80, 277, 25, 67, 80, 631, 48, 277, 138, 497, 27, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 33, 67, 80, 631, 94, 1771, 668, 2557, 59, 277, 302, 2557, 156, 1129, 530, 2017, 35, 16, 23, 67, 31, 436, 80, 277, 40, 436, 467, 1771, 94, 1771, 302, 1129, 50
Offset: 1

Views

Author

Antti Karttunen, May 04 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));
    A286162(n) = (2 + ((A001511(n)+A278222(n))^2) - A001511(n) - 3*A278222(n))/2;
    for(n=1, 10000, write("b286162.txt", n, " ", A286162(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 bin(n)[2:][::-1].index("1") + 1
    def a(n): return T(a001511(n), a278222(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286162 n) (* (/ 1 2) (+ (expt (+ (A001511 n) (A278222 n)) 2) (- (A001511 n)) (- (* 3 (A278222 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

2, 5, 12, 14, 23, 42, 38, 44, 40, 61, 80, 117, 80, 84, 216, 152, 23, 148, 80, 148, 601, 142, 302, 375, 109, 142, 911, 183, 302, 1020, 530, 560, 61, 61, 142, 856, 467, 142, 412, 430, 467, 1741, 1832, 265, 2497, 412, 1178, 1323, 109, 265, 826, 265, 1832, 1735, 2932, 489, 412, 412, 2630, 2835, 1178, 672, 2787, 2144, 61, 625, 80, 148, 601, 850, 302, 2998, 467, 601
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

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));
    A286163(n) = (2 + ((A046523(n)+A278222(n))^2) - A046523(n) - 3*A278222(n))/2;
    for(n=1, 10000, write("b286163.txt", n, " ", A286163(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(a046523(n), a278222(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286163 n) (* (/ 1 2) (+ (expt (+ (A046523 n) (A278222 n)) 2) (- (A046523 n)) (- (* 3 (A278222 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

0, 2, 5, 7, 9, 16, 14, 29, 12, 16, 20, 67, 27, 16, 23, 121, 35, 67, 44, 67, 23, 16, 54, 277, 18, 16, 38, 67, 65, 436, 77, 497, 23, 16, 31, 631, 90, 16, 23, 277, 104, 436, 119, 67, 80, 16, 135, 1129, 25, 67, 23, 67, 152, 277, 31, 277, 23, 16, 170, 1771, 189, 16, 80, 2017, 31, 436, 209, 67, 23, 436, 230, 2557, 252, 16, 80, 67, 40, 436, 275, 1129, 138, 16, 299
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
    A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
    A286164(n) = (2 + ((A055396(n)+A046523(n))^2) - A055396(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286164.txt", n, " ", A286164(n)));
    
  • Python
    from sympy import primepi, isprime, primefactors, factorint
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    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(a055396(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286164 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A046523 n)) 2) (- (A055396 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 2, 2, 12, 2, 31, 2, 59, 18, 50, 2, 142, 2, 73, 50, 261, 2, 199, 2, 220, 73, 131, 2, 607, 33, 166, 129, 314, 2, 961, 2, 1097, 131, 248, 73, 1396, 2, 295, 166, 923, 2, 1246, 2, 550, 340, 401, 2, 2509, 52, 655, 248, 692, 2, 1252, 131, 1303, 295, 590, 2, 3946, 2, 661, 517, 4497, 166, 1924, 2, 1024, 401, 2051, 2, 5707, 2, 898, 655, 1214, 131, 2317, 2, 3781, 888
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {Sort[Flatten@ Apply[ TensorProduct, # /. {p_, e_} /; p > 1 :> p^Range[0, e]]][[-2]], Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[#[[All, -1]], Greater]] - Boole[n == 1]} &@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A032742(n) = if(1==n,n,n/vecmin(factor(n)[,1]));
    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
    A285729(n) = (1/2)*(2 + ((A032742(n)+A046523(n))^2) - A032742(n) - 3*A046523(n));
    for(n=1, 10000, write("b285729.txt", n, " ", A285729(n)));
    
  • Python
    from sympy import divisors, factorint
    def a032742(n): return 1 if n==1 else max(divisors(n)[:-1])
    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(a032742(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A285729 n) (* (/ 1 2) (+ (expt (+ (A032742 n) (A046523 n)) 2) (- (A032742 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 328, 7, 23, 29, 80, 2, 532, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1228, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1957, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2704, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1957, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286143 for the first time at n=24, where a(24) = 328, while A286143(24) = 355.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017 *)
  • 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
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286142(n) = (1/2)*(2 + ((A257993(n)+A046523(n))^2) - A257993(n) - 3*A046523(n));
    for(n=1, 10000, write("b286142.txt", n, " ", A286142(n)));
    
  • Python
    from sympy import factorint, prime, primepi, gcd
    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 a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(a257993(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286142 n) (* (/ 1 2) (+ (expt (+ (A257993 n) (A046523 n)) 2) (- (A257993 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 5, 2, 12, 2, 31, 2, 38, 7, 23, 2, 94, 2, 23, 16, 138, 2, 94, 2, 80, 16, 23, 2, 355, 7, 23, 29, 80, 2, 499, 2, 530, 16, 23, 16, 706, 2, 23, 16, 302, 2, 499, 2, 80, 67, 23, 2, 1279, 7, 80, 16, 80, 2, 328, 16, 302, 16, 23, 2, 1894, 2, 23, 67, 2082, 16, 499, 2, 80, 16, 467, 2, 2779, 2, 23, 67, 80, 16, 499, 2, 1178, 121, 23, 2, 1894, 16, 23, 16, 302, 2, 1894, 16
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Differs from A286142 for the first time at n=24, where a(24) = 355, while A286142(24) = 328.

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 - Boole[n == 1] & @@ {Module[{m = 1}, While[Mod[n, m!] == 0, m++]; m - 1], Times @@ MapIndexed[ Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]]}, {n, 92}] (* Michael De Vlieger, May 04 2017, after Robert G. Wilson v at A055881 *)
  • 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
    A055881(n) = { my(i); i=2; while((0 == (n%i)), n = n/i; i++); return(i-1); }
    A286143(n) = (1/2)*(2 + ((A055881(n)+A046523(n))^2) - A055881(n) - 3*A046523(n));
    for(n=1, 10000, write("b286143.txt", n, " ", A286143(n)));
    
  • Python
    from sympy import factorial, 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 a055881(n):
        m = 1
        while n%factorial(m)==0:
            m+=1
        return m - 1
    def a(n): return T(a055881(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286143 n) (* (/ 1 2) (+ (expt (+ (A055881 n) (A046523 n)) 2) (- (A055881 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

A286144 Compound filter: a(n) = T(A000010(n), A257993(n)), where T(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 3, 5, 10, 8, 21, 14, 21, 14, 55, 19, 78, 27, 36, 44, 136, 34, 171, 44, 78, 65, 253, 53, 210, 90, 171, 90, 406, 63, 465, 152, 210, 152, 300, 103, 666, 189, 300, 152, 820, 103, 903, 230, 300, 275, 1081, 169, 903, 230, 528, 324, 1378, 208, 820, 324, 666, 434, 1711, 187, 1830, 495, 666, 560, 1176, 251, 2211, 560, 990, 324, 2485, 349, 2628, 702, 820, 702
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {EulerPhi@ n, Module[{i = 1}, While[! CoprimeQ[Prime@ i, n], i++]; i]}, {n, 74}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A000010(n) = eulerphi(n);
    A257993(n) = { for(i=1,n,if(n%prime(i),return(i))); }
    A286144(n) = (2 + ((A000010(n)+A257993(n))^2) - A000010(n) - 3*A257993(n))/2;
    for(n=1, 10000, write("b286144.txt", n, " ", A286144(n)));
    
  • Python
    from sympy import prime, primepi, gcd, totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a053669(n):
        x=1
        while True:
            if gcd(prime(x), n) == 1: return prime(x)
            else: x+=1
    def a257993(n): return primepi(a053669(n))
    def a(n): return T(totient(n), a257993(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286144 n) (* (/ 1 2) (+ (expt (+ (A000010 n) (A257993 n)) 2) (- (A000010 n)) (- (* 3 (A257993 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

0, 2, 2, 12, 2, 40, 2, 59, 18, 61, 2, 179, 2, 86, 73, 261, 2, 265, 2, 265, 100, 148, 2, 757, 33, 185, 129, 367, 2, 1297, 2, 1097, 166, 271, 131, 1735, 2, 320, 205, 1105, 2, 1741, 2, 619, 517, 430, 2, 3113, 52, 850, 295, 769, 2, 1747, 205, 1517, 346, 625, 2, 5297, 2, 698, 730, 4497, 248, 2821, 2, 1117, 460, 2821, 2, 7069, 2, 941, 1070, 1315, 248, 3457, 2, 4513
Offset: 1

Views

Author

Antti Karttunen, May 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ {n - EulerPhi@ n, Times @@ MapIndexed[Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]] - Boole[n == 1]}, {n, 80}] (* Michael De Vlieger, May 04 2017 *)
  • PARI
    A051953(n) = (n - eulerphi(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
    A286152(n) = (2 + ((A051953(n)+A046523(n))^2) - A051953(n) - 3*A046523(n))/2;
    for(n=1, 10000, write("b286152.txt", n, " ", A286152(n)));
    
  • Python
    from sympy import factorint, totient
    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(n - totient(n), a046523(n)) # Indranil Ghosh, May 05 2017
  • Scheme
    (define (A286152 n) (* (/ 1 2) (+ (expt (+ (A051953 n) (A046523 n)) 2) (- (A051953 n)) (- (* 3 (A046523 n))) 2)))
    

Formula

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

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

Original entry on oeis.org

1, 2, 5, 7, 14, 23, 9, 29, 42, 40, 65, 80, 90, 31, 40, 121, 44, 142, 189, 109, 61, 115, 77, 302, 273, 148, 318, 94, 434, 532, 20, 497, 115, 86, 148, 826, 702, 271, 148, 355, 230, 601, 119, 220, 265, 131, 299, 1178, 297, 485, 86, 265, 1430, 838, 320, 328, 271, 556, 1769, 1957, 1890, 50, 142, 2017, 148, 751, 2277, 179, 373, 832, 665, 2932, 54, 856, 485
Offset: 1

Views

Author

Antti Karttunen, May 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ This function from Michel Marcus, Apr 11 2015
    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
    A286573(n) = (1/2)*(2 + ((A007733(n)+A046523(n))^2) - A007733(n) - 3*A046523(n));
    
  • Python
    from sympy import divisors, factorint
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
    def a002326(n):
        m=1
        while True:
            if (2**m - 1)%(2*n + 1)==0: return m
            else: m+=1
    def a000265(n): return max(list(filter(lambda i: i%2 == 1, divisors(n))))
    def a007733(n): return a002326((a000265(n) - 1)/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(a007733(n), a046523(n)) # Indranil Ghosh, May 26 2017

Formula

a(n) = (1/2)*(2 + ((A007733(n)+A046523(n))^2) - A007733(n) - 3*A046523(n)).
Showing 1-10 of 17 results. Next